Patterns, Domain-Driven Design (DDD), and Test-Driven Development (TDD) enable architects and developers to create systems that are powerful, robust, and maintainable. Now, there's a comprehensive, practical guide to leveraging all these techniques primarily in Microsoft .NET environments, but the discussions are just as useful for Java developers.
Drawing on seminal work by Martin Fowler (Patterns of Enterprise Application Architecture) and Eric Evans (Domain-Driven Design), Jimmy Nilsson shows how to create real-world architectures for any .NET application. Nilsson illuminates each principle with clear, well-annotated code examples based on C# 1.1 and 2.0. His examples and discussions will be valuable both to C# developers and those working with other .NET languages and any databases–even with other platforms, such as J2EE. Coverage includes
- Quick primers on patterns, TDD, and refactoring
- Using architectural techniques to improve software quality
- Using domain models to support business rules and validation
- Applying enterprise patterns to provide persistence support via NHibernate
- Planning effectively for the presentation layer and UI testing
- Designing for Dependency Injection, Aspect Orientation, and other new paradigms
Review By: Victor Goldberg, Ph.D.
06/23/2010Applying Domain-Driven Designs and Patterns is about the use of the Domain Model Pattern—as described by Martin Fowler—as a motivator for software architectural design. This pattern’s approach is to map a simplified view of the reality of the problem domain using an object-oriented model.
The book is focused on the author Jimmy Nilsson's practice and what he learned in light of his own experience. He has kept up with the latest developments in software development and describes the techniques suggested by others and explains why some worked for him and some did not. So, even though the approach is on solid theoretical ground, the main interest is on what happens when the theory is used for practical projects. When there is more than one possible way of doing things, the reasons for choosing one are explained.
Following the object-oriented approach, the book is divided into four separate, yet connected parts: Background, Applying Domain Driven Design, Using Patterns of Enterprise Architecture, and What’s Next.
The first hundred pages, divided into four chapters, are dedicated to presenting the background for the architectural approach. The core discussion takes the next four chapters, while the rest of the book is dedicated to applications and design techniques to embrace. Additionally, there are two appendices: one dedicated to other domain model styles and the other presenting a catalog of discussed patterns.
The main value of the book is that it was written by a person who tried many approaches published by others and separated the chaff from the wheat. His descriptions are detailed enough to be valuable guidelines for those that want or need to follow his trail. The style is reader friendly, but sometimes a little too familiar. Nobody would accuse Nilsson of writing as a pedant. His approach is to use simple language and easy sentence structure.
This is quite a comprehensive book and has much food for thought. Nilsson follows the guidelines of agile development, where QA and testing are integrated into the development process. So, the book is relevant to both disciplines.