80 likes | 266 Views
Design. Design and Software Architecture. 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). Different types of design.
E N D
Design Design and Software Architecture
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)
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
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?
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?
Design principle examples • Single responsibility principle • Interface segregation principle • Open-closed principle • Liskov substitution principle • Many more that we have talked about other classes related to OO concepts of abstraction and information hiding
Design pattern examples • Singleton • Factory • Flyweight • Visitor • Many many more
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