System Architecture: Desing alternatives and methodologies.

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Chapter 13 Review Questions
Architecting and Designing Software
Software Engineering 2003 Jyrki Nummenmaa 1 OBJECT ARCHITECTURE DESIGN These slides continue with our example application, based on the simplified.
9.5 Software Architecture
Technical Architectures
Moving from Analysis to Design. Overview ● What is the difference between analysis and design? ● Logical v. physical design ● System v. detailed design.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Object-Oriented Software Engineering Practical Software Development using UML and Java Architecting and Designing Software Chapter 9 in OOSE Textbook plus.
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software1 Architectural Patterns.
Architecting and Designing Software Chapter 9 in OOSE Textbook plus
Course Instructor: Aisha Azeem
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
Chapter 2 Database System Concepts and Architecture
What is Software Architecture?
CS 4310: Software Engineering
The Design Discipline.
Chapter 13 Starting Design: Logical Architecture and UML Package Diagrams.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
CPSC 872 John D. McGregor Session 16 Design operators.
An Introduction to Software Architecture
9.4 Software Architecture
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 9: Architecting and Designing Software.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
DCE (distributed computing environment) DCE (distributed computing environment)
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software1/26 Architectural Patterns.
CSE 240 Lecture 12. Quote of the day “There is no reason for any individual to have a computer in his home.” Ken Olsen ( ), President, Digital Equipment,
Design engineering Vilnius The goal of design engineering is to produce a model that exhibits: firmness – a program should not have bugs that inhibit.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 9: Architecting and Designing Software.
SE: CHAPTER 7 Writing The Program
Cohesion and Coupling CS 4311
Systems Analysis and Design in a Changing World, 3rd Edition
GRASP: Designing Objects with Responsibilities
Object-Oriented Software Engineering Practical Software Development using UML and Java Architecting and Designing Software Chapter 9 in OOSE Textbook plus.
Processes Introduction to Operating Systems: Module 3.
Chapter 2 Database System Concepts and Architecture Dr. Bernard Chen Ph.D. University of Central Arkansas.
1 CMPT 275 High Level Design Phase Modularization.
Object-Oriented Software Engineering Practical Software Development using UML and Java Architecting and Designing Software Chapter 9 in OOSE Textbook plus.
Lecture 18: Object-Oriented Design
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
CS223: Software Engineering Lecture 14: Architectural Patterns.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 9: Architecting and Designing Software.
Introduction. System Design Hardware/Software Platform Selection Software Architectures Database Design Human-Computer Interaction (HCI) Interface Object.
System Architecture CS 560. Project Design The requirements describe the function of a system as seen by the client. The software team must design a system.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 9: Architecting and Designing Software.
Why is Design so Difficult? Analysis: Focuses on the application domain Design: Focuses on the solution domain –The solution domain is changing very rapidly.
And Some UML Diagrams in between
Chapter 2 Database System Concepts and Architecture
Architecting and Designing Software
Distribution and components
Architecting and Designing Software
Starting Design: Logical Architecture and UML Package Diagrams
Software models - Software Architecture Design Patterns
An Introduction to Software Architecture
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Designing Software.
Architecting and Designing Software
Design Yaodong Bi.
Architecting and Designing Software
Presentation transcript:

