SOEN 343 Software Design - PowerPoint PPT Presentation

About This Presentation
Title:

SOEN 343 Software Design

Description:

How do I come up with a design? How Do I Come Up With a Design? ... (name some of its parts) Domain Model. Use Case Model. Design Model. Control Style / Pattern ... – PowerPoint PPT presentation

Number of Views:19
Avg rating:3.0/5.0
Slides: 38
Provided by: ENCS
Category:
Tags: soen | design | do | domain | how | name | register | software

less

Transcript and Presenter's Notes

Title: SOEN 343 Software Design


1
SOEN 343Software Design
  • Section H Fall 2006
  • Dr Greg Butler
  • http//www.cs.concordia.ca/gregb/home/soen343h-f0
    6.html

2
Outline
  • GoF Design Patterns
  • Adapter, Façade, Strategy, Observer
  • Design Review

3
GoF Pattern Summary Relationships
4
GoF Pattern Classification
  • Behavioral Patterns
  • Creational Patterns
  • Structural Patterns

5
GoF Behavioral Patterns
  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor

6
GoF Creational Patterns
  • Abstract Factory
  • Builder
  • Factory Method
  • Prototype
  • Singleton

7
GoF Structural Patterns
  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

8
Adapter
  • Context / problemHow to resolve incompatible
    interfaces, or provide a stable interface to
    similar components with different interfaces?
  • SolutionConvert the original interface of a
    component into another interface, through an
    intermediate adapter object.

9
Adapter
  • Suppose we have a tax calculation class (or
    external library) but the interface is not well
    suited for our application.

10
Adapter
  • Adapter providesan interface suitedto the
    application

11
Adapter (For More than One Class)
  • What if more than one class (library) needs to be
    adapted?

12
Adapter
13
Facade
14
Facade
15
Strategy
  • Context / problemHow to design for varying, but
    related, algorithms or policies? How to design
    for the ability to change (even dynamically)
    these algorithms or policies?
  • SolutionDefine each algorithm/policy/strategy
    in a separate class with a common interface

16
Strategy
17
How Do We Create a Strategy?
18
Observer Pattern
19
Observer
  • How shall we have the display be updated?
  • Why not have the Sale inform the display when
    it changes value.

20
What is Wrong With This?
21
Observer Pattern
  • Context / ProblemDifferent kinds of subscriber
    objects are interested in the state changes or
    events of a publisher object, and want to react
    in their own way when the publisher generates the
    event.

22
Observer Pattern
  • SolutionDefine a subscriber or listener
    interface. Subscribers implement this interface.
    The publisher can dynamically register
    subscribers who are interested in an event, and
    notify them when an event occurs.
  • Clarification Publisher can dynamically process
    registration requests from subscribers.

23
Observer Pattern (GoF book)
24
Observers Illustration
25
Sale Example
26
Recall
  • Way back in week 5 we asked the question
  • How do I come up with a design?

27
How Do I Come Up With a Design?
  • What are the inputs to the activities of design?
  • What are the outputs?

28
Design Activities Inputs Outputs
  • Product requirements
  • Project plan
  • Architectural factors
  • ArchitectureDocument
  • Architectural Style(s)

29
Design Input SRS
  • What is contained in the SRS?(name some of its
    parts)

30
Design From SRS to ...
  • Domain Model
  • Use Case Model
  • Design Model
  • Control Style / Pattern
  • User-interface design

31
Design Model Classes
  • Domain Model often used as first approximation to
    Design Model.
  • Domain Model contains
  • Conceptual classes
  • Conceptual classes used as basis for similarly
    named design classes.
  • (E.g. Larman, Chapter 16, p. 222.)

32
EA Patterns
Template View
Page Controller
Presentation
Front Controller
Transform View
Domain Model
Transaction Script
Domain
Data Mapper
Table Module
Active Record
Row Data Gateway
Table Data Gateway
Data Source
33
Enterprise ApplicationsDomain Model
  • Requirements Domain Model
  • Design Model classes Domain Model pattern

34
From Requirements to Design
  • Requirements artifacts e.g.
  • Domain Model
  • Use Case Model
  • Design artifacts e.g.
  • Software Architecture Document
  • Design Model
  • User-interface design

35
Conceptual Classes to Design Classes
  • Domain Model pattern
  • Domain Model pattern

36
Representational Gap
  • Larman, Section 17.2
  • The object developer has taken inspiration from
    the real-world domain in creating software
    classes. Therefore, the representational gap
    between how stakeholders conceive the domain, and
    its representation in software, has been lowered.

37
From Rich Conceptual Domain Model to Rich set of
Domain Model classes
Write a Comment
User Comments (0)
About PowerShow.com