0% found this document useful (0 votes)
57 views25 pages

Aspect Oriented Software Development: Prepared By: Ebru Doğan

This document discusses aspect-oriented software development and programming. It introduces separation of concerns and how some concerns are cross-cutting and difficult to modularize. Aspect-oriented programming addresses this by encapsulating cross-cutting concerns into aspects that can be woven into the core functionality. The key concepts of aspect-oriented programming including join points, pointcuts, advice, and weaving are explained. Example technologies like AspectJ are also covered.

Uploaded by

Akira Tsubaki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views25 pages

Aspect Oriented Software Development: Prepared By: Ebru Doğan

This document discusses aspect-oriented software development and programming. It introduces separation of concerns and how some concerns are cross-cutting and difficult to modularize. Aspect-oriented programming addresses this by encapsulating cross-cutting concerns into aspects that can be woven into the core functionality. The key concepts of aspect-oriented programming including join points, pointcuts, advice, and weaving are explained. Example technologies like AspectJ are also covered.

Uploaded by

Akira Tsubaki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

ASPECT ORIENTED

SOFTWARE
DEVELOPMENT

Prepared By: Ebru Doğan


Presentation Outline

1. Current Methods and Languages


2. Separation of Concerns (SOC)
3. Problem: cross-cutting
4. Concepts of Aspect-Oriented Development
5. Aspect Oriented Programming (AOP)
6. Applications: Tracer example
7. Integration Aspects and Components
8. Conclusions
9. References
Current Methods and Languages

 Support abstraction mechanisms for breaking


a system down into components
 Concentrate on finding and composing
functional units
Benefits of Good Modularity
 Also known as “clean separation of
concerns”
 no scattered code
 no tangling
 highly cohesive & loosely coupled
Separation of Concerns - Cohesion

 Cohesive component performs only one


concern/task
Separation of Concerns - Coupling

 Two components are independent if they do not


have interactions
 Highly coupled components have many
dependencies/interactions
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
Examples of crosscutting concerns
 Synchronization
 Real-time constraints
 Error-checking
 Object interaction constraints
 Memory management
 Persistency
 Security
 Caching
 Logging
 Monitoring
 Testing
 Domain specific optimization
 ...
Example - Figure Editor - Design
Figure Editor Example –cont’d
Crosscutting Concern - Example
Aspect-oriented development
 Aspect-oriented development addresses separation
of concerns (SOC)
 Concerns are associated with cross-cutting
 Cross-cutting concerns are implemented as aspects
and are dynamically woven into a program
Motivation for
Aspect-Oriented Programming
 Programming paradigm for encapsulating
crosscutting concerns into aspects.
 AOP builds on top of other programming paradigms:
object-oriented, procedural or functional. It does not
supplant them.
Key Abstractions for
Different Programming Paradigms

Paradigm Abstraction Modularization

Structured control flow control structure


programming

Procedural computations procedure


programming

Object-oriented data types class/object


programming

Aspect-Oriented crosscutting aspect


programming concerns
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.
Concepts of AOP (II)

 Weaving
Few Examples of Existing
AOP technologies

 AspectJ
 HyperJ
 AspectC++
 Aspect#
 Caesar
 CompositionFilters
 AspectWerkz
 JBoss-AOP
Most Popular AOP technology

 AspectJ
 a general purpose AO programming language
 just as Java is a general-purpose OO language
 extension to Java
AspectJ

 Five simple steps to create an AOP


1. Define the core/base functionality classes
2. Define the aspect class
3. Define the pointcut
4. Declare the advice
5. Weave & Compile
Tracer Example – Without AOP
Tracer Example – With AOP
Advantages of AOP

 Improves performance
 Allows better code reuse
 Enables better code encapsulation
Componentizing Aspects

 Representing each aspect as a single


reusable component
 Map the characteristics of a component on
aspect
 Explore the applicability of concepts on
aspect
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.
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

You might also like