0% found this document useful (0 votes)
13 views21 pages

Aspect Oriented Architecture

Uploaded by

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

Aspect Oriented Architecture

Uploaded by

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

ASPECT ORIENTED

ARCHITECTURE
MOHAMMAD HOSSEIN SHOJAEINIA
PREFACE
• Nowadays, dominant programming paradigm is
Object-Oriented Architecture and Programming
• Very good and simple for software engineering and
analyses
• Useful in current software engineering methodologies
• OOA is a good idea, but has some limitations!
OBJECT-ORIENTED PROGRAMMING

• What is it?
• A programming paradigm that modularize code into
Objects

• What does it do?


• Simulate real-world objects in program
OBJECT-ORIENTED PROGRAMMING
(CONT’D)

• Components
• Class
• Smallest module in OOA
• Method
• Manipulate attributes, do functionalities, …
OBJECT-ORIENTED PROGRAMMING
(CONT’D)

• Advantages
• Good modularization (if correctly!)
• Readability
• Reusability (if good modularization!)
• Maintainability
•…
OBJECT-ORIENTED PROGRAMMING
(CONT’D)

• Disadvantages
• No addressing for cross-cutting concerns
• Hard to maintain
• Processes and Functionalities cause a lot of code
• Code duplication
•…
CROSS-CUTTING CONCERNS
• What is a concern?
• The term concern, refers to a part of the system that divided on basis
of functionality

• Primary concerns
• Single and specific functionality of primary requirements
• Like: Business logic
• Cross-cutting or System-wide concerns
• Applicable and effective on entire system
• Like: authentication, security, logging, transactions, …
OBJECT-ORIENTED ARCHITECTURE
Fruit
Shape
Color
Size

Apples Oranges Bananas

Storage Storage Storage


Sell Sell Sell
Buy Buy Buy
Crosscutting Concerns
HOW TO HANDLE THEM IN
PROGRAM?
ANY SOLUTION?
ASPECT-ORIENTED ARCHITECTURE
WILL HELP!
• This paradigm, addresses cross-cutting concerns as the top
priority
• Better separation for concerns (processes/functionalities)
• More reusable code
• Imagine a generic logging system, or a generic authentication system
(Django)
• Better will be using AOA (AOP)
AOA (AOP) ADVANTAGE

• Implementation is not forced on developer, ahead of


time (deadline)
• Sometimes, developer doesn’t know requirements ahead

• In AOA, implementation can be stopped if requirements


are not clear
• So code will be more clear
ASPECTS
• In AOP, cross-cutting concerns are implemented in
separate aspects and will be used then, instead of
embedding in classes (objects)

• Aspects are additional units of modularity


ASPECTS (CONT’D)
• Aspects can be reusable
• Imagine logging system, authentication,…

• Reducing code by aspect orientation, core of module


will be shown better than before!
ASPECTS (CONT’D)

• Aspect Weaver
• Composition mechanism that coordinates aspects with the
other modules of the system.
• Takes the aspects and core modules, then returns final
project
• Performed by a specialized compiler called Weaver
ASPECT-ORIENTED ARCHITECTURE IDEA

base/core
program
weave

aspec
t
final
system
AOA VS OOA

• Similarities
• Code modularization
• Code reusability
• Code maintainability
• Difference
• OOP creates classes based on real-world objects
• AOP creates aspects based on functionalities/processes
BEFORE

Financial Timecard Scheduling

Transaction Transaction Transaction


Security Security Security

Crosscutting Concerns
AFTER

Financial Timecard Scheduling

Transaction Security
NOTE!

• Aspect-oriented programming does not deprecate


Object-oriented programming

• Aspect-oriented programming completes it!


ANY QUESTION?
THANKS!
POWERED BY AYTENSOFT

You might also like