OBJECT ARCHITECTURE DESIGN

Slides:



Advertisements
Similar presentations
Design Patterns.
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
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.
Software Engineering 2003 Jyrki Nummenmaa 1 OBJECT ARCHITECTURE DESIGN These slides continue with our example application, based on the simplified.
Observer Method 1. References Gamma Erich, Helm Richard, “Design Patterns: Elements of Reusable Object- Oriented Software” 2.
Chapter 7 – Object-Oriented Design
9.5 Software Architecture
Reza Gorgan Mohammadi AmirKabir University of Technology, Department of Computer Engineering & Information Technology Advanced design.
SWE Introduction to Software Engineering
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 18 Slide 1 Software Reuse 2.
Software Engineering Muhammad Fahad Khan
Chapter 7: Architecture Design Omar Meqdadi SE 273 Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Design Refinement Using Design Patterns Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
An Introduction to Software Architecture
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.
Component Technology. Challenges Facing the Software Industry Today’s applications are large & complex – time consuming to develop, difficult and costly.
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.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
1 CMPT 275 High Level Design Phase Modularization.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Object Arts.com “Twisting the Triad” The evolution of the Dolphin Smalltalk MVP framework Andy Bower Blair McGlashan Object Arts Ltd.
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.
Introduction to OOAD and UML
Software Architecture and Design BITS C461/IS C341 Software Engineering First Semester Aditya P. Mathur Department of Computer Science Purdue.
Software Reuse. Objectives l To explain the benefits of software reuse and some reuse problems l To discuss several different ways to implement software.
Software Hardware refers to the physical devices of a computer system.
Design Patterns-1 7 Hours.
GRASP – Designing Objects with Responsibilities
Design Patterns: MORE Examples
Software Design Refinement Using Design Patterns
Support for the Development of Interactive Systems
Chapter 5 – Design and Implementation
Chapter 7 – Object-Oriented Design
Chapter 5:Design Patterns
IS301 – Software Engineering Dept of Computer Information Systems
Introduction to Design Patterns
Chapter 11 Object-Oriented Design
Java Beans Sagun Dhakhwa.
The Systems Engineering Context
Observer Design Pattern
OO Methodology OO Architecture.
Distribution and components
Instructor: Dr. Hany H. Ammar
The Object Oriented Approach to Design
Recall The Team Skills Analyzing the Problem (with 5 steps)
Service-centric Software Engineering
Interpreter Style Examples
Model-View-Controller Patterns and Frameworks
Patterns.
Component--based development
Starting Design: Logical Architecture and UML Package Diagrams
Analysis models and design models
An Introduction to Software Architecture
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
Design Patterns Lecture part 1.
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)
Applying Use Cases (Chapters 25,26)
Chapter 5 Architectural Design.
Design Yaodong Bi.
Presented by Igor Ivković
OBJECT DESIGN Now we need to design in such detail that the design can be implemented. It will be important to know, which structures the programming language.
From Use Cases to Implementation
Presentation transcript:

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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

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

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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

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. 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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

Component Diagram For The Game Application GameGUI Game Controller GameControllerInterface GameModel GameModelInterface 4.10.2004 Software Engineering 2004 Jyrki Nummenmaa

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

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