Presentation is loading. Please wait.

Presentation is loading. Please wait.

Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance.

Similar presentations


Presentation on theme: "Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance."— Presentation transcript:

1 PVK-Ht04bella@cs.umu.se1 Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance Maintenance

2 PVK-Ht04bella@cs.umu.se2 Software Design Design activities Architecture examples Modularisation and Metrics Classical Design Approaches Analysis Design Testing Coding Operation and Maintenance Installation Require- ments Requirements Specification Planning

3 PVK-Ht04bella@cs.umu.se3 Design Activities Architectural design oIdentify the systems components oStructure the system components oAssign functionality to components oAssign data to components oPlan for future changes Define the structure of the implementation Detailed design oRefine the (architectural) components oChoose specific data structures oChoose specific algorithms Define the logic of the implementation Transform the logical model (  RE) into a physical model, in sufficient detail to permit its physical realization.

4 PVK-Ht04bella@cs.umu.se4 Architecture Example: Pipes and filters

5 PVK-Ht04bella@cs.umu.se5 Architecture Example: Layering

6 PVK-Ht04bella@cs.umu.se6 Architecture Example: Repository

7 PVK-Ht04bella@cs.umu.se7 Design Principles Abstraction Encapsulation Information Hiding Structuring Modularisation

8 PVK-Ht04bella@cs.umu.se8 Characterisation of Modules Logic entities which fulfil certain tasks Simple entities, i.e. their tasks can be described clearly and briefly Units containing data and/or operations Provide resources usable by other modules Their realisation is encapsulated May use resources from other modules

9 PVK-Ht04bella@cs.umu.se9 Modules...... are replaceable... are free of side-effects... can be tested separately... can be compiled separately... can be developed independently Modules are abstract/virtual machines

10 PVK-Ht04bella@cs.umu.se10 Advantages of Modular Systems Easier to understand oOnly few modules must be studied Easier to develop and to test oIndependence More portable oSystem dependencies reside in a few dedicated modules Easier to maintain oChanges can be traced to few modules Easier to reuse oClear dependencies

11 PVK-Ht04bella@cs.umu.se11 Measuring Module Quality Classical metrics: oLOC oCyclomatic number (McCabe) oControl variable complexity (McClure) oSoftware science (Halstead) “Wrong” understanding of module Late applicability Reliable and early data with significant impact on quality. More useful: oCoupling oCohesion oFan-in/fan-out oGraph-oriented metrics oWeighted methods per class oDepth/width of inheritance trees o...

12 12 Coupling Measures the degree of independence between different modules Content coupling Common coupling (External coupling) Control coupling Stamp coupling Data coupling Each module should communicate with as few as possible other module Communicating modules should exchange as few as possible data All communication must be explicit bad good

13 13 How to Uncouple Modules Data coupling oExchange only necessary information oDo not pass data through several modules Stamp coupling oDo not encapsulate unrelated data Control coupling oLimit control information in interfaces Common/External coupling oPass data explicitly as parameters oDivide complex data into independent parts that can be exclusively used of different modules oHide data Content coupling USCH

14 PVK-Ht04bella@cs.umu.se14 Cohesion Measures “relatedness” of the resources encapsulated in one module Coincidental cohesion Logical cohesion Temporal cohesion Procedural cohesion Communicational cohesion Sequential cohesion Functional/informational cohesion Each element in a module should be a necessary and essential part of one and only task bad good

15 PVK-Ht04bella@cs.umu.se15 Coupling / Cohesion Summary The modules of a system should be highly cohesive and loosely coupled Good modularisation

16 PVK-Ht04bella@cs.umu.se16 Fan-in vs Fan-out M1M1 M3M3 M 16 M 15 M 14 M 13 M 12 M 11 M 10 M 18 M 17 M 19 M4M4 M2M2 M9M9 M8M8 M7M7 M6M6 M5M5 M 9 : Fan-in = 2, fan-out = 4 Depth Width

17 PVK-Ht04bella@cs.umu.se17 Fan-in vs Fan-out Rules Minimise structures with high fan-out Strive for fan-in as depth increases

18 PVK-Ht04bella@cs.umu.se18 Structured Design Evolved from top-down design, modularity, and structured programming oStevens, Myers, Constantine (74) oYourdon, Constantine (79) oPage-Jones (80) Systematic development of a design (structure chart) from a DFD oTransform analysis oTransaction analysis

19 PVK-Ht04bella@cs.umu.se19 Structure Chart Update Transaction Verify Card Verify Bank Verify Password Get Card Info Get Password Make Transaction & Send Transaction Dispense Cashe Display Result Output Cashe transaction result bankCard #, Password Authorization Info Bank Info Verify Transaction Get Transaction Info Transaction kind Amount Account Info Transaction result C     transaction

20 PVK-Ht04bella@cs.umu.se20 Structured Design Summary Systematic approach to derive a design from the analysis results DFDs as input Transform- and transaction analysis Factoring and refinement (rules exist) Good support for functional decomposition Systematic approach Incorporates metrics Uses design heuristics Tool support No support for data abstraction Data spread over the whole system Only sequential systems Metrics and heuristics are mainly of syntactic nature No design “decisions”

21 bella@cs.umu.se21 Object Oriented Analysis and Design Each entity in the system is an object. A method or operation is an action that can be performed directly by the object or can happen to the object. Encapsulation: the methods form a protective boundary around an object. Class hierarchies of objects encourage inheritance. Polymorphism: same method for different objects, each with different behaviour. Rectangle {author = Joe} height: int width: int getArea(): int resize (int,int) Rectangle height width getArea resize Analysis Design

22 PVK-Ht04bella@cs.umu.se22 Traceability Matrix Relates requirements to design artefacts o Shows dependencies o Supports change management o Useful for other traceability purposes Module 1 Module 2 Module 3 Module 4 Module… Req 1 X X X Req 2 X X X Req 3 X X Req.. X X X


Download ppt "Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance."

Similar presentations


Ads by Google