Mar 09 2009

Book review: Microsoft .NET: Architecting Applications for the Enterprise

Category: Uncategorizedbengtbe @ 08:17

Authors: Dino Esposito & Andrea Saltarello
Publisher: Microsoft Press
Purchase: Amazon.com, Amazon.co.uk

Introduction

I first heard of this book when Jeremy Miller (the maker of StructureMap) wrote that he was impressed by it. So I decided to purchase it, and now I have finished reading it. Before I give my conclusion, lets start with a summary of the different chapters in the book.

1. Architects and Architecture Today

Discusses the design of architecture and the role of the architect. Also gives a brief overview of different models for software development: Waterfall, Agile and Microsoft Solutions Framework.

2. UML Essentials

Covers the most important UML diagram types – Use Case, Class, and Sequence Diagrams. Describes three main modes of using UML – Sketch mode (emerging design), Blueprint mode (up front design), and Programming mode (Model-Driven Architecture).  The authors prefer to use UML as a sketching tool to communicate ideas, which seems like a sensible choice.

3. Design Principles and Patterns

Looks at goals of design principles and design – High Cohesion, Low Couping, and Separation of Concerns. Also looks at more advanced Object-Oriented Design principles – Open/Closed Principle, Liskov’s Substitution Principle, and Dependency Inversion Principle. Aspect-Oriented programming (AOP) is also explained by looking at Microsft’s Policy Injection Application Block.

This concludes the first part of the book, the rest of it looks at how to design a system by going through each application layer.

4. The Business Layer

Discusses different ways to organize business logic. The business logic can either be organized around user actions or around the domain. When organizing the logic around user actions, either the Transaction Script (TS) or Table Module (TM) pattern can be applied. These are best suited for low complexity in the domain. When organizing around the domain a Domain Model (DM) pattern can be applied. This pattern can deal with high complexity in the domain.

5. The Service Layer

The service layer is placed between the presentation layer and the business layer, it can also be thought as the upper part of the business layer. It basically is a list of actions that can be triggered from the user interface. One of its main responsibilities is dealing with roles and security. The chapter also discusses the following patterns that are related to the service layer – the Remote Facade Pattern, the Data Transfer Object Pattern, and the Adapter Pattern. It has a good discussion on when to use DTO’s and when it can be considered overkill. It gives a brief introduction to Service-Oriented Arhcitecture (SOA). Finally, it discusses the Serivice Layer in regards to AJAX.

6. The Data Access Layer

Starts off with a discussion of the responsibilities of a Data Access Layer (DAL), and how it “communicates” with the other layers. Then it describes patterns and principles to use when manually designing your own DAL – Service Locator, Inversion of Control, Transactions, Data Context, Query by Criteria, Unit of Work, Concurrency, and Lazy Loading. Afterwards it looks how an Object/Relational Mapper (OR/M) tool can be used to power the DAL, using NHibernate as an example. The authors consider NHibernate to be the de facto standard for O/RM tools, while Entity Framework (EF) is not yet mature enough. At the end of the chapter there is a great section called “To SP or Not to SP”, where the authors dispel many myths about Stored Procedures. At last, a book from Microsoft where SP are not described as the core of a DAL :)

7. The Presentation Layer

Presents the responsibilities of the presentation layer, and splits it into two segments – the user interface and presentation logic. Gives a great overview of the evolution of presentation patterns – Autonomous Views (AV), Model-View-Controller (MVC), Model2, Model-View-Presenter (MVP), and Presentation Model (PM). Also shows examples from different presentation frameworks – Web Client Software Factory, ASP.NET MVC Framework, MVC# Framework, and Windows Presentation Foundation.

Conclusion

I truly recommend this book to both intermediate and senior .NET developers. It has a great coverage of many current thoughts and aspects of system architecture. Many of the patterns in the book are from Patterns of Enterprise Application Architecture by Martin Fowler, and the book sets them into perspective in an enterprise .NET application. I like that a Microsoft Press book describes and even recommends Open Source tools, e.g. the book recommends NHibernate over Entity Framework. Dino’s writing is very consise and clear, and the book is full of code-examples, not just theory. However, since the scope of the book is very big, it cannot go into too much detail. So don’t expect to learn all you need about e.g. Domain Driven Design or NHibernate by reading this book.

Overall I give this book 4.5 of 5 stars :)

kick it on DotNetKicks.com Shout it

Tags: ,

8 Responses to “Book review: Microsoft .NET: Architecting Applications for the Enterprise”

  1. asp.net books says:

    Thanks i was thinking of buying this book but could find a good review until now…

  2. Australia marketing lists says:

    Very interesting. For its thorough coverage on Architecting applications for the enterprise, I do think its worth shelling $26 for! Just what I was looking for!

  3. Large Print Reader says:

    Glad to see a thorough review of this book. The best computer book I’ve recently read is Lawrence Lessig’s [i] Code, Version 2.0[/i]. I got it in large print at http://www.readhowyouwant.com/catalog/book-detail.aspx?book-id=14964

  4. regcure review says:

    Thanks for this in-depth review. I had been considering this book and found this via google.

  5. book publishers uk says:

    This book is great for anyone who wants to learn .NET but doesn’t know where to begin. It’s well laid out and explains are the main principles very well and in fine detail. It’s quite light hearted too.

  6. Terry bio says:

    I have to agree with this post.

  7. waggi says:

    Great post.

  8. Felix De Light says:

    Thanks i was thinking of buying this book but could find a good review until now…

Leave a Reply