Why we need to use Software Development Diagrams?

Dinuka Bandara
5 min readSep 13, 2023

--

AI generated image

Software development diagrams are visual tools that help us comprehend complex applications more easily. They provide a clear representation of various aspects of the application’s structure, behavior, and interactions.

Here’s why using these diagrams is crucial:

  1. Clarity: Diagrams simplify intricate code structures into visual components, making it easier to grasp the overall architecture.
  2. Communication: Diagrams serve as a universal language for developers, designers, and stakeholders, aiding effective communication.
  3. Design Visualization: Diagrams illustrate how different parts of the application interact, helping us foresee potential design flaws.
  4. Workflow Understanding: Flowcharts and sequence diagrams show the step-by-step processes, enhancing understanding of program flow.
  5. Error Detection: Diagrams can reveal flaws or inefficiencies that might be hard to detect in code alone.
  6. Documentation: Visual representations act as documentation, facilitating future maintenance and updates.
  7. Collaboration: Diagrams encourage collaborative problem-solving by providing a shared understanding of the application.
  8. Decision Making: When making design choices, diagrams offer insights into the implications of different decisions.

Also we call those diagrams as UML’s, UML stands for Unified Modeling Language. It’s a rich language to model software solutions, application structures, system behavior and business processes. There are 14 UML diagram types to help you model these behaviors.

Types of UML Diagrams

01. Structural Diagrams

show the things in the modeled system. In a more technical term, they show different objects in a system.

02. Behavioral Diagrams

show what should happen in a system. They describe how the objects interact with each other to create a functioning system.

01. Class Diagrams

The primary objective of class diagrams is to create a static representation of an application. This diagram is widely employed for development and can be correlated with object-oriented programming languages. Class diagrams are among the most commonly utilized UML diagrams, and their purposes are outlined as follows:

  • Design a static view of an application.
  • Describes the major responsibilities of a system.
  • Base for component and deployment diagrams.
  • Incorporates forward and reverse engineering.

Benefits of Class Diagrams

  • Class diagrams represent the object model for complex systems.
  • Reduce the maintenance time by providing an overview of how an application is structured before coding.
  • Provide a general schematic of an application for better understanding.
  • It shows a detailed picture of an application that needs to be written.
  • It is helpful for understand an application for non-developers.

How to draw Class Diagrams?

Class Diagrams are made up using three major sections,

Upper Section: Class name using Bold CamelCase.

Middle Section: Contain List of list attributes with meaningful name, which describe the quality of the class.

attributes need to show what level of visibility that have ,

  • Public : +
  • Private : -
  • Protected : #
  • Package : ~

Lower Section: Contain methods or operations , it demostrates how a class interacts with data.

Relationships

01. Dependency: A dependency is a semantic relationship between two or more classes where a change in one class cause changes in another class. It forms a weaker relationship.

Example: Fevorite items depend on the customer.

02. Generalization/Inheritance: A generalization is a relationship between a parent class (superclass) and a child class (subclass). In this, the child class is inherited from the parent class.

Example: Customers pay their orders by using different methods.

03. Association: It describes a static or physical connection between two or more objects. It depicts how many objects are there in the relationship.

Example: Item is associated with the category.

04. Aggregation: An aggregation is a subset of association, which represents has a relationship. It is more specific then association. It defines a part-whole or part-of relationship. In this kind of relationship, the child class can exist independently of its parent class.

Example: If customer removed from system, but orders associated with that customer never get delete.

05. Composition: The composition is a subset of aggregation. and if one part is deleted, then other part also gets discarded. it represents a while-part relationship. 2nd class cannot exsist independently.

Example: If Contact Book deleted, all contacts will be discarded.

06. Multiplicity: It defines a specific range of allowable instances of attributes. In case if a range is not specified, one is considered as a default multiplicity.

Example: One customer can have one or more delivery addresses

Example

Let’s consider “Online Clothing Website” and find out what things we need to do using our system? we have customers, products and admin for manage those products and users. we can list all our system requirements,

Customer needs:

  1. Search products
  2. View product
  3. Favorite products
  4. Order management
  5. Payment

System owner(Admin) needs:

  1. Product management
  2. User management
  3. Order management

Here is the class diagram of our system:

Full size image : https://github.com/dinukasaminda/uml-medium-articles-resources/blob/main/online_Shopping_system.drawio_v1.png

I hope you got a clear understanding about the UML’s and Class Diagrams. Hope to see you in another UML diagram soon…

--

--