New version page

Software Design Refinement

Upgrade to remove ads

This preview shows page 1-2-16-17-18-33-34 out of 34 pages.

Save
View Full Document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience

Upgrade to remove ads
Unformatted text preview:

Software Design Refinement Using Design PatternsOutlinePowerPoint PresentationDesign RefinementClass Diagram Refinement Using Design PatternsWhat is a Design PatternDefining a Design PatternExample of Pattern Definition: The Façade Pattern Provides An Interface To a SubsystemThe Facade PatternExample of Using the Design PatternSlide 11Another Example of Design PatternsThe Strategy PatternExamples of Design Patterns The Strategy PatternExamples of Design Patterns The Strategy Pattern: another exampleSlide 16Another example of using the Strategy Pattern: A Job Application SystemExamples of Design Patterns The State PatternSlide 19Slide 20Examples of Design PatternsSlide 22Slide 23Slide 24Slide 25Types of Design Patterns The Gang of Four (GoF) Patterns (Gamma et al 1995)Examples of Behavioral Design Patterns The Command Pattern: operator commands or user or customer requests are treated as a class of objectsThe Command PatternExamples of Behavioral Design Patterns The Observer Pattern: Multiple observer objects are notified when changes of states subjects occurThe Observer PatternExamples of Structural Design Patterns The Composite PatternExamples of Design Patterns The Composite Pattern :File System StructureExamples of Structural Design Patterns The Proxy Pattern (used heavily in communication software, CORBA, SOA )Design Patterns Examples and TutorialsSoftware Design RefinementUsing Design Patterns Instructor: Dr. Hany H. AmmarDept. of Computer Science and Electrical Engineering, WVUOutlineThe Requirements, Analysis, Design, and Design Refinement ModelsDesign refinementClass diagram refinement using design patternsDesign patterns examples–The Facade pattern–The Strategy Pattern–The State Pattern–The Command Pattern–The Observer Pattern–The Proxy PatternDesign Patterns TutorialsThe Requirements, Analysis, Design, and Desgin Refiement ModelsStatic Analysis Dynamic AnalysisFunctional/ NonfunctionalRequirementsUse Case Diagrams/Sequence Diagrams(the system level)- Analysis Class Diagrams- State Diagrams/Refined Sequence Diagrams (The object level)Requirements ElicitationProcessThe AnalysisProcessStatic ArchitecturalDesign Dynamic DesignThe DesignProcess:• Initial Design•Design Refinement• Design Class Diagrams • Design Sequence DiagramsDesign Refinement• Refined Design Class DiagramsDesign RefinementIt is difficult to obtain a quality design from the initial designThe initial design is refined to enhance design quality using the software design criteria of modularity, information hiding, complexity, testability, and reusability.New components (or new classes) are defined and existing components (or classes) structures are refined to enhance design qualityThe design refinement step is an essential step before implementation and testing.Class Diagram RefinementUsing Design Patterns Design Class Diagrams are further refined to enhance design quality (i.e., reduce coupling, increase cohesion, and reduce component complexity) using design patternsA design pattern is a documented good design solution of a design problemRepositories of design patterns were developed for many application domains (communication software, agent-based systems, web applications)Many generic design patterns were defined and can be used to enhance the design of systems in different application domainsWhat is a Design PatternWhat is a Design Pattern? A design pattern describes a design problem which repeatedly occurred in previous designs, and then describes the core of the solution to that problem Solutions are expressed in terms of classes of objects and interfaces (object-oriented design patterns)A design pattern names, abstracts, and identifies the key aspects of a high quality design structure that make it useful for creating reusable object-oriented designsDefining a Design PatternDesign Patterns are documented in the literature by a template consisting of the followingA Design Pattern has 5 basic parts:1. Name2. Problem3. Solution4. Consequences and trade-of of application5. Implementation: An architecture using a design class diagramExample of Pattern Definition: The Façade Pattern ProvidesAn Interface To a SubsystemThe Facade PatternThe class Facade is introduced as an interface to the whole subsystem.Any client class needs a service from any of the subsystem classes will be send the request to the facade class.All the subsystem interfaces are combined in one classExample of Using the Design PatternDesign Patterns produce quality designs by reducing couplingExample of how a Façade Pattern reduces couplingAnother Example: The Strategy Pattern templateAnother Example of Design PatternsThe Strategy Pattern: lets the algorithm vary independently from clients that use it Abstract ClassController ClassControl Strategy AControl Strategy B Control Strategy CDefault control StrategyThe Strategy PatternThe Strategy Pattern Context class has multiple control strategies provided by the concrete strategy classes, or by the abstract strategy (by default) The pattern lets us vary the algorithm that implements a certain function during run time depending on the conditions of the system The Pattern reduces coupling by having the client class be coupled only to the context classExamples of Design PatternsThe Strategy PatternExample of using the pattern in JAVA AWT GUI components lay out managersExamples of Design PatternsThe Strategy Pattern: another exampleSituation: A GUI text component object wants to decide at runtime what strategy it should use to validate user input. Many different validation strategies are possible: numeric fields, alphanumeric fields, telephone-number fields, etc.Exampleof using the StrategyPattern: SpeedControlIs the Strategy classAnother example of using the Strategy Pattern: A Job Application SystemThe complexity of class JobApplication is reduced by moving the validate() operation to the Strategy Pattern classesHostValidatorvalidate()(from patterns)ManagerValidatorvalidate()(from patterns)WaitStaffValidatorvalidate()(from patterns)BartenderVali datorvalidate()(from patterns)BusValidatorvalidate()(from patterns)JobApplicantCli entmain()runTest()(from common)ApplicantRuleFactorygetAppli cantValidationRule()(from patterns)JobApplicantFormJOB_MANAGER : int = 1JOB_WAIT_STAFF : int = 2JOB_BUSSER : int = 3JOB_BARTENDER : int = 4JOB_HOSTER : i nt = 5position : intname : Stringphone :


Download Software Design Refinement
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Software Design Refinement and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Software Design Refinement 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?