15.1.2003Software Engineering 2003 Jyrki Nummenmaa 1 OBJECT ARCHITECTURE DESIGN These slides continue with our example application, based on the simplified.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Advertisements

Software Engineering 2003 Jyrki Nummenmaa 1 A BASIC OO SOFTWARE DEVELOPMENT PROCESS Earlier, we saw a number of different software lifecycle models.
Software Engineering – University of Tampere, CS DepartmentJyrki Nummenmaa SOFTWARE ARCHITECTURES An architecture contains the.
Observer Method 1. References Gamma Erich, Helm Richard, “Design Patterns: Elements of Reusable Object- Oriented Software” 2.
Design Patterns Pepper. Find Patterns Gang of Four created 23 Siemens published another good set x
Chapter 7 – Object-Oriented Design
9.5 Software Architecture
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
The Bridge Pattern.. Intent Decouple an abstraction from its implementation so that the two can vary independently Also known as: Handle/Body.
Reza Gorgan Mohammadi AmirKabir University of Technology, Department of Computer Engineering & Information Technology Advanced design.
Observer Pattern Fall 2005 OOPD John Anthony. What is a Pattern? “Each pattern describes a problem which occurs over and over again in our environment,
THE OBJECT-ORIENTED DESIGN WORKFLOW Interfaces & Subsystems.
SWE Introduction to Software Engineering
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
The Need for Packages How do you break down a large system into smaller systems? Structured methods use functional decomposition Functions represent something.
System Architecture: Desing alternatives and methodologies.
Course Instructor: Aisha Azeem
The course builder architecture & project planning presented by: Bahareh Agha Jafari.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse 2.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 18 Slide 1 Software Reuse.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
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.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
MVC and MVP. References enter.html enter.html
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
An Introduction to Software Architecture
9.4 Software Architecture
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
Chapter 7 – Design and Implementation Lecture 2 1Chapter 7 Design and implementation.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
CSE 219 Computer Science III Program Design Principles.
Patterns and Reuse. Patterns Reuse of Analysis and Design.
Component Technology. Challenges Facing the Software Industry Today’s applications are large & complex – time consuming to develop, difficult and costly.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
SE-02 COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require.
GRASP: Designing Objects with Responsibilities
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Model View Controller MVC Web Software Architecture.
University of Toronto at Scarborough © Kersti Wain-Bantin CSCC40 system architecture 1 after designing to meet functional requirements, design the system.
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
Object Arts.com “Twisting the Triad” The evolution of the Dolphin Smalltalk MVP framework Andy Bower Blair McGlashan Object Arts Ltd.
1 CSE 331 Model/View Separation and Observer Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
CS223: Software Engineering Lecture 14: Architectural Patterns.
Design and implementation Chapter 7 – Lecture 1. Design and implementation Software design and implementation is the stage in the software engineering.
Software Engineering 2003 Jyrki Nummenmaa 1 OBJECT DESIGN Now we need to design in such detail that the design can be implemented. It will be.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Chapter 5 – Design and Implementation
Observer Design Pattern
Model-View-Controller Patterns and Frameworks
Component--based development
Analysis models and design models
An Introduction to Software Architecture
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
OBJECT ARCHITECTURE DESIGN
COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding.
Applying Use Cases (Chapters 25,26)
Presentation transcript:

Software Engineering 2003 Jyrki Nummenmaa 1 OBJECT ARCHITECTURE DESIGN These slides continue with our example application, based on the simplified OMT-based technique. I am not trying to cover all or not even most aspects here. We will have other examples to show how things can be done differently.

Software Engineering 2003 Jyrki Nummenmaa 2 What Is Architectural Design? Choices Made In Architectural Design: Components High-Level Design Patterns Architectural Styles A Possible Framework Architecture Processes and Hardware Processes and Communication Other Architecture-Related Decisions -> Some of these issues depend on each other strongly.

Software Engineering 2003 Jyrki Nummenmaa 3 Why Architectural Design? Managing complexity –It is easier to manage complexity, if we divide the application into reasonable parts. Maintainability –Usually a reasonable architecture makes it much easier to maintain the software. –This may actually be the biggest reason for architectural design. Efficiency –A good architecture enables us to isolate the potential causes for inefficiency and makes it possible to scale up performance when load increases.

Software Engineering 2003 Jyrki Nummenmaa 4 Input Information For Architecture Design Analysis model of the application showing what the system is about and what it should do. Hardware environment Software environment - possible database management system - communication technologies - programming language – if known - target operating system(s) – if known

Software Engineering 2003 Jyrki Nummenmaa 5 Architectural Design For Example Game Application Clearly, it seems reasonable to separate the game logic from the user interface. If done suitably, this will also enable multiple client applications with a view to the same game. This kind of an approach is actually quite usual. In fact, so usual, that there is a well-known architectural solution for this kind of setting, called Model-View-Controller architecture (MVC architecture). We will study a variant of MVC from a separate set of slides by Ari Jaaksi, Nokia.

