Why Architecture?

Software Engineering: A Practitioner’s Approach, 6/e

Chapter 10 Architectural Design
copyright © 1996, 2001, 2005

The architecture is not the operational software. Rather, it is a representation that enables a software engineer to: (1) analyze the effectiveness of the design in meeting its stated requirements, (2) consider architectural alternatives at a stage when making design changes is still relatively easy, and (3) reduce the risks associated with the construction of the software.

R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach. Any other reproduction or use is expressly prohibited.

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005

1

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005

2

Why is Architecture Important?
Representations of software architecture are an enabler for communication between all parties (stakeholders) interested in the development of a computer-based system. computerThe architecture highlights early design decisions that will have a profound impact on all software engineering work that follows and, as important, on the ultimate success of the system as an operational entity. Architecture “constitutes a relatively small, intellectually graspable model of how the system is structured and how its components work together” [BAS03].

Data Design
At the architectural level …
Design of one or more databases to support the application architecture Design of methods for ‘mining’ the content of multiple databases ‘mining’
navigate through existing databases in an attempt to extract appropriate business-level information businessDesign of a data warehouse—a large, independent database that warehouse— has access to the data that are stored in databases that serve the set of applications required by a business

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005

3

These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005

4

2005 5 6 Architectural Styles Each style describes a system category that encompasses: (1) a set of components (e. copyright © 1996. 3. 4. computational modules) that perform a function required by a system. Pressman & Associates. Inc. Inc. 6. Pressman & Associates. The representation of data structure should be known only to those modules that must make direct use of the data contained within the structure.. 5. 6/e and are provided with permission by R. Low level data design decisions should be deferred until late in the design process.. 6/e and are provided with permission by R. Pressman & Associates. (2) a set of connectors that enable “communication. a database.g.. 2001. coordination and cooperation” among components. (3) constraints that define how components can be integrated to form the system. A data dictionary should be established and used to define both data and program design. copyright © 1996. DataData-Centered Architecture DataData-centered architectures Data flow architectures Call and return architectures ObjectObject-oriented architectures Layered architectures These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. and (4) semantic models that enable a designer to understand the overall properties of a system by analyzing the known properties of its constituent parts.S. The systematic analysis principles applied to function and behavior should also be applied to data. A software design and programming language should support the specification and realization of abstract data types.S. Inc. 6/e and are provided with permission by R. 2001. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. Pressman & Associates. A library of useful data structures and the operations that may be applied to them should be developed.Data Design At the component level … refine data objects and develop a set of data abstractions implement data object attributes as one or more data structures review data structures to ensure that appropriate relationships have been established simplify data structures as required Data Design—Component Level Design— 1. 2005 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2005 8 . 2005 7 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2.S.. 7.S.. 6/e and are provided with permission by R. 2001. Inc. copyright © 1996. All data structures and the operations to be performed on each should be identified. 2001. copyright © 1996.

2005 11 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.Data Flow Architecture Call and Return Architecture These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.S. copyright © 1996. 6/e and are provided with permission by R. Pressman & Associates. 6/e and are provided with permission by R. 2001... copyright © 1996. 6/e and are provided with permission by R. 2001. copyright © 1996. Pressman & Associates. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2001..S. 6/e and are provided with permission by R. Inc.S. Inc. Pressman & Associates. Two patterns are common: a database management system pattern that applies the storage and retrieval capability of a DBMS to the application architecture an application level persistence pattern that builds persistence features into the application architecture Distribution— Distribution— the manner in which systems or components within systems communicate with one another in a distributed environment A broker acts as a ‘middle-man’ between the client component and a server ‘middlecomponent. Inc.S. Pressman & Associates. 2001.. Inc. copyright © 1996. 2005 10 Layered Architecture Architectural Patterns Concurrency— Concurrency—applications must handle multiple tasks in a manner that simulates parallelism operating system process management pattern task scheduler pattern Persistence— Persistence—Data persists if it survives past the execution of the process that created it. 2005 9 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2005 12 .

