One of the nice things about the book is how the code tends to de-emphasize the application container by doing most of the work in the raw database access systems (e.g. JDBC), which makes it easy to understand what is going on but will offend the true J2EE believer. This makes the patterns in the book accessible to anyone coding in any environment, which I greatly appreciate.
One pet peeve is that some of the patterns are obvious shells for a single technique, such as the Transform View, which is really just XSLT. The text says as much, but shouldn't there be more than one example of a particular pattern in nature? It's just a pet peeve though, it's no reason to avoid the book.
Overall, the book is well written and edited and the graphics add to the exposition but are not gratuitous. It's a useful guide for anyone looking to raise the level of the enterprise application (read web application) thought up to the next level.
So what is the problem? The title is misleading. It is about patterns, but not really about enterprise applications. I am not in the subject of enterprise applications. I never ever have touched a program like SAP or a language like COBOL. But I encountered nearly every problem addressed in the patterns. Even the money class has corresponding problems in other fields: a Voltage has both a value and a unit. Also having complaints about the fact that 3 times 33% are less than 100% are always common.
What is this book about? It is basically about problems you have in moderately big applications. How do you connect a relational database with its structure and transactionality to a system, especially an object-oriented system (but not only)? And how do you connect to the user interface, especially a web interface. Also it contains a lot of useful small patterns at the end. As you can see: a lot of valuable stuff for many people. Yes and you get the deep judgments and fine humor of Martin Fowler too.
What is the main problem? This book is not really suited for actual reading. It contains an introductory part of a hundred and a reference part of four hundred pages. The introduction part is annoying to read. It is at the same time too simple (Some knowledge of relational databases should be a requirement for this book, and much more...) and too difficult (An extremely lot of forward references to patterns described later in this book). Also a lot of stuff is in the most trivial sense repeated within a few pages distance only. And it is repeated down to the wording of the individual sentences.
The reference part is a lot better. It gets better to read the further along you already read. The number of forward references gets less along the way. I liked especially the last part about base patterns. As their name already says they should have been much more to the beginning of the book.
This book contains an excellent book within it, just waiting to be "refactored" out of this collection of valuable thoughts. I firmly believe that Martin Fowler is well suited to do this refactoring job. I do sincerely hope that he does it for the next edition of the book. Most of the work is already invested and the result would be very valuable for many people. It is possible to write excellent and readable books about patterns as for example Buschmann et al in "Pattern Oriented Software Architecture" showed.
The book is particularly strong in describing how to map between a persistent relational database and an in-memory object representation of business logic. Fowler distills the various approaches to their essence, clearly presents the tradeoffs and defines an intuitive vocabulary to make it easier for development teams to discuss how the patterns apply to their unique application.
Highly recommended.
This book is a bit of a mishmash of different topics, but the vast majority of it (I'd say 75% or more) consists of ideas for object-relational mapping. Since most developers would use existing tools for object-relational mapping (in the Java realm, see Hibernate, JDO, etc.), I fail to see the real usefulness of this book for most developers building business (web) apps. Further, this kind of book encourages people who don't have the necessary expertise to try rolling their own OR mappers, which is simply not a good idea.
It's too bad, because the book starts off promisingly enough with 3 general approaches to business apps: Transaction Script: The procedural/transactional approach; Domain Model: The OO approach; and Table Module: The data-cetric approach. So far so good. Unfortunately the book then seems to steer off to the topic of "Fun With OR Mapping." It's not as sexy, but I think that's perhaps what the title of this book should have really been! The book then goes on to talk about different ways to architect Web applications, again mostly getting into how to develop framework code, which one largely would take for granted if one is deciding which framework to use rather than rolling one's own. Finally the book talks a bit about locking strategies (pessimistic, optimistic) and then presents a few generic items (e.g. the concept of a Money class or a Registry class).
Only a very small fraction of this book will be useful to a non-framework developer. Also, even though this book claims to be technology-agnostic, it seems rather firmly planted in the Java world. I'm not convinced an ASP/ADO.NET developer would find it particularly useful, for example. I think there is an important need to demonstrate how to put together solid business applications. I'd love to see a book of recipes that says "here's how to develop an ASP/ADO.NET app; here's how to develop using EJB; here's how to develop using Hibernate..." but without all the distracting details of how to implement the whole solution from scratch -- Basically I want a book that relies on the idea that frameworks are out there, but focuses the developer on how to choose a framework and how to take advantage of frameworks to produce solid, maintainable solutions.
Lastly, I would say Core J2EE Patterns from Sun Press is a more useful book for the Java/J2EE crowd, though it too suffers from framework-itis.
Lazy load - where an object will load only the data currently needed, but does maintain links to all other data that may be needed.
Front controller - a single handler object that consolidates all requests made for a web site. It can then send requests to the specific objects for services such as security, internationalization issues and specific displays targeted for particular users and locations.
Optimistic offline lock - used to prevent conflicts when concurrent business transactions are executing. The solution is to roll back the transaction when a conflict is detected.
Server session state - keeps the data for the session stored on a server in a serialized form.
While the examples are often of necessity extremely simple, they do illustrate some of the most effective and tested solutions to common software development problems. Therefore, this is a book that no builder of software that can be considered an enterprise application should be without. It is hard to believe that there is an enterprise application being constructed anywhere that does not involve the solving of many of the problems listed in this book.
My only complaint is the occasional bad English that appears. For example, on page 100 there is the phrase, "The only reason I've concentrating on Java . . . " and on page 119 the phrase "One factor that comes into this is comfortable used the development team is . . . " appears. While no book is error free, this type of error is frequent enough to make one wonder about the quality of the final editing.
There is nothing harder than making effective and efficient software that will run the IT equivalent of forever. That is what enterprise applications are supposed to do and if you are one of the minions tasked with doing your part to build one, then put yourself on the right path and read this book. You and everyone else who interacts with the software will be rewarded with a better experience.
Published in the online "Journal of Object Technology", reprinted with permission.
Fowler points out that none of these patterns are new (and many have been around for a long while), but never have I seen such a vast array of useful enterprise patterns so well documented.
I had heard and/or seen a lot of these patterns already, but the way he describes the patterns and the trade offs involved in choosing the patterns is truly awesome.
The first half of the book is a discussion of enterprise architecture in general. I particularly enjoyed the section 'Layering' and 'Organizing Domain Logic'. I could really relate to these discussions, and much of what is written relates to problems I face often in designing my applications.
I now have a much better understanding of what a true OO Domain model should look like, and I feel more comfortable in designing a fully OO business model.
Some of the patterns presented in relation to database mapping may not be so useful because there are a lot of OR mapping frameworks available to do this for us now. But I still find these patterns useful in understanding how to use an OR mapping framework correctly and how they work under the covers. And you may not always have access to such a framework.
I found the discussions on concurrency and transactions very valuable. I also think that the presentation patterns section is quite good too, although again there are a lot of presentation frameworks/tools available for this kink of thing like struts, webwork/velocity, asp.net etc.
The only thing that I think this book lacks is a discussion on how to link the layers of an application together. Maybe I will read the book again soon in case I missed something, but I don't think he talks about how to integrate a domain model with the presentation layer, and he kind of skips how to integrate a domain model to the database layer (he just says use mapping which is difficult).
I am giving this book 5 stars because it will change (has changed) the way I think about designing software in much the same way that reading a book like Gang of Four.
It's a dense and informative read. If you didnt know anything about cricket, you will by the end, as all its examples are basd on the game. I, sadly, find cricket deadly dull as a consequence of having it force fed at me in the UK educational system. This may bias me against the examples somewhat.
As to the content, well, it is a set of patterns focused on 'enterprise' applications. In this context, enterprise means server-side code connected to a database, usually with a Web Front end. Martin goes into superb depth on how to map from databases to java and .net objects, making you think about whether or not the stuff that your framework of choice gives you is the right tool for the job. Sadly, all that does is make you more aware of the failings of EJB, JDBC, whatever .NET has. Because, unless you are going to roll your own database bridge by hand, you are going to have to run with what they give you -whether it [stinks] or not.
I dont do much O/R mapping. I hand it off to tools like Castor and worry about my real problems: shipping web services to implausible deadlines to be managed by an operations team that phone me whenever something goes wrong. So my problems are web service related 'good API design', and 'executional patterns': how to design code that is easily tested, what is a good strategy for implementing configuration information, what is a good XML format for future flexibility. I also have to worry about the client side: how to architect a client that works well over long haul and intermittent links, and how to present this to the user.
Martin's book doesnt cover these kind of problems. I do like his critique of Entity EJBs (as opposed to session beans), where he observes that because EJBs are all distributable, people tend to do just that, leading to performance problems that are very profitable to him as a consultant.
The implicit message is that these days, he is spending his time tuning object to DB linkages, and not worrying about all the other aspects of the problem. Another reviewer mentioned security, but my concern is about designing for high availablity, a series of practises that focus on redundancy, caching, and interdependencies and self-diagnosis of faults, rather than caring about minutae of O/R binding.
So I'm giving the book 3-stars, as it doesn't suit my problems. Maybe it suits other people better.
-steve
1)First, Design Patterns is a very dense and scholarly read. It is also, frankly, a difficult read. However, after you have spent a couple of days trying to digest a pattern from Design Patterns, you realize, in many cases, you have had an experience with something profound. Even the GOF authors, in the preface, attempt to console readers by admitting "We didn't understand it all on the first writing!". Fowler's book, by contrast, is not on the same level, and can be understood on a first read. Perhaps this is what other reviewers were sensing when they indicated it was for the novice architect?
2) Fowler does NOT address security. How then,does the word "Enterprise" get the priviledge of adorning the title of his book? Enterprise design should be secure design. But, this will usually require a trade off --- more secure, less performance...or less secure, more scaleable...Fowler does not consider this. Example: A chapter is devoted to the "Table Data GateWay" pattern. The gateway pattern might be OK for J2EE...but it is not the most secure, or the best for performance,in .Net... The problem is it constructs its SQL statements in line, rather than using stored procedures. This allows SQL insertion attacks if your coders are sloppy, and also does not take advantage of the precompiled nature of sprocs.
3)There is a J2EE bias. This probably is a good thing as the J2EE architectures tend to be more mature and contain good ideas...but you should be aware of it if you are a .NET programmer. Not all of the patterns will be immediately useful to .NET, but will require a careful implementation.
4)Fowler passes on some of the tough questions. On page 93, while discussing RPC calls versus XML based messaging, he says "my preference is for a message - based approach that's inherently asynchronous." I agree. (RPC style is not the really suited for async, whereas document style messaging is) He then says it is too large of a topic, so does not cover it. Well, if it is the best way, it needs to be covered in an Enterprise level book, no?
While I may seem to be critical of Fowler's book, I really think it is excellent with fine ideas. But, especially if you are from .Net, implement the patterns with care, and then only you have checked against Microsoft best practices. This is not to say Microsoft is always right, but get the second opinion anyway.
A reader with a moderate experience architecting and designing industrial strength software systems will find at least some of the patterns familiar. You may actually enjoy reading this sort of patterns even more than those that are new to you: finding the validation of your own observations and ideas, as well as learning about new flavors and variations from the experience of others, can be a very satisfying process.
The book consist of two parts: The Narratives and The Patterns. The first part describes architectural patterns in general, their relationships, and the problems they help to solve. Here you will find chapters about layering, organization of domain logic, object-relational mapping, web presentation, system distribution strategies, etc. The second part is a collection of patterns with a similar organization.
Both parts of the book are written in a simple and clear narrative language. To get most value out of the book requires fluency in the UML; practically anyone with an object-oriented programming language experience will understand illustrative code snippets.
In short: if you want to learn the wealth of architectural ideas compiled by the experts from the real-world experience and not get bored along the way -- get this book.
What It Is
How to Use It
This rocks.
And as another reviewer mentioned, he addresses that huge headache, O-R mapping. This is a very good thing.
Go ahead, get it.
If you've read any of Fowler's other titles, the structure of this one will come as no surprise. The first have of the book discusses the patterns in "narrative" format, and the second half presents them in reference format. If you are new to this subject, I highly recommend reading through the narrative section to understand how the patterns fit together.
If you've been involved in enterprise application development before, chances are you can simply flip to the second half of the book and start skimming the patterns. Each is only a handful of pages long and is accompanied by a description, use cases and example code.
Like other "patterns" titles, if you've been doing software development for a while you'll read the patterns and think "oh.. of course, I did that in xyz project". The patterns themselves may not be groundbreaking and chances are you've seen them in some form, but having a well documented reference of them nearby will be an asset to any software development effort.