UML Diagrams: A Class Apart?

Mainak Chakraborty
5 min readDec 1, 2021

--

(Source: Unsplash)

UML is an acronym for Unified Modelling Language.

The proper definition according to Wikipedia goes like this,

“It’s a general-purpose, developmental, modeling language in the field of Software Engineering that is intended to provide a standard way to visualize the design of a system.”

It Sounds important, right? But You probably never heard of it…Most people find it completely useless, some find it very useful. Don’t bother with the opinions, it’s always better to make your own. In this blog, I will go through UML briefly, discuss a few major diagrams with a reference. And let you decide your own side…

Ahh!! Class Diagrams (Source)

Let’s look into the history a bit…Where did it come from?

Grady Booch, Ivar Jacobson, and James Rumbaugh created the Unified Modeling Language in 1995 while working at Rational software.

In 1997, the Object Management Group adopted UML as a standard for its members, which includes the likes of Hewlett-Packard, IBM, and Apple Computer.

In 2005, the language was published by the International Organization for Standardization (ISO) and has since been revised and reviewed to keep it up to date. The most recent version, UML 2.5, was released in 2015.

Ok…. So it must be used throughout the world right? Same question I asked google Trends. An interesting thing came out.

Results of UML diagrams Keyword search for last 12 months (Source)

Developing Countries searching more about UML diagrams. Is it the syllabus or the Outsourcing? Not sure though.

Ok, Is it one diagram or multiple, I am confused….

Say no more, I have a mindmap for you. Voila.

Different Types of Uml Diagrams(Source: Author)

14 Diagrams?

Yes, Aint this fascinating? Don't bother, I will cover the important ones only. HOP IN.

Structural Diagrams

Structural diagrams in UML primarily depict the time-independent elements of the system. Structural diagrams convey the concepts of the modeled system and their relationship with each other. It represents the static aspects of the diagram. The most important of them all is the Class Diagram.

What is so special about the class diagram?

Suppose, you are in an early entrepreneurial stage and trying to convince stakeholders about the properties of your business. The players, important aspects of the system. What would you do if there was a method to do it?

Yes, Class Diagram does exactly that. It describes the multiple attributes and also methods, along with constraints of the system. It is widely used since it is the only diagram that can be directly modeled into object-oriented languages. Although not as helpful as it sounds.

A typical class diagram includes classes, interfaces, associations, collaborations, and constraints.

Ok, Where and how to make it?

The two most popular ways are Markdown and Drag and drop styles. There are multiple websites and software dedicated to building only UML diagrams like Visual Paradigm, Altova UModel, etc.

How about a class diagram of a student with his id-card class and Bike class?

Class Diagram (Source)

Each class has attributes and its methods(functions). Each class can have a relationship with other classes. There are various relationships like Inheritance, Aggregation, Association.

Now, from this diagram, we can easily understand that there are 3 classes. The Student class has access to ID cards information and has a 1:1 relationship with the Bike class(Aggregation).

Can I use it to model Complex Systems? YES, Let’s see a class diagram for a Hospital Management System.

Hospital Management System (Source)

Now, let’s briefly look into the Behavioural Diagrams. It depicts the time-dependent elements of the system. This set of diagrams convey the concepts of the modeled system which are dynamic in nature and their relationship with each other. Most Important of all, Sequence Diagrams. Others are State machines, Use-case, and timing diagrams.

Here is a small talk between me and my friend.

I hate small talks (Source: Author)

That’s Easy...Phew, I thought it will be tough.

Yes, It is easy…Feeling pain in the stomach or nausea? Going to visit a doctor?

A middle woman always make things slow, use the app(Source: Author)

Did the doctor give some tests?

Well, I covered for your ward admission too (Source: Author)

Sequence diagram, models all possible interactions among the major players. It has a flow element, and thus you know what comes after what. This helps us to understand the sequence of the entire system.

There are many other diagrams, which are equally important as this two.

So, why do we need UML?

  • Clarity: The UML diagrams forces the creators to extensively divide and sub-divide a system into multiple objects. It weeds out any abnormality or outlier conditions in the preliminary stages. It is understandable to both designers and management.
  • Visualization: UML diagrams are a great tool for visualizations since the block diagrams do not capture the complexity of a system.

hmmm….Looks good, why do people hate it?

Well, I will answer you with a question. Do you need complex and time-consuming diagrams, for your model/system?

If yes, Go ahead. If No, don't. Some people are just too agile.

Look into these resources, for a better understanding. Comment if you want more diagrams and code.

--

--