Inc. 2001. 2005 16 . 2001. Pressman & Associates. 2005 sensors sensors 13 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2001. copyright © 1996. Pressman & Associates. people) that the software interacts with and the nature of the interaction control panel Architectural Context Safehome Product Internet-based system A set of architectural archetypes should be identified An archetype is an abstraction (similar to a class) that represents one element of system behavior target system: Security Function uses uses surveillance function peers homeowner uses The designer specifies the structure of the system by defining and refining software components that implement each archetype These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2001.S. 2005 14 Archetypes Cont roller communicat es wit h Component Structure SafeHome Execut ive Funct ion select ion Node Ext ernal Communicat ion Management Securit y Surveillance Home management GUI Int ernet Int erface Cont rol panel processing det ect or management alarm processing Det ect or Indicat or Figure 10.S. 6/e and are provided (adapt ed rom [ BOS00] ) with permission by R.. 6/e and are provided with permission by R.Architectural Design The software must be placed into context the design should define the external entities (other systems. Pressman & Associates.S. 6/e and are provided with permission by R.. Inc. Inc. copyright © 1996.. devices. copyright © 1996. 6/e and are provided with permission by R. 2005 15 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.7 UML relat ionships f or Saf eHome securit y f unct ion archet ypes These courseware materials are to be usedf in conjunction with Software Engineering: A Practitioner’s Approach.S.. Inc. copyright © 1996. Pressman & Associates.

three baths.Refined Component Structure SafeHome Executive Ext ernal Communicat ion Management Analyzing Architectural Design 1.. 2005 20 . Pressman & Associates. constraints. copyright © 1996.. 6/e and are provided with permission by R. Pressman & Associates. 2. Pressman & Associates." Deriving Program Architecture Program Architecture architectural design These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2001. 3. 6/e and are provided with permission by R. and environment description. 2001. 2005 17 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. Security GUI Internet Interface Co n t ro l p an e l p ro ce ssin g d e t e ct o r m an ag e m e n t alarm p ro ce ssin g Ke y p ad p ro ce ssin g sch e d u le r phone co m m u n icat io n CP d isp lay fu n ct io n s alarm se se n so r se n so r se n n so r se n so r se n so r se n so r se soso r se nn so r r These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. Inc. Collect scenarios. 6. 6/e and are provided with permission by R. Pressman & Associates.. Describe the architectural styles/patterns that have been chosen to address the scenarios and requirements: • module view • process view • data flow view 4. Evaluate quality attributes by considered each attribute in isolation. Identify the sensitivity of quality attributes to various architectural attributes for a specific architectural style.S.. 2001. 6/e and are provided with permission by R.. lots of glass .S. Inc. copyright © 1996.S. Inc. copyright © 1996. 2001.S. Elicit requirements. copyright © 1996. 5. Critique candidate architectures (developed in step 3) using the sensitivity analysis conducted in step 5. 2005 18 An Architectural Design Method customer requirements "four bedrooms. 2005 19 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. Inc..

Inc. 2001. copyright © 1996. 6/e and are provided with permission by R. Pressman & Associates. Pressman & Associates. 6/e and are provided with permission by R.S. 6/e and are provided with permission by R.S. 2005 23 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.. 2001. Pressman & Associates. 6/e and are provided with permission by R. copyright © 1996.S. Pressman & Associates. 2001. 2005 21 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.. Inc..S. 2001. Inc. copyright © 1996. Inc.Partitioning the Architecture “horizontal” and “vertical” partitioning are required Horizontal Partitioning define separate branches of the module hierarchy for each major function use control modules to coordinate communication between functions function 1 function 3 function 2 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2005 22 Vertical Partitioning: Factoring design so that decision making and work are stratified decision making modules should reside at the top of the architecture decisiondecision-makers Why Partitioned Architecture? results in software that is easier to test leads to software that is easier to maintain results in propagation of fewer side effects results in software that is easier to extend workers These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. copyright © 1996. 2005 24 ..

copyright © 1996.S.S. 2005 28 . Inc. Inc. 2005 27 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. copyright © 1996. for transaction flows. 2001. Pressman & Associates. 6/e and are provided with permission by R. Inc. isolate the transaction center working from the boundary outward. copyright © 1996. 2001.. 6/e and are provided with permission by R. Pressman & Associates. 2001. 6/e and are provided with permission by R.. 2005 25 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2001.S. Pressman & Associates. Inc. map DFD transforms into corresponding modules add control modules as required refine the resultant program structure using effective modularity concepts b a x2 Transform Mapping a b d c data flow model x1 x3 c d e f g h x4 i j e f g i h j "Transform" mapping These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. copyright © 1996.S. 2005 26 General Mapping Approach isolate incoming and outgoing flow boundaries. 6/e and are provided with permission by R. Pressman & Associates..Structured Design objective: to derive a program architecture that is partitioned approach: the DFD is mapped into a program architecture the PSPEC and STD are used to indicate the content of each module Flow Characteristics Transform flow notation: structure chart Transaction flow These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach..

Factoring direction of increasing decision making typical "decision making" modules First Level Factoring main program controller input controller processing controller output controller typical "worker" modules These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. 2005 32 . Inc. 6/e and are provided with permission by R.. 2001. 2005 31 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. Pressman & Associates..S. 2001. Inc. copyright © 1996. Pressman & Associates. Pressman & Associates. copyright © 1996.. 6/e and are provided with permission by R. Pressman & Associates.S. 2005 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.S. Inc. Inc. 2001. copyright © 1996. copyright © 1996. 2005 29 30 Second Level Mapping D C control main Transaction Flow incoming flow action path T B A A B C mapping from the flow boundary outward D These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.S. 2001.. 6/e and are provided with permission by R. 6/e and are provided with permission by R.

.. 2001. . operator. screen. the assembly record file is read and a report is generated and displayed on the operator display screen.S. 2005 33 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.S. When a report is selected. copyright © 1996. fixture taken...Transaction Example fixture setting commands operator process operator commands Refining the Analysis Model 1. 6/e and are provided with permission by R. store and entities develop level 02 and 03 flow models create corresponding data dictionary entries refine flow models as appropriate . Pressman & Associates. 2005 Level 1 Data Flow Diagram Error msg operator commands read operator commands Valid command determine command type fixture analyze fixture status Fixture setting status fixture servos nounnoun-verb parse select report control robot generate send control value report display screen robot control assembly record 35 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. When robot control switches are selected. An error message is displayed for invalid commands. now. 4. Pressman & Associates. control value are sent to s the robot control system. report display screen robot control robot control software assembly record in reality. 6/e and are provided with permission by R. 6/e and are provided with permission by R. 2005 34 Deriving Level 1 Processing narrative for " process operator commands" Process operator command software reads operator commands from the cell operator. 2001. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. other commands would also be shown 3. Pressman & Associates.. write an English language processing narrative for the level 01 flow model apply noun/verb parse to isolate processes. When fixture commands are encountered. The command type is determined for valid commands and appropriate action is taken. 2005 36 . When fixture commands are encountered. Inc. Inc. we're ready to begin design! fixture servos 2. copyright © 1996. 2001. When a report is selected. copyright © 1996. the cell operator. data items.S. the assembly record file is read and a report is generated and displayed on the operator display screen. Inc. copyright © 1996. fixture status is analyzed and a fixture setting is output to the fixture servos. An error message is displayed for invalid commands. selected. 6/e and are provided with permission by R. Pressman & Associates.S. When robot control switches are selected. control values are sent to the robot control system. 2001.. Inc. encountered. status is analyzed and a fixture setting is output to the fixture servos selected. Process operator command software reads operator commands from commands. 5. These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. The command type is determined for valid commands and appropriate action is taken.

copyright © 1996. copyright © 1996. 6/e and are provided with permission by R. 2005 38 Transaction Mapping Data flow model a b t g l m n d h k j b a x2 t x3 x4 i d e f command read command Isolate Flow Paths error msg produce error msg fixture setting status read fixture status determine setting combined status format setting raw setting mapping x1 invalid command command validate command determine type program structure valid command robot control read record record calculate output values send control value values format report e f g h i x3.S.. 2005 40 . 2001.S. Inc.S. 6/e and are provided with permission by R. 2001. 2001.Level 2 Data Flow Diagram command read command command validate command determine type read record produce error msg error msg fixture setting status read fixture status determine setting combined status format setting raw setting Transaction Mapping Principles isolate the incoming flow path define each of the action paths by looking for the "spokes of the wheel" assess the flow on each action path invalid command valid command robot control record calculate output values send control value assembly record values format report define the dispatch and control structure report map each action path flow individually start/stop These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.. Inc. Pressman & Associates. 2001. copyright © 1996. 6/e and are provided with permission by R. copyright © 1996. Pressman & Associates. 6/e and are provided with permission by R. Inc. Pressman & Associates.1 j k l m n start/stop assembly record report These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.S. Inc... 2005 37 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. Pressman & Associates. 2005 39 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach.

2001. Pressman & Associates. 6/e and are provided with permission by R.S.Map the Flow Model process operator commands Refining the Structure Chart process operator commands command input controller read command validate command produce error message fixture status controller determine type command input controller read command validate command produce error message fixture status controller determine type report generation controller send control value report generation controller send control value each of the action paths must be expanded further read fixture status determine setting format setting read record calculate output values format report These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. copyright © 1996. Pressman & Associates. copyright © 1996.. 2001.. Inc. 6/e and are provided with permission by R. 2005 41 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach. Inc. 2005 42 .S.