Identify and Fix Design Issues with the Model Quality Checker

Model Quality Checker is a diagnostic tool that identifies potential design problems in your project. The tool lists out problems on model element basis. It is recommended to study each of the identified problems carefully and decide whether to ignore it, or to perform a fix accordingly.

July 12, 2011
User Rating: / 6
Views: 1,981
PDF Link Add comments
Edition: Standard or above (Edition comparison)

Model Quality Checker calculates the elements' overall score on quality of design. Initially, all model elements are assumed to be perfect in design. When running the Model Quality Checker, a series of checking would be performed on every model element in the project. When it finds a design issue, marks would be deducted from that model element. And the deduction for issues varies. When the checking is done, an overall score is obtained for each model element. The lower the score, the more rule violations the checking seems to have found.


In this tutorial, we will draw a simple class diagram and then show you how to make use of the Model Quality Checker in identifying design issues.

Checking the Quality of Your Model

  1. Start Visual Paradigm from UML.
  2. Create a new project by selecting File > New Project from the main menu.
  3. In the New Project dialog box, name the project Model Quality Checker Tutorial. Click Create Blank Project.
  4. Create a class diagram. Right-click on Class Diagram in the Diagram Navigator and select New Class Diagram from the popup menu.
    new class diagram
  5. Use the Diagram Toolbar and the Resource-Centric Interface to draw a class diagram as shown.
    class diagram ready
    Note: The relationship between BankAccount and SavingsAccount and that between BankAccount and CheckingAccount are generalizations.
  6. The Model Quality Checker checks your work on a regular basis. You may also trigger the checking manually. Right-click the background of the diagram and select Show Quality Checker Panel from the popup menu.
    show quality checker
  7. Click on the Recalculate button. This forces the Model Quality Checker to run.
    recal
  8. The Model Quality Checker reports that the User class is problematic (underlined in the diagram).
    class underlined
    In addition, the Quality Checker reports that the User class is Very Bad in the Quality Checker panel. Let's see how bad it is. Expand the node Very Bad. You can see the three problems being identified.
    show problems
    Here are the problems that the Model Quality Checker may find.
    Problem Suggestion How Serious?
    Model element at root Add the model element to a container Mild
    Name does not contain glossary terms Define name as a term in glossary Mild
    Non-blackbox pool with no lane nor contained shapes Set pool to blackbox, add lane or add contained shapes Serious
    Task has more than one outgoing flow Delete excess outgoing flows Serious
    Model element without any relationship Connect the model element with a relationship Very serious

Filtering Problematic Elements to Display Based on their Scores

You can see a slider both on top of the Diagram Toolbar and at the top of the Quality Checker panel. The slider value determines which elements will be underlined in the diagram and listed in the Quality Checker panel. It defines a range from Very Bad to wherever the marker stops at. Elements with a score that falls within this range will appear underlined in the diagram and be listed in the panel. In other words, the farther the slider marker is to the right, the wider of the target range will become. And more problematic elements could possibly be underlined and listed.

  1. Move the slider marker all the way to the right.
    adjust slider
  2. Observe changes in the diagram and the Quality Checker panel. When the slider marker hits Fair, you can see that the three classes BankAccount, SavingsAccount and CheckingAccount are all listed, in addition to the User class.
    classes are shown
  3. This time, the three classes are reported to be Fair. Let's see what kind of problems they've been identified with.
    problem are listed

Fixing and Ignoring Problems

It is recommended to take action upon the problematic elements. If you think that the reported problem is a false alarm, you can select that model element and add it to the ignore list. From now on, the Model Quality Checker will not check and report problems for that element anymore until you remove it from the ignore list. If you agree with the reported problem, you might want to consider revising your design to fix it. Let's try to fix the class diagram.

  1. All four classes share the same problem Model element at root. We know that it would be a good practice to put the classes into a package, rather than placing them at the root. To fix it, double-click the box <default package> at the top left of the class diagram.
    name package
  2. Enter banking to be the name of the package. Press Enter to confirm.
    package named
  3. Click the Recalculate button in the Quality Checker panel. The problem Model element at root is now gone as the four classes are no longer placed at the root.
    problems updated
  4. Very often, a model element exists either to provide some sort of help to another model element, or to seek help from others to perform certain action. It is very rare for a model element not to have any relationships with others at all. It may be possible when everything is put into a single model element, making it unnecessary to talk to any other elements. However, this is not an advisable practice in modeling. Let's check the User class. It's been identified with the problem Model element without any relationship. As it is supposed to connect to the BankAccount to model the fact that 'user can setup a bank account'. Let's add an association between User and BankAccount.
    asso added
  5. Again, click the Recalculate button in the Quality Checker panel. Now, the User class is no longer Very Bad. Instead, it becomes Fair, same as the other three classes.
    problem disappear
  6. We are now left with only one problem - Name does not contain glossary terms. It means that the names of the model elements, such as User and BankAccount, have not been identified as glossary terms. The Model Quality Checker picks this up out of rigorous checking to ensure that the design is of the highest quality possible. But in practice, this may or may not be an issue for some users. So if you do not regard it as a problem, you can just ignore it. Let's go to the Quality Checker panel to do that. Select the four classes.
    sel model element
  7. Click Ignore.
    ignore element
  8. There should be no underlines in the diagram now. And the Quality Checker is no longer reporting any problems.
    no problems
  9. Open the Ignored Model Elements panel. The four classes are listed there.
    ignore classes

Rate this Article

Click on one of the stars below to rate this article from 1 (lowest) to 5 (highest).

You may be interested in

  1. Writing Effective Use Case
  2. Draw Entity Relationship Diagram (ERD)
    Tagged:
  3. UML Package Diagram
    Tagged:
  4. Produce UML Use Cases from Business Process Diagram (BPD)
  5. Oracle database design with Entity Relationship Diagram
Tags of this article:

Comments (0)

Write comment

Rating

Comment

Enter the calculation result

security code