© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Styles.

Slides:



Advertisements
Similar presentations
Layered Architecture Group 1 - Wesley Flowers, Brian Kennedy, Corey Masters, Everett Thayer, Andre Vicente.
Advertisements

9.5 Software Architecture
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
Architectural Styles. Definitions of Architectural Style  Definition. An architectural style is a named collection of architectural design decisions.
Designing the system Conceptual design and technical design
Software Architecture Design Instructor: Dr. Jerry Gao.
System Design: Decomposing the System
Lecture 23: Software Architectures
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Applying Architectural Styles and Patterns
SWE Introduction to Software Engineering
Establishing the overall structure of a software system
Architectural Design Principles. Outline  Architectural level of design The design of the system in terms of components and connectors and their arrangements.
Architectural Design, Distributed Systems Architectures
Course Instructor: Aisha Azeem
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Event-Driven Architecture Team 4 – Idris Callins, Jestin Keaton, Bill Pegg, Steven Ng.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Software Engineering Architectural Design
BY VEDASHREE GOVINDA GOWDA
Software Architecture
MVC pattern and implementation in java
Chapter 7: Architecture Design Omar Meqdadi SE 273 Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Topic 7Summer ICS 52: Introduction to Software Engineering Lecture Notes for Summer Quarter, 2003 Michele Rousseau Topic 7 Partially based on lecture.
Architectural Design. Recap Introduction to design Design models Characteristics of good design Design Concepts.
1 CMPT 275 High Level Design Phase Architecture. Janice Regan, Objectives of Design  The design phase takes the results of the requirements analysis.
Architectural Design, Distributed Systems Architectures
An Introduction to Software Architecture
9.4 Software Architecture
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Reactor Design Patterns: Command and Observer.
Architectural Design To explain the advantages and disadvantages of different distributed systems architectures To discuss client-server and distributed.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architecture styles Pipes and filters Object-oriented design Implicit invocation Layering Repositories.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Architectural Styles Part I Software Architecture Lecture 5.
Architectural Design lecture 10. Topics covered Architectural design decisions System organisation Control styles Reference architectures.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architectural Design 10/24/2015ICS 413 – Software Engineering1.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
 Repository Model  Client-Server Model  Layered Model  Modular decomposition styles  Object Models  Function Oriented Pipelining  Control Styles.