System Architecture: Desing alternatives and methodologies

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software2 Design space All the possible designs that could be achieved by choosing different alternatives is often called the design space. E.g.,

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software3 Component Any piece of software or hardware that has a clear role. A component can be isolated, allowing you to replace it with a different component that has equivalent functionality. Many components are designed to be reusable. Conversely, others perform special-purpose functions. A component defined at the programming language level For example, methods, classes and packages are modules in Java. Module

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software4 System A logical entity, having a set of definable responsibilities or objectives, and consisting of hardware, software, and people. A system can have a specification which is then implemented by a collection of components. A system continues to exist, even if its components are changed or replaced. The goal of requirements analysis is to determine the responsibilities of a system. Subsystem: A system that is part of a larger system It has a well-defined interface (API) with the larger system.

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software5 UML diagram of system parts

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software6 Top-down and bottom-up designing Top-down design Start at the highest level (user interface). Work down to lower levels one-by-one. Do detailed decisions last (e.g., data formats, particular algorithms). Bottom-up design Make decisions about reusable low-level features first. Decide how these will be put together to create high-level constructs. Mixed design (the norm) Use top-down to give the system a good structure. Use bottom-up to exploit reusable components (e.g., SQL database).

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software7 Different aspects of design Architecture design: —The division into subsystems and components, -How these will be connected. -How they will interact. -Their interfaces. Class design: —The various features of classes. User interface design: Algorithm design: —The design of computational mechanisms. Protocol design: —The design of communications protocol.

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software8 Design Principle 1: Divide and conquer Trying to deal with something big all at once is normally much harder than dealing with a series of smaller things Separate people can work on each part. An individual software engineer can specialize. Each individual component is smaller, and therefore easier to understand. Parts can be replaced or changed without having to replace or extensively change other parts.

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software9 Ways of dividing a software system A distributed system is divided into clients and servers A system is divided into subsystems A subsystem can be divided into one or more packages A package is divided into classes A class is divided into methods

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software10 Functional cohesion This is achieved when all the code that computes a particular result is kept together - and everything else is kept out i.e. when a module only performs a single computation, and returns a result, without having side-effects. Benefits to the system: —Easier to understand —More reusable —Easier to replace Modules that update a database, create a new file or interact with the user are not functionally cohesive

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software11 Layer cohesion All the facilities for providing or accessing a set of related services are kept together, and everything else is kept out The layers should form a hierarchy —Higher layers can access services of lower layers, —Lower layers do not access higher layers The set of procedures through which a layer provides its services is the application programming interface (API) You can replace a layer without having any impact on the other layers —You just replicate the API

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software12 Example of the use of layers Screen display facilities User account management File system Kernel (handling processes and swapping) Application programs User interface Application logic Database access Network communication Transmitting and receiving Dealing with packets Dealing with connections Dealing with application protocols a) Typical layers in an application program b) Typical layers in an operating system c) Simplified view of layers in a communication system Operating system access

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software13 Software Architecture Software architecture is process of designing the global organization of a software system, including: Dividing software into subsystems. Deciding how these will interact. Determining their interfaces. —The architecture is the core of the design, so all software engineers need to understand it. —The architecture will often constrain the overall efficiency, reusability and maintainability of the system.

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software14 The importance of software architecture Why you need to develop an architectural model: To enable everyone to better understand the system To allow people to work on individual pieces of the system in isolation To prepare for extension of the system To facilitate reuse and reusability

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software15 Contents of a good architectural model A system’s architecture will often be expressed in terms of several different views The logical breakdown into subsystems The interfaces among the subsystems The dynamics of the interaction among components at run time The data that will be shared among the subsystems The components that will exist at run time, and the machines or devices on which they will be located A stable architecture allows new features to be easily added with only small changes to the architecture

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software16 Developing an architectural model Start with an outline Based on the principal requirements and use cases Identifying the main components that will be needed Choose a framework e.g., client-server Refine the architecture Identify the main ways in which the components will interact and the interfaces between them Decide how each piece of data and functionality will be distributed among the various components Consider each use case and be sure the architecture supports it Mature the architecture

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software17 UML Tools for System Architectue All UML diagrams are useful to describe aspects of the architectural model Four UML diagrams are particularly suitable for system architecture —Package diagrams —Subsystem diagrams —Component diagrams —Deployment diagrams

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software18 Package diagrams server KnockKnock ocsf client server client >

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software19 Subsystem diagrams addStudent(id: String) : boolean deleteStudent(id: String) viewSchedule( ) : void addACourse Student viewSchedule deleteACourse CourseOffering * * CourseRecord Student Realization Elements Specification Elements

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software20 Component diagrams ClientServer > Deployment diagrams Machine1: TCP/IP Machine2: GPS Satellite Wireless communication Client1: Client2: Server:

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software21 Architectural Patterns The notion of patterns can be applied to software architecture. These are called architectural patterns or architectural styles. Each allows you to design flexible systems using components that have: —Minimal coupling: they are as independent of each other as possible. —Maximal cohesion: their internal functionality is complete Different types: Multi-layer - vertical organization from user to system Client-server - service provider and multiple users are clearly delineated Peer-to-peer - every client is also a server Distributed - several platforms are required (not one or two) Transaction Processing - inputs appear in a stream, handled by dispatcher. Model-View-Controller - useful for GUI design

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software22 The Multi-Layer architectural pattern In a layered system, each layer communicates only with the layer immediately below it. Each layer has a well-defined interface used by the layer immediately above. —The higher layer sees the lower layer as a set of services. A complex system can be built by superposing layers at increasing levels of abstraction. —It is important to have a separate layer for the GUI. —Layers immediately below the GUI layer provide the functionality defined by the use cases. —Bottom layers provide general services. -e.g. network communication, database access

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software23 Example of multi-layer systems Screen display facilities User account management File system Kernel (handling processes and swapping) Application programs User interface Application logic Database access Network communication Transmitting and receiving Dealing with packets Dealing with connections Dealing with application protocols a) Typical layers in an application program b) Typical layers in an operating system c) Simplified view of layers in a communication system Operating system access

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software24 The multi-layer architecture and design principles 1. Divide and conquer: The layers can be independently designed. 2. Maximize cohesion: Well-designed layers are coherent. 3. Minimize coupling: Well-designed layers know little about adjacent layers beyond the interface. 4. Increase abstraction: different layers can be implemented with different tools (e.g., Java at one level and SQL in another). 5. Increase reuse: The lower layers can often be designed generically (reusing other systems’ components). 6. Design for portability: System dependent facilities can be isolated in a lower layer. 7. Design for testability: Layers can be tested independently. 8. Design defensively: Intefaces between layers can contain rigorous specifications, called “contracts.”

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software25 An example of a distributed system Client2: Server: Client1: Client3: > look up addresses > exchange messages > exchange messages > exchange messages > look up addresses

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software26 Example of a transaction-processing system Transaction input Transaction dispatcher transactions Handler for Reservation transaction Handler for Flight cancellation transaction...

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software27 The Model-View-Controller (MVC) architectural pattern An architectural pattern used to help separate the GUI layer from other parts of the system The model contains the underlying classes whose instances are to be viewed and manipulated The view contains objects used to render the appearance of the data from the model in the user interface The controller contains the objects that control and handle the user’s interaction with the view and the model

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software28 Example of the MVC architecture for the GUI

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software29 Writing Good Design Documents They force designers be explicit and consider the important issues in advance of coding. They allow users to review the design and to improve it. They are a means of communication. —To programmers who will be implementing the system. —To designers and programmers who will need, in the future, to modify the design. —To designers who need to create systems or subsystems that interface with the system being designed.

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software30 Structure of a design document A. Purpose: —What system is being described, and what requirements are being implemented by this design (traceability)? B. General priorities: —What priorities influence the design? C. Outline: —A high-level description of the design that allows readers to quickly get a general feeling for the system. D. Major challenges: —Discuss the important issues that had to be resolved. —Give the alternatives that were considered, the final choices and their rationale. E. Details: —Provide all details that make the document complete. Use standard notations found in UML (class siagrams, use case diagrams, etc.)

© Lethbridge/Laganière 2001 Chapter 9: Architecting and designing software31 Design Document for StressFree A. Purpose B. General Priorities C. Outline D.Major Challenges E.Details