Shanghai Jiao Tong University 图 上海交通大学 Object Oriented Analysis and Design Aspect-Oriented Software Development (AOSD) 上海交通大学软件工程中心
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Aspect-Oriented Software Development (AOSD)
Introduction Evolution of Programming Languages -Assembly/Machine Languages Formula Translation Procedural Programming ■ Structured Programming Functional Programming Logic Programming Programming with abstract data types Evolution of Software Design Monolithic ---Modular Object Oriented Analysis and Design 2
Object Oriented Analysis and Design 2 Introduction w Evolution of Programming Languages § Assembly/Machine Languages § Formula Translation § Procedural Programming § Structured Programming § Functional Programming § Logic Programming § Programming with abstract data types w Evolution of Software Design § Monolithic ---> Modular
Design Principles Modularity ◆Abstraction Focus only on relevant properties ◆Decomposition -Divide software into separately named and addressable modules ◆Encapsulation Group related things together. ◆Information Hiding Hide implementation details from the outside Separation of Concerns Ensure that each module only deals with one concern ·Low Coupling aim for low coupling among the modules High Cohesion aim for high cohesion within one module Object Oriented Analysis and Design 3
Object Oriented Analysis and Design 3 Design Principles Modularity w Abstraction § Focus only on relevant properties w Decomposition § Divide software into separately named and addressable modules w Encapsulation § Group related things together. w Information Hiding § Hide implementation details from the outside w Separation of Concerns § Ensure that each module only deals with one concern § Low Coupling • aim for low coupling among the modules § High Cohesion • aim for high cohesion within one module
What is a Concern? Are properties or areas of interest Can be functional or nonfunctional (quality,systemic) At different abstraction levels: Problem domain concerns vs.solution domain concerns Requirements vs.design Design vs.implementation Object Oriented Analysis and Design 4
Object Oriented Analysis and Design 4 What is a Concern? w Are properties or areas of interest w Can be functional or nonfunctional (quality, systemic) w At different abstraction levels: § Problem domain concerns vs. solution domain concerns § Requirements vs. design § Design vs. implementation
Separation of Concerns The ability to identify,encapsulate and manipulate concerns A key principle of SW engineering Concerns are primary criteria for decomposing SW Object Oriented Analysis and Design 5
Object Oriented Analysis and Design 5 Separation of Concerns § The ability to identify, encapsulate and manipulate concerns § A key principle of SW engineering § Concerns are primary criteria for decomposing SW
Separation of Concerns (Cont.) “clean”separation can help: -Reduce complexity,improve comprehensibility Simplify evolution of SW Local,easy changes Smaller impact of change Facilitate reuse developers aren't burdened by extraneous parts Simplify component integration Object Oriented Analysis and Design 6
Object Oriented Analysis and Design 6 Separation of Concerns (Cont.) “clean” separation can help: § Reduce complexity, improve comprehensibility § Simplify evolution of SW § Local, easy changes § Smaller impact of change § Facilitate reuse § developers aren’t burdened by extraneous parts § Simplify component integration
Dijkstra:Separate Program in Layers... E.W.Dijkstra (1968-2002): ◆ "...Correct arrangement of the structure of software systems before simple programming...' ◆Layered Structure Programs are grouped into layers Programs in one layer can only communicate with programs in adjoining layers Conceptual integrity ■ Each layer has its own goal With easier development and -↓ maintenance Object Oriented Analysis and Design 7
Object Oriented Analysis and Design 7 Dijkstra: Separate Program in Layers... w E. W. Dijkstra (1968-2002): w ‘’...Correct arrangement of the structure of software systems before simple programming...‘’ w Layered Structure § Programs are grouped into layers § Programs in one layer can only communicate with programs in adjoining layers w Conceptual integrity § Each layer has its own goal § With easier development and maintenance
Parnas Design Principles for Decomposition Information hiding modules (1972) Identify design decisions that are likely to change Isolate these in separate modules (separation of concerns) Different design decisions might require different decompositions. D.Parnas,"On the Criteria to Be Used in Decomposing Systems into Modules.",Comm. ACM15,12(December1972),1053-1058 1972. Object Oriented Analysis and Design 8
Object Oriented Analysis and Design 8 Parnas - Design Principles for Decomposition w Information hiding modules (1972) § Identify design decisions that are likely to change § Isolate these in separate modules (separation of concerns) w Different design decisions might require different decompositions. § D. Parnas, "On the Criteria to Be Used in Decomposing Systems into Modules.“ , Comm. ACM 15, 12 (December 1972), 1053-1058. 1972
Separation of Concerns applied Separate software development into phases each dealing with specific activities (e.g. requirements,analysis,design, implementation) ◆ Separation of different artifacts:class, subsystems,attributes. ◆ Separation of different design views (static. dynamic,implementation, ◆ Separation of different roles Object Oriented Analysis and Design 9
Object Oriented Analysis and Design 9 Separation of Concerns applied w Separate software development into phases each dealing with specific activities (e.g. requirements, analysis, design, implementation) w Separation of different artifacts: class, subsystems, attributes. w Separation of different design views (static, dynamic, implementation, ...) w Separation of different roles w
Benefits of Separation of Concerns Supports high cohesion among components ◆ Supports low coupling among components Increases modularity Object Oriented Analysis and Design 10
Object Oriented Analysis and Design 10 Benefits of Separation of Concerns w Supports high cohesion among components w Supports low coupling among components w Increases modularity