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)

Sample application


The application we are going to prototype creates an online wholesale fresh-fruit shop, a market where in the evening goods that will be delivered to customers the next morning are traded. In this way, goods are not collected and handled until there is actually a buyer. The buyer buys goods that are actually available and will collect them the next morning to sell at a retail market.

Farmers inform about the availability of a certain quantity of fruit they offer, pointing out the main features that qualify the product.

Certified customers buy a certain quantity of different kinds of fruits.

At the time of ordering, the system ensures the full availability of goods (orders take place in real time). The order will be put in ACCEPTED status and the customer will be immediately notified. The customer can pay by credit card and get the goods early the next morning.

The following image contains an overview of the application:

Design

The first step in the use of DDD is the location...