The practice of enterprise application development has benefited from the emergence of many new enabling technologies. Multi-tiered object-oriented platforms, such as Java and .NET, have become commonplace. These new tools and technologies are capable of building powerful applications, but they are not easily implemented. Common failures in enterprise applications often occur because their developers do not understand the architectural lessons that experienced object developers have learned. Patterns of Enterprise Application Architecture is written in direct response to the stiff challenges that face enterprise application developers. The author, noted object-oriented designer Martin Fowler, noticed that despite changes in technology--from Smalltalk to CORBA to Java to .NET--the same basic design ideas can be adapted and applied to solve common problems. With the help of an expert group of contributors, Martin distills over forty recurring solutions into patterns. The result is an indispensable handbook of solutions that are applicable to any enterprise application platform. This book is actually two books in one. The first section is a short tutorial on developing enterprise applications, which you can read from start to finish to understand the scope of the book's lessons. The next section, the bulk of the book, is a detailed reference to the patterns themselves. Each pattern provides usage and implementation information, as well as detailed code examples in Java or C#. The entire book is also richly illustrated with UML diagrams to further explain the concepts. Armed with this book, you will have the knowledge necessary to make important architectural decisions about building an enterprise application and the proven patterns for use when building them. The topics covered include * Dividing an enterprise application into layers * The major approaches to organizing business logic * An in-depth treatment of mapping between objects and relational databases * Using Model-View-Controller to organize a Web presentation * Handling concurrency for data that spans multiple transactions * Designing distributed object interfaces
......(更多)
......(更多)
......(更多)
任何对象可能作为远程对象使用时,经常需要一个粗粒度的接口来减少完成某些任务所需要的调用次数。这不仅会影响你的方法调用,同样还会影响你的对象。现在,一个调用中就会包括访问和更改订单及订单的功能,而不会像以前那样分开调用,这会完全影响你的对象结构。你将不得不放弃小粒度对象和小粒度方法带来的清晰意图和小粒度控制所带来的好处。编程变得困难,并且会使生产率下降。
一个远程外观是一个粗粒度的外观(facade),它建立在大量的细粒度对象之上。所有细粒度对象都没有远程接口,并且远程外观不包括领域逻辑。远程外观所要完成的功能是把粗粒度的方法转换到低层的细粒度对象上。 任何外观都应该是一层薄薄的皮肤并且只负责很小一部分责任。
......(更多)