KEMBAR78
Summary of Aspect Oriented Programming | PPTX
Aspect Oriented Programming

      XProject Presentation
Aspect Oriented Programming (AOP)
•   Motivation
•   Usage
•   AspectJ
•   Benefit
•   AOP in .NET
•   Demo
    – Flight Center
    – Blog
    – GitHub
What is AOP?
• Motivation
  – Complexity
  – Crosscutting concerns
AOP Usage
•   Logging
•   Validation
•   Profiling
•   Security
•   Transaction management - Spring
AOP Concept




*.java
                                      *.aj
*.class bytecode
                                      *.class bytecode


                    .class bytecode
AspectJ
• Cross-cutting concern : parallel concern throughout the
  modules
• Joint point : a point in the execution of a program
• Pointcut : expression that selects one or more join points
• Advice : code to be executed at a join point selected by a
  pointcut
• Aspect ( Pointcut + Advice)
• Weaving : Java class bytecode + Aspect class bytecode
AOP
• So why AOP?
  – Encapsulate cross cutting concern
  – Better maintenance
  – Spring AOP provide schema based or annotation
    based AOP.
AOP in .NET
• http://www.springframework.net/
• http://www.sharpcrafters.com/aop.net
Demo
• Flight Center
• Apache Shiro
  – Open source security framework
• Blog
  – mjtoolbox.wordpress.com

Summary of Aspect Oriented Programming

  • 1.
    Aspect Oriented Programming XProject Presentation
  • 2.
    Aspect Oriented Programming(AOP) • Motivation • Usage • AspectJ • Benefit • AOP in .NET • Demo – Flight Center – Blog – GitHub
  • 3.
    What is AOP? •Motivation – Complexity – Crosscutting concerns
  • 4.
    AOP Usage • Logging • Validation • Profiling • Security • Transaction management - Spring
  • 5.
    AOP Concept *.java *.aj *.class bytecode *.class bytecode .class bytecode
  • 6.
    AspectJ • Cross-cutting concern: parallel concern throughout the modules • Joint point : a point in the execution of a program • Pointcut : expression that selects one or more join points • Advice : code to be executed at a join point selected by a pointcut • Aspect ( Pointcut + Advice) • Weaving : Java class bytecode + Aspect class bytecode
  • 7.
    AOP • So whyAOP? – Encapsulate cross cutting concern – Better maintenance – Spring AOP provide schema based or annotation based AOP.
  • 8.
    AOP in .NET •http://www.springframework.net/ • http://www.sharpcrafters.com/aop.net
  • 9.
    Demo • Flight Center •Apache Shiro – Open source security framework • Blog – mjtoolbox.wordpress.com