Book Image

Spring 2.5 Aspect Oriented Programming

Book Image

Spring 2.5 Aspect Oriented Programming

Overview of this book

Developing powerful web applications with clean, manageable code makes the maintenance process much easier. Aspect-Oriented Programming (AOP) is the easiest and quickest way to achieve such results. Spring is the only Java framework to offer AOP features. The combined power of Spring and AOP gives a powerful and flexible platform to develop and maintain feature-rich web applications quickly. This book will help you to write clean, manageable code for your Java applications quickly, utilizing the combined power of Spring and AOP. You will master the concepts of AOP by developing several real-life AOP-based applications with the Spring Framework, implementing the basic components of Spring AOP: Advice, Joinpoint, Pointcut, and Advisor. This book will teach you everything you need to know to use AOP with Spring. It starts by explaining the AOP features of Spring and then moves ahead with configuring Spring AOP and using its core classes, with lot of examples. It moves on to explain the AspectJ support in Spring. Then you will develop a three-layered example web application designed with Domain-Driven Design (DDD) and built with Test-Driven Development methodology using the full potential of AOP for security, concurrency, caching, and transactions.
Table of Contents (13 chapters)

Domain-Driven Design


DDD is not a technology or methodology. It is a way of thinking and a set of priorities aimed at accelerating software projects that have to deal with complicated domains (http://www.domaindrivendesign.org ).

For many years, designing and realizing JEE application has meant moving Data Transfer Objects (DTO) and Value Objects (VO) between layers and writing procedural code to allow Enterprise JavaBeans (EJB) to do their work.

This led to the use of classes that were defined as anemic by Martin Fowler (http://martinfowler.com/bliki/AnemicDomainModel.html), that's to say, classes where the business logic is completely separate from the domain objects; usually it is in a service layer, which uses the domain classes as classes of data.

The business logic is contained in services using anemic domain models. But as we have seen, the application works in a procedural way, and is not object-oriented. The objects are mere carriers of data realized as DTO or VO, with only the...