Download - Aspect Oriented Software Development
Otavio Ferreira (@otaviofff) Technical Architect, Scrum Master Oct 2007
• AOSD tag cloud
October 2007 MIH SWAT Team 2
AOSD concern
aspect dominant
decomposi@on
separa@on of concerns
cross-‐cuCng concerns
modularity AOP
point cut
join point
advice
core concern
• Concern – An area of interest or focus in a system. – The primary criteria for decomposing SW into smaller, more manageable and comprehensible parts.
October 2007 MIH SWAT Team 3
Text Picture Video Quote Link Chat
Caching Logging
Excep@on Handling Tumblelog
• Separa@on of concerns – Based on the Divide-‐and-‐Conquer strategy. – Focused on breaking down the SW into dis@nct parts that overlap in func@onality as liUle as possible.
October 2007 MIH SWAT Team 4
• Core concern – Core business related concern. – Domain specific concern. – Func@onal requirement. – Can be cleanly encapsulated in a generalized procedure (i.e. object, method, procedure, API).
October 2007 MIH SWAT Team 5
• Cross-‐cuCng concern – Common func@onality orthogonal to core concern.
– Non-‐func@onal requirement. – Can NOT be cleanly encapsulated in a generalized procedure (i.e. object, method, procedure, API).
October 2007 MIH SWAT Team 6
• Dominant decomposi@on – The SW can be modularized in only one way at a @me.
– Concerns that do not align with that modulariza@on end up scaUered across many modules and tangled with one another.
October 2007 MIH SWAT Team 7
• ScaUering and tangling – Cross-‐cuCng concerns o^en cannot be cleanly decomposed from the rest of the system in both the design and implementa@on.
October 2007 MIH SWAT Team 8
Logging
Excep@on Handling
• Aspect (Finally!) – A part of a program that cross-‐cuts its core concerns, therefore “viola@ng” its separa@on of concerns.
October 2007 MIH SWAT Team 9
Excep@on Handling
Logging
• Modularity – AOP is an advance in modulariza@on. – Loosely coupled concerns / components.
October 2007 MIH SWAT Team 10
• Aspect-‐oriented programming – A technique used to support the programmer in cleanly separa@ng components and aspects from each other.
– Centers its aUen@on on the code modulariza@on, providing mechanisms to separate cross-‐cuCng concerns at code level.
– Related to the language.
October 2007 MIH SWAT Team 11
• Aspect-‐oriented so^ware development – A combina@on of mechanisms and methodologies that facilitate in separa@ng concerns at different abstrac@on levels.
– Uses a combina@on of language, environment, and method.
October 2007 MIH SWAT Team 12
• Aspect-‐oriented applica@on – Consists of:
• Component language (C#, Java, etc.) • Aspect-‐oriented language / framework • Aspect weaver
October 2007 MIH SWAT Team 13