Spring 2.5 Aspect Oriented Programming


Spring 2.5 Aspect Oriented Programming
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$20.40
save 15%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
$60.39
save 6%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters

Book Details

Language : English
Paperback : 332 pages [ 235mm x 191mm ]
Release Date : February 2009
ISBN : 1847194028
ISBN 13 : 9781847194022
Author(s) : Massimiliano Dessì
Topics and Technologies : All Books, Application Development, Java, Open Source, Web Development


Table of Contents

Preface
Chapter 1: Understanding AOP Concepts
Chapter 2: Spring AOP Components
Chapter 3: Spring AOP Proxies
Chapter 4: AspectJ Support
Chapter 5: Design with AOP
Chapter 6: Three-tier Spring Application, Domain-Driven Design
Chapter 7: Three-tier Spring Application, Tests and AOP
Chapter 8: Develop with AOP Tools
Index
  • Chapter 1: Understanding AOP Concepts
    • Limits of object-oriented programming
      • Code scattering
      • Code tangling
    • The AOP solution
    • What Spring provides in terms of AOP
      • Programmatic way
        • Before advice
        • After returning advice
        • Around advice
        • After throwing advice
      • The old Spring XML way
    • AOP with IoC in Spring 2.5
      • AspectJ annotations
        • Before advice
        • After returning advice
        • Around advice
        • After (finally) advice
        • After throwing advice
      • Schema-based configuration
        • Before advice
        • After advice
        • After returning advice
        • After throwing advice
        • Around advice
    • Summary
  • Chapter 2: Spring AOP Components
    • Aspect
    • Pointcut
      • Pointcut and its components
        • NameMatchMethodPointcut
        • RegexpMethodPointcut
        • StaticMethodMatcherPointcut
        • DynamicMethodMatcherPointcut
    • Operations on Pointcut
      • ComposablePointcut
      • ControlFlowPointcut
      • Pointcut constants
  • Joinpoint
  • Advice
    • Before advice
    • After returning advice
    • After throwing advice
  • Advisor
  • Introductions
  • Summary
  • Chapter 3: Spring AOP Proxies
    • Proxy
    • JDK proxy
    • CGLIB proxy
    • Creating proxies programmatically
      • ClassicProxy
      • AspectJProxy
    • ProxyFactoryBean
      • ProxyFactoryBean and proxies
      • ProxyFactoryBean in action
      • Advised objects
    • Autoproxy
      • Autoproxy with classic Spring
        • BeanNameAutoProxyCreator
        • DefaultAdvisorAutoProxyCreator
        • AbstractAdvisorAutoProxyCreator
      • AutoProxyCreator with metadata
      • Autoproxy with AspectJ
      • Autoproxy with annotation
      • Autoproxy with XML Schema
    • Target sources
      • Hot swappable target sources
      • Pooling target sources
      • Prototype target sources
      • ThreadLocal target source
    • Summary
  • Chapter 4: AspectJ Support
    • AspectJ annotations
      • Aspect
      • Pointcut
        • execution
        • within
        • this
        • target
        • args
        • @target
        • @args
        • @ within
        • @ annotation
        • bean
      • Selection on methods' names
      • Selection on types of argument
      • Selection on type of return
      • Selection on declared exceptions
      • Selection on hierarchy
      • Selection on annotations
      • Binding advice arguments
        • JoinPoint
        • Binding arguments
        • Binding of return values
        • Exception binding
        • Annotation binding
      • Advice
        • @Before
        • @AfterReturning
        • @AfterThrowing
        • @After
        • @Around
      • Introduction
    • XML Schema-based configuration
      • Aspect
      • Pointcut
      • Advice
        • Before advice
        • After returning advice
        • After throwing advice
        • After (finally) advice
        • Around advice
      • Introduction
      • Advisors
    • Recipes
      • Dependency injection in domain objects
      • Advice ordering
      • Configuration mixin
      • Aspect instantiation model
    • AspectJ weaving in Spring
      • Load-time weaving with Spring
      • Load-time weaving with AspectJ
      • AOP strategy considerations
    • Summary
  • Chapter 5: Design with AOP
    • Concurrency with AOP
    • Transparent caching with AOP
    • Security with AOP
      • Securing methods with security interceptors
      • Securing methods with pointcuts
      • Securing methods with annotations
    • Summary
  • Chapter 6: Three-tier Spring Application, Domain-Driven Design
    • Domain-Driven Design
      • Roles and responsibilities
        • Entities
        • Aggregates
        • Modules
        • Value objects
        • Factories
        • Repositories
        • Services
      • Architecture
        • User interface
        • Application layer
        • Domain layer
        • Infrastructure layer
    • Sample application
      • Design
      • Services
      • Factories
      • Repositories
    • Summary
  • Chapter 8: Develop with AOP Tools
    • Java Development Kit
    • Spring
    • Eclipse
    • Eclipse plug-ins (Linux, MacOSX, and Windows)
      • SpringIDE
      • AJDT
    • Apache Tomcat
      • Ubuntu Linux
      • MacOSX
      • Microsoft Windows
      • Common steps for Linux, MacOSX, and Windows
    • PostgreSQL
      • Ubuntu Linux
      • MacOSX
      • Microsoft Windows
      • Common steps for Linux, Apple MacOSX, and Microsoft Windows
      • JDBC Driver
      • Summary

