FourLayerArchitecture Is Still Under-Appreciated

I was recently following a link to The Wiki, the original c2.com wiki by Cunningham & Cunningham, Inc. It was a link to the FourLayerArchitecture page. At the very bottom, it currently says "Last edit August 25, 2006". In the early 2000s, the wiki had to be closed for editing by the general public because of abuse, and this page seemingly lays dormant ever since.

If you never read the page, I recommend you take a look. The wiki in general is a great resource of programming wisdom and Agile methodology origin stories.

Now what I find striking is the fact that you've got the release date of the iPhone on one hand – 2007, with 12 years of technological advancements and the subsequent rise of the mobile development craze since –, and this wiki page's edit date of late 2006 on the other. So the iPhone, overall, is a newer technology than whatever the page currently reads.

And it does read a very simple but interesting thing: it proposed a software architecture that is composed of 4 layers for better maintainability. I have read about these layers in countless books, as long as these books were targeted at Java Enterprise developers. But not a single one of the popular books for iOS development targets this. I began to write about the topic of "software architecture" precisely for this reason: because I found it to be a very interesting, rewarding, and utterly underappreciated topic.

All we've got in the iOS/macOS scene so far is MVVM, VIPER, and maybe some Reactive/declarative approaches.

I develop my own apps with some kind of a layered architecture ever since, and I still enjoy doing it. It helps me develop the apps in a way that reduces entanglement a fair bit. It's great. I love it. 10/10, can recommend.

So give the wiki page a shot and think how you could benefit of a separation of your code into

  1. the UI layer,
  2. the Application or mediation layer that connects all the pieces,
  3. the Domain Model layer, where your dependency-less business-objects live, and
  4. the Infrastructure layer, where your networking and database connection code resides.

Browse the blog archive