Seminar on Design and Architecture Patterns

Rossi: Design Patterns - Hands on Exercise I

The starting point is a design diagram with two design patterns implemented submitted in the previous iteration.

Lesson outline


Students will receive a list of patterns to implement before the seminar. For some of the requirements of the project, there is a live demo of SonarQube https://next.sonarqube.com/sonarqube (not 1-1 matching with the specifications of QualityIS, but can be useful to see how metrics / reporting works - in general to get some inspiration).

The seminar is divided in three parts:

  1. 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.
  2. 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?
  3. Implement *two* design patterns into the design model, including pattern details.  You will have to implement two additional patterns next time, so you can pick those that you prefer first from the Jamboards below. 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.
  4. You find the list of patterns to implement in the Jamboard of each team:

The design class diagram & object diagram with the assigned design patterns (*two* patterns per team) 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  / state diagram).

Note: if you export the diagram as an image *do not take a screenshot* just go to Project->Export->Active Diagram as Image... you can then select the format (jpg/png/etc...) and even export in 300dpi or higher resolution). Alternative way, just go to Tools->Doc Composer drag & drop the diagram and then on the top right Save as PDF...

Please ensure to submit in the homework vault by Monday 7th Nov 2022 23:59.