Software Engineering 2003 Jyrki Nummenmaa 6 Design Patterns Our design could follow the principles of MVC (or MVC++) directly. Another possibility is to copy an existing design idea and modify it to our needs. The idea of copying designs like this is the basic idea behind design patterns. It has been difficult to reuse code. The idea of design patterns is to reuse ideas. In a way, applying the MVC model is reusing the idea. However, there have been efforts to give a fixed format for presenting design patterns.

Software Engineering 2003 Jyrki Nummenmaa 7 Design Pattern Description Name Problem Solution –Static: E.g. Class Diagram –Dynamic: E.g. Sequence Diagram Strategy –How to implement the pattern Consequences –Results and trade-offs

Software Engineering 2003 Jyrki Nummenmaa 8 Design Pattern ”Observer” Problem: We want to keep a number of objects (observers) aware of the state of an object (subject) This is done by making the observers subscribe to the subject. Whenever the subjects state changes, it will publish information about that to all subscribed observers.

Software Engineering 2003 Jyrki Nummenmaa 9 Subject {abstract} Subject {abstract} Object {abstract} Object {abstract} update() {abstract} ConcreteSubject ConcereteObserver update() observes * registers for all g in observes { g.update() } attach(x:Observer) detach(x: Observer) notify() Class Diagram for Observer Design Pattern

Software Engineering 2003 Jyrki Nummenmaa 10 :ConcreteSubject t1:ConcreteObserver attach(t1) update() t2:ConcereteObserver attach(t2) notify() update() Changes State A Sequence Diagram For Observer Design Pattern

Software Engineering 2003 Jyrki Nummenmaa 11 Some observations A subject and the respective observers need minimal information on each other. In fact, they need to implement the required operations (attach, detach, notify, update), but that’s about that. This way, we get a high level of independence in their implementations.

Software Engineering 2003 Jyrki Nummenmaa 12 Subject {abstract} Subject {abstract} Object {abstract} Object {abstract} update() {abstract} GameModel GameGUI update() observes * registers for all g in observes { g.update() } attach(x:Observer) detach(x: Observer) notify() Applying The Observer Design Pattern Controller?

Software Engineering 2003 Jyrki Nummenmaa 13 Applying The Observer Pattern Apparently, we can use the Observer pattern for the user interface to observe the state of the game. Q: How is this different from using the MVC model? A: This model does not include the control part, ie. it is more appropriate for situations, where observing is enough. This way, MVC seems more appropriate for our game example. -> Back to the drawing board. The MVC looked better. However, we will look at yet another possibility: components.

Software Engineering 2003 Jyrki Nummenmaa 14 Components - What? Component technologies can be seen as packaging technologies Independent Can be used as a building block to build larger systems – dynamic, ”plug & play” linking Have a well-defined interface, which hides the implementation completely Can be treated as a product of its own Can be installed separately Can be implemented with any language, as long as it implements the necessary interfaces

Software Engineering 2003 Jyrki Nummenmaa 15 Components - Why? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding of the implementation. Building the system from source-level pieces requires that these pieces compile happily with each other. We want to avoid the above problems and build binary components with well-defined interfaces.

Software Engineering 2003 Jyrki Nummenmaa 16 ComponentZ ComponentY InterfaceX Component Diagram implements uses Interface – this may also be represented with stereotype > for a class. component

Software Engineering 2003 Jyrki Nummenmaa 17 Component - Interfaces An interfaces defines a set of services, which semantically belong together. An interface is a contract between the user and the implementor. A componenent may implement many interfaces and an interface may be implemented by many components. Once an interface is released, it does not change. If changes are necessary, a new interface is released. As a matter of fact, you should know all this.

Software Engineering 2003 Jyrki Nummenmaa 18 Component Technologies Microsoft COM & DCOM (distributed COM) CORBA standard –several vendors –heavyweight system Java Beans

Software Engineering 2003 Jyrki Nummenmaa 19 GameGUI Game Controller GameModel GameModelInterface GameControllerInterface Component Diagram For The Game Application

Software Engineering 2003 Jyrki Nummenmaa 20 User Choose to take card Show funds Card Value Sequence Diagram for ”Take Card” at Component Level Pay (1) Updated funds Turn Card Show card value Add Funds (Value) Show funds GameView GameController GameModel Take card Show funds Show card value Updated funds Show funds

Software Engineering 2003 Jyrki Nummenmaa 21 : GameClient : GameServer : GameModel : GameController : GUI > Deployment Diagram Processing resource (a device, not a device type) Component instance Object – ok, this was a component in an earlier slide, this is just for example