Updated April 10, 2023
What is the Architecture of UML?
UML (Unified Modelling Language) is a modeling language or set of engineering practices, consists of diagrams. UML helps developers to construct, visualize, specify and document the ins and outs of the software systems. In UML Graphical representations are used to represent the design of software systems which also consider use cases for different users. The strategy used for the creation of software systems has great value for any industry as it makes the process efficient, easy to improve quality, and reduces time & cost factors. In this topic, we are going to learn about the Architecture of UML.
Explain the Architecture of UML with Diagram
The unified Modelling language is not a programming language as such, but it is a visual language. UML diagrams are used to represent different possible structures of the system. Architecture is a combination of several views of different users such as developer, analyst, tester, project manager, technical writer, and end-user. For best practice, we consider 5 views: use case, design, development, process, and deployment view. None the less use case remains the center of the other views.
With use case view the stakeholder or users need diagrams to visualize the system software. These diagrams make the whole architecture of the systems.
In UML there are two types of diagrams structural and behavioral diagrams. As the name suggests structural covers static aspects of the system like deployment diagrams, object diagrams, class diagram,s and component diagrams. On the other hand, behavioral diagrams cover dynamic aspects of the system like Interaction diagrams, use case diagrams, and activity diagrams.
Below are some examples of such diagrams:
This diagram represents the static structure of a class with attributes and methods associated with it. The class structure has 3 partitions, the first partition represents the name of the class. The name is in Bold letters and the first letter is always capital, the title is placed in the center. The second partition represents the attributes of the class and is aligned leftwards. The last or bottom partition represents methods or operations the class can execute and are also aligned leftwards.
Below is a simple example of a class: AlgebraClass, the first partition represents the Name of the class, the second partition represents attributes of the class that would be inp1 and inp2. The last partition represents the operations or methods of the class. With complex classes, there are different methods to draw diagrams where we use the concept of member, visibility, and scope. As we know object-oriented programming allows inheritance, association, etc. To represent these different relationships methods or symbols are used.
|inp1 : int
inp2 : int
|sum( inp1 + inp2 )
substrct( inp1 – inp2 )
mult (inp1 * inp2 )
This diagram plays an important role in representing the flow of the process among different things which are modeled in the system. Interaction has different subparts of it, one such is a communication diagram. Communication diagrams represent sequential messages among different objects like class diagrams, sequence diagrams, and use case diagrams.
For example, taking the use case of Chef and class oven which has input a regulator and flame as attributes. A chef can interact with Oven in two cases to switch on to switch off.
How an external or internal user perceives the system is the use case. What is the need and requirement of the system? is the driving force behind creating use cases. A use case in simple terms the way the system can be used or how the user wants to interact with the system.
For example, a simple calculator is used for simple algebra like addition, subtraction, multiplication etc. But a scientific calculator would be used for high-level algebra which includes trigonometry linear algebra (Matrix calculations), logarithmic calculation, etc. For both the calculator the are different use cases, where the user is using a calculation. Let’s pick a scientific calculator, it does the job of a simple calculator also, but a grocery store person would not require the scientific calculator. So, the calculator company will have such different use cases and would decide what functionalities shall be included in different calculators considering cost as well as ease of use. Also, for each calculator, there would be an analyst and tester also who would be performing different testing and applying different methodologies as per need.
Importance of Architecture of UML
UML architecture is very important to create a systematic plan for creating the model in the initial stage and modifying the same at the later stage as per need.
The architecture provides a broad view of how the system is designed and implemented. Which makes it easy for others to understand and enhance at a later stage as per need. The architecture provides a flow control process that helps software analysts and developers to analyze and model or code the system. The different visualization created using UML helps stockholders to decide which one is better to implement and for ease of use among different users.
From the management point of view also it provides an efficient approach for solving a problem and avoid any confusion between different teams who are working or using the system. It helps in reducing the time & cost factor.
In almost all organizations architecture is created first to visualize the flow process and then implementation starts. UML architecture is referred to as standard and adopted by the object management group in 1997and revised over the years. Which makes it adaptable for complex systems also.
UML is a unified modeling language which is a visualization language and is used for creating architecture for software systems. An architecture considers different view which includes developer, analyst, tester, project manager, technical writer, end user etc. UML architectures use a structural diagram for static aspects and a behavioral diagram for dynamic aspects.
This is a guide to the Architecture of UML. Here we discuss an example for both the diagrams, Use case example and the importance of the architecture of UML. You may also have a look at the following articles to learn more –