Archive for July, 2010|Monthly archive page

Design Patterns 2 – The Enterprise version

Back in May I suggested that ever developer should read the “Gang of Four’s” (or GoF if you’re trying to be really cool and pick up girls) “Design Pattern’s: Elements of reusable object oriented software”. While this is a great book, it was written before enterprise databases and database-access were ubiquitous and before XML was even invented or SOA was the buzzword of the year (hell, it was written before the .NET boom/bust, which was like a long time ago ;-); which is to say, that the patterns presented in GoF area really great and really important but they’re only the beginning…

The book that takes your “Design Pattern Toolbox”™ 😉 to the next level is Patterns of Enterprise Application Architecture” by Martin Fowler.

Like the GoF book, this one opens with a collection of very well written narratives covering:

  • Application layering (wonderful stuff)
  • Organizing domain logic (key information you need to know)
  • Mapping to relational databases (very good stuff)
  • Web presentation and session state
  • Concurrency (pretty rare back in the ’90’s but now ubiquitous with multi-core processors)
  • Distribution strategies
  • And a final “Putting it all together” chapter

Section 2 of the book then contains all the design patterns. I suggest you follow my previous advice on reading a design pattern book but not abusing your new-found power knowledge.

Some of the patterns I have used most are:


PS. If you’re actually trying to pick up girls, using “GoF” will only help you pick up really geeky girls…

Problems and Solutions with Model-View-ViewModel

My MSDN article on the MVVM design pattern is finally available!

Unfortunately, Figure 1 is not correct;  we’re working on getting that fixed in the article. In the meantime here’s a corrected version:

  • The WPF Utilities component should not depend on any unit tests
  • The unit test components should not depend on any other unit testing component
  • The domain model should NOT depend on the data access layer.  Instead, the data access layer should depend on the domain model.  The domain model is the core of everything.  Acthieving this is not easy, and I’ll post about how to achieve it.

Let me know what you think of the article!