When I saw the diagram, it reminded me of Eric Evans’ book, Domain-Driven Design – Tackling Complexity in the Heart of Software. In chapter 4 of the book, Isolating the Domain, Eric talks about layering your applications into highly cohesive, yet loosely coupled areas of concerns, called layers:
This is really cool stuff, albeit much more complicated to actually develop than it is to describe in a paragraph or illustrate in a picture. And, as even Eric discusses in his book, layers can be overkill if “a project needs to deliver simple functionality, dominated by data entry and display, with few business rules [Evans p.76],” and difficult to create if you don’t have the necessary OOP skills to pull off a highly cohesive, loosely-coupled layered application. Eric references The Smart UI Anti-Pattern for your standard 2-tier database application
I agree with Jeffrey that I haven’t been able to find many open source, well architected, layered application from which to learn from, and the developer community could really benefit from such examples. I do have to say that the Enterprise Library code looks good in my opinion. Most of the examples on the Internet are more of the 2-tier database type applications, which promote placing much of the functionality and business rules into the UI. And we wonder why it is so difficult to find skilled developers who understand how to build layered, highly cohesive, and loosely coupled applications.
The reason I bring this up, is because many of the topics I have been discussing here are a stepping-stone to these ideas. The GRASP Patterns are a great foundation from which to learn the necessary skills to pull off these layered architectures. There are nine GRASP Patterns in total and I have briefly only touched upon the Information Expert GRASP Pattern. And, altough my examples were done quickly, I stumbled a number of times implementing the principle in the Create a Shopping Cart example, for which I will come out with another version
The book, Domain-Driven Design, talks about building and isolating a good domain model, but it isn’t a newbie book at all. Although I highly recommend the book, it requires a good grasp of OOP. The book I have recommended a few times, Applying UML and Patterns 3rd Edition by Craig Larman, is an excellent book to learning GRASP and fundamental OOP, which is a good prerequisite to Domain-Driven Design. Applying UML and Patterns is used as a textbook and hence written in a comforting style that introduces concepts slowly and logically.
Thanks to Jeffrey for his post as it got me thinking even more about how important these basic skills are needed in application design.