software architecture

30
Software Architecture Module Views and Styles Inam Soomro November 2011

Upload: inam-soomro

Post on 24-May-2015

730 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Software architecture

Software ArchitectureModule Views and Styles

Inam Soomro

November 2011

Page 2: Software architecture

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

Page 3: Software architecture

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

Page 4: Software architecture

An Example of generalisation Style

Page 5: Software architecture

Elements, Relation and Properties

• Element– Module

• Relation– Generalisation

• Constraints– A module can have multiple parents, bad design!– Loopholes are not allowed

Page 6: Software architecture

Why Generalisation

• Expressing inheritance in OOD• Evolution and Extension• Support reuse• Capturing commonalities

Page 7: Software architecture

Notation for Generalisation Style

• UML

Page 8: Software architecture

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.

Page 9: Software architecture

Example

Page 10: Software architecture

What do u think of this design??

Page 11: Software architecture

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

Page 12: Software architecture

Why Layered Style

• Modifiability and Portability• Managing complexity• Reuse• Seperation of concerns

Page 13: Software architecture

Notation of Layered Style

• Stack

Page 14: Software architecture

Segmented Layers

Page 15: Software architecture

Rings

Page 16: Software architecture

Layers with a Sidecar

Page 17: Software architecture

UMLSegmented Layers

Page 18: Software architecture

Example of Java EE Application

Page 19: Software architecture

Aspects Style

• Aspects are modular units that complement objects to modularize the cross cutting concerns

Page 20: Software architecture

ELEMENTS, RELATION AND PROPERTIES

• Elements– Aspect modules

• Relation– Crosscuts

• Properties– Pointcut– Advice

• Constrains

Page 21: Software architecture

Why Aspects Style

• provide systematic means to modularize by allowing separation of crosscutting concerns

• promotes modularity• Address separation of concerns

Page 22: Software architecture

Notation

• UML

Page 23: Software architecture
Page 24: Software architecture
Page 25: Software architecture

Before and after Aspect Orientation

Page 26: Software architecture

Problems with Traditional Object Orientation

Page 27: Software architecture

After Aspect Orietation

Page 28: Software architecture

Aspect Oriented Programming

• Facililitates in implementation of crosscutting concerns

• AspectJ , Spring AOP, Jboss AOP, AspectC++and Aspect#

Page 30: Software architecture

Thanks!