« 上一篇 | 下一篇»

Basic Definitions and Concepts of AOP

  • Concern A particular issue, concept or area of interest for an application. Examples include transaction management, persistence, logging and security.
  • Crosscutting Concern A concern in which the implementation cuts across many classes. These are often difficult to implement and maintain with OOP.
  • Aspect The modularization of a crosscutting concern; implemented by gathering and isolating code.
  • Join Point A point during the execution of a program or class. In Spring's AOP implementation, a join point is always a method invocation. Other examples include accessing fields, where read or write access occurs on an instance variable, and exception handling.
  • Advice An action taken at a particular join point. Different types of advice in Spring include around, before, throws and after returning. Of these, around is the most powerful, as you get the opportunity to do something before and after a method is invoked. The previous TraceInterceptor used around advice by implementing the AOP Alliance's MethodInterceptor.
  • Pointcut A set of join points specifying when an advice should fire. Pointcuts often use regular expressions or wildcard syntax.
  • Introduction Adds fields or methods to an advised class. Spring allows you to introduce new interfaces to any advised object. For example, you could use an introduction to make any object implement an IsModified interface, to simplify caching.
  • Weaving Assembles aspects to create an advised object. This can be done at compile time (this is how AspectJ does it) or at runtime. The Weaving Strategies section later in this chapter discusses in detail the different strategies for weaving (that is, implementing AOP).
  • Interceptor An AOP implementation strategy, where a chain of interceptors may exist for a particular join point.
  • AOP Proxy An object created by the AOP framework, including advice. In Spring, an AOP proxy will be a JDK dynamic proxy or a CGLIB proxy.
  • Target Object An object containing the join point. In frameworks using interception, it's the object instance at the end of an interceptor chain. Also called an advised or proxied object.

(2) 评论    (92) 引用   

Total 2 Comments on "Basic Definitions and Concepts of AOP"

  1. PITTSAmanda26 said: answer this topic

    17/06/2010, at 17:23 [ 回复 ]

    Nowadays, lots of people are sure that the admission services should be the perfect place to purchase term paper at. Moreover, that is very good way to improve the writing skills!

  2. lacewigs said: good job

    12/07/2010, at 02:52 [ 回复 ]

    Sexy Sexy Lingerie is an online lingerie store selling designer lingerie including Shirley of Hollywood, Dreamgirl and Hustle
    Sexy Costumes
    sexy nurses costume
    sexy Sports costume
    Vinyl Lingerie
    lingerie sale

发表评论

称呼 (required)

标题

个人主页(可选)

邮箱地址(可选)

Auth Image