Software ArchitectureModule Views and Styles
Inam Soomro
November 2011
Agenda • GENERALIZATION STYLE
– ELEMENTS, RELATION AND PROPERTIES– CONSTRAINSTS– WHY GENERALISATION STYLE– NOTATION
• LAYERED STYLE– ELEMENTS, RELATION AND PROPERTIES– CONSTRAINSTS– WHY LAYERED STYLE– LAYER TYPES– NOTATION
• ASPECTS STYLE– ELEMENTS, RELATION AND PROPERTIES– CONSTRAINSTS– WHY ASPECTS STYLE– NOTATION– BEFORE AND AFTER ASPECT ORIENTATION
GENERALIZATION STYLE
• Abstraction of common properties and attributes
• Employs “IS A“ relationship• Parent module is a more general version of
child modules• interface Realization • Architects emphasis on interface, not the
implementation
An Example of generalisation Style
Elements, Relation and Properties
• Element– Module
• Relation– Generalisation
• Constraints– A module can have multiple parents, bad design!– Loopholes are not allowed
Why Generalisation
• Expressing inheritance in OOD• Evolution and Extension• Support reuse• Capturing commonalities
Notation for Generalisation Style
• UML
Layered Style
• Reflects division of software into smaller units• Offers a cohesive set of services• unidirectional and • “allowed to use“• A System with uses relation from lower to
upper layer is not a layered architecture; however it may conveys an ideal design an architect was trying to achieve.
Example
What do u think of this design??
Elements, Relation and Properties
• Elements– Layer
• Relation– Allowed to use
• Constraints– Every piece of software is allocated only one layer– At least two layers– Lower layers cannot use the upper layers
Why Layered Style
• Modifiability and Portability• Managing complexity• Reuse• Seperation of concerns
Notation of Layered Style
• Stack
Segmented Layers
Rings
Layers with a Sidecar
UMLSegmented Layers
Example of Java EE Application
Aspects Style
• Aspects are modular units that complement objects to modularize the cross cutting concerns
ELEMENTS, RELATION AND PROPERTIES
• Elements– Aspect modules
• Relation– Crosscuts
• Properties– Pointcut– Advice
• Constrains
Why Aspects Style
• provide systematic means to modularize by allowing separation of crosscutting concerns
• promotes modularity• Address separation of concerns
Notation
• UML
Before and after Aspect Orientation
Problems with Traditional Object Orientation
After Aspect Orietation
Aspect Oriented Programming
• Facililitates in implementation of crosscutting concerns
• AspectJ , Spring AOP, Jboss AOP, AspectC++and Aspect#
The chapter is taken from the bookDocumenting Software Architectures: Views and BeyondBy: Paul Clements; Felix Bachmann; Len Bass; David Garlan; James Ivers; Reed Little; Robert Nord; Judith Stafford
Thanks!