Krista Lozada iAcademy First Term 2009
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
John D. McGregor Class 4 – Initial decomposition
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 13. Review Shared Data Software Architectures – Black board Style architecture.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 11 Slide 1 Architectural Design.
CSC480 Software Engineering Lecture 10 September 25, 2002.
©Ian Sommerville, Robin Abraham 2004CS 361, Summer 2004 Slide 1 Architectural Design.
1 5/18/2007ã 2007, Spencer Rugaber Architectural Styles and Non- Functional Requirements Jan Bosch. Design and Use of Software Architectures. Addison-Wesley,
Layered Systems Rahul Nabar CS 551 Fall ’02. Layered or Hierarchical Designs A layered system is organized hierarchically, each layer providing service.
System Design. System Design After analyzing the problem, you must decide how to approach the design. During.
Slide 1 Lecture 15 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Lecture VIII: Software Architecture
CS223: Software Engineering Lecture 14: Architectural Patterns.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
BZUPAGES.COMSoftware Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
Software architecture
SOFTWARE DESIGN AND ARCHITECTURE
Software Design and Architecture
Part 3 Design What does design mean in different fields?
John D. McGregor Quality attributes
Princess Nourah bint Abdulrahman University
Software Architecture
Architectural Design.
Software models - Software Architecture Design Patterns
Presentation transcript:

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Styles

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 2 Objectives  To review the definitions of software architecture and architectural style  To present several important architectural styles, including Layered Pipe-and-Filter Shared-Data Event-Driven Model-View-Controller Hybrid

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 3 Topics  Software architecture and architectural styles  Layered style  Pipe-and-Filter style  Shared-Data style  Event-Driven style  Model-View-Controller style  Hybrid architectures

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4 Software Architecture A software architecture is the structure of a program comprised by its major constituents, their responsibilities and properties, and the relationships and interactions between them.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 5 Software Architecture Issues  Gross decomposition of system function  Allocation of functions to components  Component interfaces  Communication and interaction among components  Component and system properties: capacity, throughput, constraints  Reuse of common design styles

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 6 Architectural Styles An architectural style is a paradigm of program or system constituent types and their interactions.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 7 Layered Style Architectures  The program is partitioned into an array of layers or groups.  Layers use the services of the layer or layers below and provide services to the layer or layers above.  The Layered style is among the most widely used of all architectural styles.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 8 Uses and Invokes  Module A uses module B if a correct version of B must be present for A to execute correctly.  Module A calls or invokes module B if A triggers execution of B.  Note that A module may use but not invoke another A module may invoke but not use another A module may both use and invoke another A module may neither use nor invoke another

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 9 Layer Constraints  Static structure—The software is partitioned into layers that each provide a cohesive set of services with a well- defined interface.  Dynamic structure—Each layer is allowed to use only the layer directly below it (Strict Layered style) or the all the layers below it (Relaxed Layered style).

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 10 Representing Layers

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11 Forming Layers  Levels of abstraction Example: Network communication layers  Virtual machines Examples: Operating systems, interpreters  Information hiding, decoupling, etc Examples: User interface layers, virtual device layers

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 12 Layered Style Advantages  Layers are highly cohesive and promote information hiding.  Layers are not strongly coupled to layers above them, reducing overall coupling.  Layers help decompose programs, reducing complexity.  Layers are easy to alter or fix by replacing entire layers, and easy to enhance by adding functionality to a layer.  Layers are usually easy to reuse.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 13 Layered Style Disadvantages  Passing everything through many layers can complicate systems and damage performance.  Debugging through multiple layers can be difficult.  Getting the layers right can be difficult.  Layer constraints may have to be violated to achieve unforeseen functionality.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 14 Pipe-and-Filter Style  A filter is a program component that transforms an input stream to an output stream.  A pipe is conduit for a stream.  The Pipe-and-Filter style is a dynamic model in which program components are filters connected by pipes.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 15 Pipe-and-Filter Example

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 16 Pipe-and-Filter Characteristics  Pipes are isolated and usually only communicate through data streams, so they are easy to write, test, reuse, and replace.  Filters may execute concurrently. Requires pipes to synchronize filters  Pipe-and-filter topologies should be acyclic graphs. Avoids timing and deadlock issues  A simple linear arrangement is a pipeline.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 17 Pipe-and-Filter Advantages  Filters can be modified and replaced easily.  Filters can be rearranged with little effort, making it easy to develop similar programs.  Filters are highly reusable.  Concurrency is supported and is relatively easy to implement.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 18 Pipe-and-Filter Disadvantages  Filters communicate only through pipes, which makes it difficult to coordinate them.  Filters usually work on simple data streams, which may result in wasted data conversion effort.  Error handling is difficult.  Gains from concurrency may be illusory.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 19 Shared-Data Style  One or more shared-data stores are used by one or more shared-data accessors that communicate solely through the shared- data stores.  Two variants: Blackboard style—The shared-data stores activate the accessors when the stores change. Repository style—The shared-data stores are passive and manipulated by the accessors.  This is a dynamic model only.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 20 Shared-Data Style Example

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 21 Shared-Data Style Advantages  Shared-data accessors communicate only through the shared-data store, so they are easy to change, replace, remove, or add to.  Accessor independence increases robustness and fault tolerance.  Placing all data in the shared-data store makes it easier to secure and control.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 22 Shared-Data Style Disadvantages  Forcing all data through the shared- data store may degrade performance.  If the shared-data store fails, the entire program is crippled.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 23 Event-Driven Style  Also called the Implicit Invocation style  An event is any noteworthy occurrence.  An event dispatcher mediates between components that announce and are notified of events.  This is a dynamic model only.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 24 Event-Driven Style Example

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 25 Stylistic Variations  Events may be notifications or they may carry data.  Events may have constraints honored by the dispatcher, or the dispatcher may manipulate events.  Events may be dispatched synchronously or asynchronously.  Event registration may be constrained in various ways.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 26 Event-Driven Style Advantages  It is easy to add or remove components.  Components are decoupled, so they are highly reusable, changeable, and replaceable.  Systems built with this style are robust and fault tolerant.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 27 Event-Driven Style Disadvantages  Component interaction may be awkward when mediated by the event dispatcher.  There are no guarantees about event sequencing or timing, which may make it difficult to write correct programs.  Event traffic tends to be highly variable, which may make it difficult to achieve performance goals.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 28 Model-View-Controller (MVC) Style  This style models how to set up the relationships between user interface and problem-domain components.  Model—A problem-domain component with data and operations for achieving program goals independent of the user interface  View—A data display component  Controller—A component that receives and acts on user input

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 29 MVC Static Structure

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 30 MVC Behavior

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 31 MVC Advantages  Views and controllers can be added, removed, or changed without disturbing the model.  Views can be added or changed during execution.  User interface components can be changed, even at runtime.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 32 MVC Disadvantages  Views and controller are often hard to separate.  Frequent updates may slow data display and degrade user interface performance.  The MVC style makes user interface components highly dependent on model components.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 33 Hybrid Architectures Most systems of any size include several architectural styles, often at different levels of abstraction. An overall a system may have a Layered style, but the one layer may use the Event-Driven style, and another the Shared-Data style. An overall system may have a Pipe-and- Filter style, but the individual filters may have Layered styles.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 34 Summary 1  In the Layered style program components are partitioned into layers and each layer is constrained to use only the layer or layers beneath it.  In the Pipe-and-Filter style components are filters connected by pipes.  In the Shared-Data style program components are modeled as one or more shared-data stores manipulated by one or more shared-data accessors.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 35 Summary 2  In the Event-Driven style program components register with an event dispatcher than accepts announcement of events and notifies interested components that events have occurred.  In the Model-View-Controller style user interface view and controller components can use problem-domain model components that notify them when they change.

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 36 Summary 3  Architectures are usually composed of several styles, often at different levels of abstraction, that is, architectures are often hybrids of styles.