Massimiliano Dessì

Massimiliano Dessì is an experienced Java developer, who started developing JEE applications in 2000. In 2004 he discovered the Spring Framework 1.0, and since then he has been one of its most enthusiastic users.

He works as a Software Architect and Engineer for Sourcesense (http://www.sourcesense.com), one of the leading European Open-Source System Integrators. Before joining Sourcesense, he worked as software architect for CRS4 (http://www.crs4.it). He's also an active technical writer, author of various articles, publications, and reviews available on http://www.jugsardegna.org/vqwiki/jsp/Wiki?MassimilianoDessi and on http://www.slideshare.net/desmax74/slideshows.

Massimiliano is also a frequent speaker at Users Groups conferences, including, Java Users Groups, SpringFrameworkUser Group, Javaday, and Linux Users Groups. He is one of the founders of Java User Group Sardinia (https://jugsardegna.dev.java.net/ and http://www.jugsardegna.org), the founder of "Spring Framework Italian User Group", "Jetspeed Italian User Group" and "Groovy Italian User Group".

He maintains a personal weblog at: http://jroller.com/page/desmax and lives in Cagliari, Sardinia with his family.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Spring 2.5 Aspect Oriented Programming +    Python Network Programming Cookbook =
50% Off
the second eBook
Price for both: $34.95

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Learn how Aspect-Oriented Programming can support Object-Oriented Programming to solve problems in the implementation phase
  • Write clean and concise code by implementing concurrency control in cross-cutting functionalities to manage code easily and create applications quickly
  • Realize a dynamic proxy with JDK, by implementing an interface that manages invocations
  • Realize the structural behavior of the pattern proxy design pattern by applying the crosscutting concerns of security, logging, and transactionality to specific Joinpoints
  • Simplify applying Advices through using AspectJ annotations
  • Develop better applications by handling important functionalities such as transaction management, application logging, exception management, and layout
  • Learn how the AOP enabled by the Spring Framework and Inversion of Control (IoC), can help you to remove the implementation compromises in applications
  • In Detail

    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.

    Approach

    Employing a comprehensive tutorial-based approach, this easy-to-follow book shows the reader various means of using AOP with Spring in a real-world scenario. Clear step-by-step instructions ensure that you will not get lost in the new world of AOP and Spring.

    Who this book is for

    If you are a Java software architect, engineer, or developer and want to be able to write applications in a more modular and concise way by using Spring, then you need this book. Readers need basic knowledge of Spring and its configuration.

    Code Download and Errata
    Packt Anytime, Anywhere
    Register Books
    Print Upgrades
    eBook Downloads
    Video Support
    Contact Us
    Awards Voting Nominations Previous Winners
    Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
    Resources
    Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software