Home » Articles

Efficient UML: From Anti-Patterns to Best Practices

19 August 2011 One Comment

During this session at the Jazoon Conference, Rokas Bartkevičius from the NoMagic company presented some UML modeling anti-patterns. They then serve as a basis for discussing Unified Modeling Language best practices that could correct them.

The presenter started by saying that UML is considered as too complex and this is true. The OMG specification size is around 1000 pages and the meta-model contains 248 meta classes for the 15 diagrams. UML provides however an precious tool to create high level vision of the system to develop and a typical modeler can do his job with only 20% of the language. They identified five main anti-patterns from their experience as UML consultants.

1.Code abstraction level

The developer models the system with the code in mind. This results in ccomplex and difficult to read diagrams that are influenced by the programming language, using the same data types for instance. The solution is to rise the level of abstraction.

2. Diagrams are too complex

Diagrams that contain a lot of items become difficult to read and to understand. The presenter has seen sequence diagrams with 450 actions and 950 control flows. The best practice in this case is to use several levels of details, refactoring the initial diagram.

Diagrams are too complex

Diagrams are too complex

3.Misuse of UML concepts

Trying to use concepts that are outside the core of UML can result in inconsistency in modeling conventions, ambiguous understanding and redundant stereotyping. Organizations should try to apply a concise modeling method based on UML subset that should provide value to all stakeholders.

4.No reuse of model elements

This anti-pattern creates duplicated information in separate architecture views and makes it difficult to maintain consistent models. The solution is to integrate the different views using the 4+1 architecture approach proposed by Philippe Kruchten.

4+1 architecture approach

4+1 architecture approach

5.Mixed modeling styles

You can use different styles to model the same context. This could also lead to diagrams that are difficult to understand. As we have coding standards, you can also have modeling standards for presentation, naming and sizing that will improve the understanding of models across the organization.

Conference web site: http://jazoon.com/
Presentation slides: http://jazoon.com/Downloads/Documents

Related Content:

One Comment »

  • Agile UML Modeling said:

    […] and discusses what problems modelers face creating, using and maintaining it. Then corresponding UML best practices are presented. They enables transforming information contained in presented anti-pattern into a […]