Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design Design and Software Architecture. The design phase The analysis phase describes what the system should be doing The design phase describes how.

Similar presentations


Presentation on theme: "Design Design and Software Architecture. The design phase The analysis phase describes what the system should be doing The design phase describes how."— Presentation transcript:

1 Design Design and Software Architecture

2 The design phase The analysis phase describes what the system should be doing The design phase describes how the system will do it – We’re working at the level of designing the code itself (in part)

3 Different types of design Architecture design (SWE 443) – Layers of the software (e.g. model, view, controller (MVC)) – Categories of classes (e.g. UI, Business logic, interfaces) Component design (SWE 332) – Individual classes UI design (SWE 205) – Sample screens – UI guidelines Data design – Database design – Data structure design

4 Good design Design principles – What you should try to do Design patters – What other people have done and found successful Design metrics – How do you measure what you have done, to decide if it is good?

5 Bad design Software that is rigid – Hard to change because every change affects a large part of the system. Example? Fragility – When you make a change, unexpected bad things happen. Example? Immobility – Can’t reuse components successfully. Example?

6 Design principle examples Single responsibility principle (see video) Interface segregation principle (see video) Many more that we have talked about other classes related to OO concepts of abstraction and information hiding

7 Design pattern examples Singleton (see video) Factory (see video) Visitor (see video) Many many more

8 Design metrics Class size Methods per class Lack of cohesion (too many methods with dissimilar purpose) Coupling between classes (we want to keep this low) Depth of inheritance tree Method complexity

9 Quiz review What is a design principle? – Single Responsibility Principle – Interface Segregation Principle What is a design pattern? – What is the point of the singleton pattern? – What is the point of the factory pattern? – What is the point of the visitor pattern? What is rigid software? Fragile software? Immobile software? What is class cohesion? What is class coupling?

10 In-class exercises Imagine I am writing code for Amazon. What is wrong with the following interface, if I will have movies, t-shirts, and books all implement it? (it’s pseudocode btw) interface Item{ – double getPrice() – int getWeight() – int getLength() – String getItemName() }


Download ppt "Design Design and Software Architecture. The design phase The analysis phase describes what the system should be doing The design phase describes how."

Similar presentations


Ads by Google