Bernie Cook's Blog

Azure, C#, .NET, Architecture & Related Tech News


Book Review: “Implementing Domain-Driven Design″

Implementing-Domain Driven Design CoverI’m a big fan of the Domain-Driven Design (DDD) principles and patterns so pre-ordered Vaughn Vernon’s “Implementing Domain-Driven Design” prior to it’s release in March this year (2013). Having finished it earlier this week I wanted to do some justice to this invaluable text by posting a blog which provides a synopsis of each chapter, as well as some general commentary about the book.

If you don’t read any further let me say, before you go, that if you’re interested in learning about DDD, or want a modern and comprehensive DDD reference book, then get your hands on a copy. This text easily gets a 5 star rating from me, which is akin to the ratings on and at the time of writing. Continue reading


Repository Caching with Aspect Oriented Programming

Repository Caching with Aspect Oriented ProgrammingThis post provides a walkthrough of how to implement basic cache handling at the repository layer using Aspect Oriented Programming (AOP). I’ve chosen PostSharp’s AOP framework and built a relatively simple Domain-Driven Design (DDD) solution in .NET to illustrate how it all ties together.

I want delve into too much AOP detail up front other than to reiterate the usual AOP pitch – that it’s an incredibly useful programming paradigm which addresses cross-cutting coding concerns within application development. What does that mean in English? Once you’ve mastered the basic AOP terminology and implementation requirements you can use it to remove a lot of duplicate code that appears throughout your solution. If you’re not familiar with AOP then take a quick moment to watch one of PostSharp’s many introductory screencasts or browse through their documentation. Keep in mind that AOP isn’t OOP as you work your way through the following code, it complements OOP extremely well but doesn’t follow object-oriented principles. Continue reading