1 / 30

Introduction to Software Engineering Lecture 6

Introduction to Software Engineering Lecture 6. André van der Hoek. Today’s Lecture. Architecture design. Magic View. Requirements. Code. Professional View. Requirements. Code. Implementation phase. Testing phase. Test. Verify. ICS 52 Life Cycle. Requirements phase. Verify.

geneva
Télécharger la présentation

Introduction to Software Engineering Lecture 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Software EngineeringLecture 6 André van der Hoek

  2. Today’s Lecture • Architecture design

  3. Magic View Requirements Code

  4. Professional View Requirements Code

  5. Implementation phase Testing phase Test Verify ICS 52 Life Cycle Requirements phase Verify Design phase Verify

  6. Design • Architectural design • High-level partitioning of a software system into separate modules (components) • Focus on the interactions among parts (connections) • Focus on structural properties (architecture) • “How does it all fit together?” • Module design • Detailed design of a component • Focus on the internals of a component • Focus on computational properties • “How does it work?”

  7. Provided Interface Provided Interface Provided Interface Audio Player Audio Encoder Selector Required Interface Required Interface Required Interface Spotify Example Architectural design Provided Interface Module design Compressor Encoder Reader Required Interface

  8. Design Interaction Architectural design (this lecture) Module design (next lecture)

  9. Elements Floors Walls Rooms Types Office building Villa Aircraft hanger Styles Colonial Victorian Southwestern Rules and regulations Electrical Structural Elements Components Interfaces Connections Types Office automation Game Space shuttle control Styles Pipe and filter Layered Implicit invocation Rules and regulations Use of interfaces Methods of change Architectural Design Software Buildings

  10. Software Architecture: Essentials • Components • What are the main parts? • What aspects of the requirements do they correspond to? Where did they come from? • Examples: filters, databases, GUIs, interpreters • Connections • How do components communicate? • Examples: procedure calls, messages, pipes, event broadcast • Topology • How are the components and connections organized topologically? • Constraints (including constraints on change)

  11. Comparison to Module Design ArchitectureModules • interactions among parts • implementations of parts • structural properties • computational properties • system-level performance • algorithmic performance • outside module boundary • inside module boundary

  12. Where do Architectures and Components Come From? • Architectures: typically driven by kind of application • Often possible to solve one problem many different ways • Components: many design strategies • ICS 52 component strategy: • Component design by information hiding • Designing systems for ease of extension and contraction • An OO design approach • Rationale: design systems that have a long, useful lifetime

  13. We Can Do Anything… Provided Interface Provided Interface Tiny Component Big Component Required Interface Required Interface Provided Interface B Component Required Interface Provided Interface Provided Interface A Component Mr. Component Provided Interface Required Interface Required Interface Some Component Required Interface Provided Interface Mrs. Component Required Interface Provided Interface Provided Interface One Component Yet Component Required Interface Required Interface

  14. …But Style Has Proven to Help • Architectural styles restrict the way in which components can be connected • Prescribe patterns of interaction • Promote fundamental principles • Rigor, separation of concerns, anticipation of change, generality, incrementality • Low coupling • High cohesion • Architectural styles are based on success stories • Almost all compilers are build as “pipe-and-filter” • Almost all network protocols are build as “layers”

  15. Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Subcomponent Subcomponent Subcomponent Subcomponent Subcomponent Subcomponent Subcomponent Subcomponent Main component Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Style 1: Hierarchy Connections are function or method calls

  16. Provided Interface Provided Interface Provided Interface Provided Interface Client Client Client Server Required Interface Required Interface Required Interface Required Interface Style 2: Client-Server Connections are remote procedure calls or remote method invocations

  17. Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface A “Part” His “Bit” Her “Piece” One “Part” Another “Piece” My “Bit” Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Provided Interface Blackboard Style 3: Blackboard Connections are encapsulated global variables

  18. Provided Interface Provided Interface Provided Interface Peer Peer Peer Required Interface Required Interface Required Interface Style 4: Peer-to-Peer Connections are remote procedure calls or remote method invocations

  19. Provided Interface Provided Interface Provided Interface Provided Interface Filter Filter Filter Filter Required Interface Required Interface Required Interface Required Interface Style 5: Pipe-and-Filter Connections are pipes (also called data flows)

  20. Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Component Component Bus Component Component Required Interface Required Interface Required Interface Required Interface Required Interface Style 6: Implicit Invocation Connections are events on the software bus

  21. Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Layer 1 Layer 4 Layer 1 Layer 4 Layer 3 Layer 2 Layer 3 Layer 2 Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Style 7: Layers (Take 1) Connections are function or method calls + “something in between”

  22. extended basic core core Style 7: Layers (Take 2) Connections are function or method calls

  23. Many Other (Variants of) Styles • Interpreters • Batch sequential • Data abstraction/OO systems • Model View Controller (MVC) • …

  24. Different Styles, Different Situations • Layers • Seven network layers in OSI reference model • Blackboard • Databases • Inventory/stock management systems • Client-server • Web browser/Web server • Peer-to-peer • Distributed databases • Communication satellites

  25. Choosing the Right Style • Ask questions on whether a certain style makes sense • The Internet as a blackboard • Does that scale? • Stock exchange as a layers • How to deal with the continuous change? • Math as hierarchy • How to properly call different modules for different functions? • Draw a picture of the major entities • Look for the natural paradigm • Look for what “feels right”

  26. Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface A “Part” His “Bit” Her “Piece” One “Part” Another “Piece” My “Bit” Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Provided Interface Blackboard Mixing Styles Is Often Necessary Blackboard + Client-Server

  27. Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Provided Interface Another “Piece” A “Part” His “Bit” My “Bit” One “Part” Her “Piece” Required Interface Required Interface Required Interface Required Interface Required Interface Required Interface Provided Interface Blackboard Original Blackboard

  28. Provided Interface Provided Interface Provided Interface Provided Interface One “Part” A “Piece” Some “Bit” Bus Required Interface Required Interface Required Interface Required Interface Mixing Styles is often Necessary Provided Interface Blackboard Blackboard + Implicit Invocation

  29. Provided Interface Provided Interface Provided Interface Audio Encoder Tuner Audio Player Required Interface Required Interface Required Interface Mixing Styles Is Often Necessary Pipe FCalls Pipe-and-Filter + Client-Server + Hierarchy

  30. Your Tasks • Read and study slides of this lecture • Memorize the architectural styles • Read and study Chapter 11 of van Vliet

More Related