But First, Let’s Draw! UML Diagrams are for Everyone.
A quick guide on how to visualize your project.
UML and UML diagram
UML (or Unified Modeling Language) is there to provide a standard way to show system design. Nowadays this language is used to model not only software solutions, but also application structures, system behavior, and business processes.
UML diagrams help to visually represent data by dividing a complex software system into components and subcomponents.
Reasons to start using UML diagrams
Think about some of the benefits you get from using UML diagrams:
- Visual Representation
A UML diagram allows you to easily view the relationships and navigate between objects in your system.
2. Standard
Because UML is widely understood and well known, this makes it easy for a new team member to step into a project and be productive from day one.
3. Planning Tool
UML helps to plan a program or new features before the development takes place.
4. Collaboration
Having a visualization of the system design makes communication with technical and non-technical audiences easier.
Try to use UML diagrams even for your pet-project to see a whole well-structured picture, to plan features, and share your project design with others.
Types of UML diagrams
Just for your reference, there are 14 different types of UML diagrams, and you can find the classification in the picture below. As for now, The most popular types are the following:
- Class Diagram. Examples: Domain model diagram, Android Camera implementation classes.
- Activity Diagram. Examples: Online Shopping, Single Sign-On for Google Apps.
- Use Case Diagram. Examples: Airport check-in and security screening business model, Point of sales (POS) terminal.
If you want to learn more about each type of UML diagram, you can find detailed information here https://www.uml-diagrams.org/uml-25-diagrams.html
How to start drawing UML diagrams
As you might have noticed by now, using a UML diagram for documenting processes and systems can be very beneficial. The downside is that it can seem complex at first to draw one. You gotta learn the syntax, and you need to choose which diagram out of the 14 different types is the most efficient for the job, etc.
Just like any other thing in life, to get something done properly, you need the right tools and practice. For documenting software, processes, or systems, you need the tools that offer UML annotations and UML diagram templates. Different software documentation tools can help you draw a UML diagram (however, paper and pencil are always there for you). Here is a shortlist of a few software tools for drawing UML diagrams:
Build your own UML diagram right now
You may think that to build your own UML diagram you need to study all specification documents and it’s very complicated. But the complexity depends on your project and goals.
Let’s create a simple example of a UML class diagram. I will work with Miro as an online whiteboard, Miro is designed to help brainstorm and get ideas off the ground.
- To start with, go to miro.com and create your account.
- Add UML Diagram template to your boards by clicking “use template”.
- Start creating your first UML diagram. Note! The only chart currently supported in Miro is a Class Diagram.
- Don’t forget to share your ideas and collaborate with others, Miro’s whiteboard tool is perfect for this.
I will use Superheros as my domain with three models: Hero, Power, and Movie. Movies can have multiple Heroes. Each Hero can appear in multiple Movies. Each Hero can have multiple Powers. Powers can belong to multiple Heroes. Only Superman has X-ray power, but both Green Lantern and Silver Surfer can fly. Let’s draw it with UML.
A UML class diagram is composed of two components: classes and relationships. Classes have three sections:
- Upper section: Contains the name of the class.
- Middle section: Contains the attributes of the class. Use this section to describe the qualities of the class.
- Bottom section: Includes class operations (methods). The operations describe how a class interacts with data.
In this example I created three classes:
Hero Class
Attributes: Name, Super Name, Quote
Methods: Speak, Use Power
Power Class
Attributes: Name, Description, Strength
Methods: Increase, Decrease
Movies Class
Attributes: Name, Release Date, Director
Methods: Play, Buy
To summarize, UML diagrams are great for visualizing your projects and modeling business processes and workflows. And you can start doing it today with available online software tools.
If you want to learn more about UML diagrams:
UML Diagrams cheat sheet: https://www.scribd.com/document/37029290/UML-Cheatsheet
UML diagram relationships: https://creately.com/blog/diagrams/class-diagram-relationships/
Detailed information about UML diagrams with cool examples for each type: https://www.uml-diagrams.org/