back Patterns of Enterprise App. Architecture

Patterns of Enterprise App. Architecture

Martin Fowler

Coming from the oft-maligned background of PHP development, I'm always on the look out for anything that helps me write better code. For me, good code should be economical, easy to understand and easy to maintain. If a book can improve my development skills and make me sound important then all the better. Patterns of Enterprise Application Architecture (PoEAA) is a book that ticks all these boxes - especially the “important” box! As Martin highlights within the first page:

I tend to look at ‘architecture’ as one of those impressive-sounding words, used primarily to indicate we’re talking about something that’s important.”

In all seriousness, PoEAA is an excellent book. The book is mainly based around the “enterprise” languages of Java and C# - chosen because they “seem to be the languages that the largest number of professional rogrammers can read.” I couldn’t agree more. The clear and concise examples are easy to understand; it does not matter whether they are in the same language you require. And really this is the key point of the book. As Martin says:

It’s absolutely essential to understand the example is not the pattern.”

The book, like all “pattern” books, aims to provide a common vocabulary that can be used when discussing problems to which these patterns relate. It does not aim to provide twenty sections of code that you can reuse as-is within your own projects. Martin really hammers this message home by dedicating the first part of the book (“The Narratives”) to a broad discussion about layering, domain logic and other architectural topics. Each chapter is explained in a way that incorporates the patterns in the language of the book.

Using a Domain Model (116) as opposed to a Transaction Script (110) is the essence of the paradigm shift that object-oriented people talk about so much.”

Within each section, Martin explains many patterns available to the programmer, clearly identifying potential pros and cons of each approach. It is left up to the programmer to apply the pattern to their own problem. The patterns are merely a “starting point”.

Specific topics covered include web presentation patterns (MVC, page controller, front controller...), data source architectural patterns (table data gateway, row data gateway, active record, data mapper) and object-relational behavioural patterns (unit of work, identity map, lazy load).

PoEAA is eminantly readable - in fact it is one of the programming books I have found easiest to read. This may be because it is closely connected with problems I encounter within my own work. I would say this is absolutely essential reading to anyone who builds or works on web applications - especially those within the PHP world!

9/10

Buy now from Amazon