
On one of the more mediocre episodes of Fireside Swift , McSwiftface and Zach talk about the SOLID principles of class design, although I don’t hold the principles as the article of religious fervour that many interviewers apparently do, they are a useful touchstone for considering class quality. OOP had been in swing (in a commercial way) for a few years by then - I was writing in Delphi and C++. The spaghetti code era was a long way behind us and the idea of separation of responsibilities was well established.
I have been thinking about architecture a bit anyway - the introduction of Core Data into the #100Day apps I’m up to (day 63) means that there’s complicated looking code scattered around my views. In the cs193p lectures , MVVM is right near the start, and I made some early forays into it, but so far no talk of architecture in 100Days (although I know it’s coming soon.
I have certainly had the experience before of needing a layer between my apps and the database tech so they can be swapped out, and it’s basically a reflex to me to always wrap any commercial external code I’m introducing in any reasonable size program to abstract it a bit and make the (likely) task of having to replace it in the future a lot easier.
Once again, YouTube serves me up a timely video.
When I watch this, I can see why Paul Hudson might have left it for later in the course. There is a lot of complexity. It’s not simple code, it’s scalable code. This is good for real life apps, but it does not follow that it’s good for learning programming.