1 / 25

ASPECT ORIENTED SOFTWARE DEVELOPMENT

ASPECT ORIENTED SOFTWARE DEVELOPMENT. Prepared By: Ebru Doğan. Presentation Outline. Current Methods and Languages Separation of Concerns (SOC) Problem: cross-cutting Concepts of Aspect-Oriented Development A spect Oriented Programming (AOP) Applications: Tracer example

louises
Download Presentation

ASPECT ORIENTED SOFTWARE DEVELOPMENT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ASPECT ORIENTEDSOFTWARE DEVELOPMENT Prepared By: Ebru Doğan

  2. Presentation Outline • Current Methods and Languages • Separation of Concerns (SOC) • Problem: cross-cutting • Concepts of Aspect-Oriented Development • Aspect Oriented Programming (AOP) • Applications: Tracer example • IntegrationAspects and Components • Conclusions • References

  3. Current Methods and Languages • Support abstraction mechanisms for breaking a system down intocomponents • Concentrate on finding and composing functional units

  4. Benefits of Good Modularity • Also known as “clean separation of concerns” • no scattered code • no tangling • highly cohesive & loosely coupled

  5. Separation of Concerns - Cohesion • Cohesive component performs only one concern/task

  6. Separation of Concerns - Coupling • Two components are independent if they do not haveinteractions • Highly coupled components have manydependencies/interactions

  7. Modularity is not always possible... • Some concerns don’t localize to objects … their code tends to be orthogonal to the rest of the requirements … and is spread out through many modules

  8. Examples of crosscutting concerns • Synchronization • Real-time constraints • Error-checking • Object interaction constraints • Memory management • Persistency • Security • Caching • Logging • Monitoring • Testing • Domain specific optimization • ...

  9. Example - Figure Editor - Design

  10. Figure Editor Example –cont’d

  11. Crosscutting Concern - Example

  12. Aspect-oriented development • Aspect-oriented development addressesseparation of concerns (SOC) • Concerns are associated with cross-cutting • Cross-cutting concerns are implemented as aspects and are dynamically woven into a program

  13. Motivation forAspect-OrientedProgramming • Programming paradigm for encapsulating crosscutting concernsintoaspects. • AOP builds on top of other programming paradigms: object-oriented, procedural or functional. It does not supplant them.

  14. Key Abstractions for Different Programming Paradigms

  15. Concepts of AOP (I) • Aspect: unit encapsulating a crosscutting concern. • Join point: point in the execution of a program where an aspect might intervene. • “[...] whenever condition C arises, perform action A” • Pointcut:expression of a subset of join points (condition C) • Advice: piece of code for action A. • Pointcuts and advice encapsulated into aspects.

  16. Concepts of AOP (II) • Weaving

  17. Few Examples of ExistingAOPtechnologies • AspectJ • HyperJ • AspectC++ • Aspect# • Caesar • CompositionFilters • AspectWerkz • JBoss-AOP

  18. Most Popular AOP technology • AspectJ • a general purpose AO programminglanguage • just as Java is a general-purpose OO language • extension to Java

  19. AspectJ • Five simple steps to create an AOP • Define the core/base functionality classes • Define the aspect class • Define the pointcut • Declare the advice • Weave & Compile

  20. Tracer Example – Without AOP

  21. Tracer Example – With AOP

  22. Advantages of AOP • Improves performance • Allows better code reuse • Enables better code encapsulation

  23. Componentizing Aspects • Representing each aspect as a singlereusable component • Map the characteristics of a componenton aspect • Explore the applicability of conceptson aspect

  24. Conclusions • Crosscutting concerns are typically scattered over several modules and result in tangled code. • This reduces the modularity and as such the quality of the software system. • AOSD provides explicit abstractions mechanisms to represent these so-called aspects and compose these into programs. • Increases the modularity of systems.

  25. References • http://www.aosd.net/ • http://www.eclipse.org/aspectj/ • http://en.wikipedia.org/wiki/Aspect-oriented_programming • http://csl.ensm-douai.fr/fakih/phd • [Fil05] “Aspect-Oriented Software Development” by R.Filman et al., ISBN: 0321219767

More Related