Presentation is loading. Please wait.

Presentation is loading. Please wait.

SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin.

Similar presentations


Presentation on theme: "SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin."— Presentation transcript:

1 SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin

2 Agenda – Lecture 11b Exercise Set 8: finishing up GRASP: Indirection
Interfaces (& Larman’s example of Composite) From Requirements to Design 1/17/2019 SOEN 343, © P.Chalin,

3 Sample JSP: Hello.jsp – Exercise Set 8 used ViewTaskList.jsp
page contentType=“…" import=“…" %> <html> <% String fullName = (String) request.getAttribute("fullName"); %> <head><title>Hello</title></head> <body> <h1>Hello <%= fullName %>!</h1> </body> </html> 1/17/2019 SOEN 343, © P.Chalin,

4 GRASP … Polymorphism. Pure Fabrication. Indirection.
Protected Variations. 1/17/2019 SOEN 343, © P.Chalin,

5 GRASP: Indirection Problem
Where to assign a responsibility to avoid direct coupling between two (or more) things? How to de-couple objects so that low coupling is supported and reuse potential remains higher? Solution Assign the responsibility to an intermediate object to mediate between other components or services so that they are not directly coupled. Can you think of an example from EA? 1/17/2019 SOEN 343, © P.Chalin,

6 Redesigning Do-it-all TS (6 classes)
Presentation Do-it-all Transaction Script Page Controller Template View redesign Transaction Script Person Domain Person Mapper Table Data Gateway Data Source 1/17/2019 SOEN 343, © P.Chalin,

7 Indirection Mapper Mapper isolates Person from TDG and TDG from Person. 1/17/2019 SOEN 343, © P.Chalin,

8 Interfaces A class defines both An interface defines only a type.
A type, and A (complete or partial) implementation. An interface defines only a type. An interface contains only Non-static, public methods, or Static, public final fields. (Cf. Liskov-Guttag – Prog. Dev. in Java) 1/17/2019 SOEN 343, © P.Chalin,

9 Happy Interface Actually represents this (which is also legal)
public interface Happy { int i = 0; void happy(); } Actually represents this (which is also legal) static final int i = 0; /* non-static */ abstract void happy(); 1/17/2019 SOEN 343, © P.Chalin,

10 Interfaces: Illustration (Realization of multiple interfaces)
(Diagram given in class) Person, HS_Person Happy, Sad interfaces. 1/17/2019 SOEN 343, © P.Chalin,

11 Composite Pricing Strategies
Interface Realization 1/17/2019 SOEN 343, © P.Chalin,

12 How do I come up with a design?
Recall … Way back in week 5b we asked the question … How do I come up with a design? 1/17/2019 SOEN 343, © P.Chalin,

13 How Do I Come Up With a Design?
What are the inputs to the activities of design? What are the outputs? 1/17/2019 SOEN 343, © P.Chalin,

14 Design Activities: Inputs & Outputs
Product requirements Project plan Architectural factors … Architecture Document Architectural Style(s) 1/17/2019 SOEN 343, © P.Chalin,

15 Design Input: SRS What is contained in the SRS? (name some of its parts) Answer is on next slide 1/17/2019 SOEN 343, © P.Chalin,

16 Design: From SRS to ... Domain Model Use Case Model Design Model
Control Style / Pattern User-interface design … 1/17/2019 SOEN 343, © P.Chalin,

17 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.) 1/17/2019 SOEN 343, © P.Chalin,

18 Presentation Domain Data Source EA Patterns Page Controller
Template View Presentation Front Controller Transform View Domain Model Transaction Script Domain Data Mapper Active Record Table Module Row Data Gateway Table Data Gateway Data Source 1/17/2019 SOEN 343, © P.Chalin,

19 Enterprise Applications:Domain Model
Requirements Domain Model Design Model: classes Domain Model pattern 1/17/2019 SOEN 343, © P.Chalin,

20 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 … 1/17/2019 SOEN 343, © P.Chalin,

21 Conceptual Classes to Design Classes
Domain Model pattern Domain Model pattern 1/17/2019 SOEN 343, © P.Chalin,

22 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. 1/17/2019 SOEN 343, © P.Chalin,

23 From Rich Conceptual Domain Model to Rich set of Domain Model classes
Rich Conceptual Domain Model will usually translate into a rich set of Domain Model classes. 1/17/2019 SOEN 343, © P.Chalin,

24 Tutorial Support for A2. A3 will be posted shortly.
1/17/2019 SOEN 343, © P.Chalin,


Download ppt "SOEN 343 Software Design Computer Science and Software Engineering Department Concordia University Fall 2004 Instructor: Patrice Chalin."

Similar presentations


Ads by Google