Seminar on Design and Architecture Patterns
Rossi: Design Patterns - Hands on Exercise I
The seminar is divided in three parts:
- Convert the analysis diagram (what you had so far with the analysis patterns) into a design diagram: 1. Open the Model Explorer in VP 2. right click on the root (typically the name of your project) 3. Model-> Design Model (or you can use Model->New Model... and create a new namespace for design models with the name you want) 4. Fine the newly created model in the Model Explorer (Design Model): right click and select Sub Diagrams->New Diagram... creating a new class diagram that you can name it as you like (something like QualityIS Design Class Diagram). 5. Find your analysis class diagram in VP and open it. 6. CTRL+A (select all) then CTRL+C (copy) 7. Open now your design class diagram (should be empty) right click on the drawing area and select Paste Model Element (important, as you do not want to paste the view to the other diagram). Now you should be ready to modify the diagram.
- Modify the copied diagram into a proper design diagram: 1. add any manager class that should be allowing (C)reation, (R)eading, (U)pdating, (D)eleting instances based on domain classes. 2. Update the classes with methods, parameters, attributes - navigability is now important (which class should store references to other classes?). You might now use also aggregation/composition in the models. You can also use dependencies (either generic, or call / use) to show dependency between classes 3. extract any interfaces / abstract classes for common behaviour. 4. Look that you can run some common scenario you had in the Use Cases (e.g., if I run analysis, using the model and the method calls, do I manage to generate a report based on the metrics and the set quality thresholds?) 5. look also at the analysis patterns you added, do they need to be modified / simplifies / enhanced during the design phase?
- Implement two design patterns into the design model, including pattern details. You want to be as detailed as possible. Please also try to highlight the parts of the diagram where you are implementing a design pattern.
The design class diagram with the assigned design patterns shall be submitted as a result of this seminar. Depending on the type of pattern, additional diagrams can be submitted to better explain the application of a pattern (e.g., sequence diagram / object diagram / state diagram).