4+1 view model of architecture

should you use it?

--

In 1995, Philippe B. Kruchten, who was working at Rational Software (famous at the time), published a new paper on “Software Architecture”.

Software architecture is high-level, abstract, and logical design whereas software design is low-level, detailed, and physical design.

The idea for the “4+1 view model of architecture” was to remedy the problem of cramming too much information in one architecture diagram or not addressing some of the stakeholders’ concerns. That is why 4+1 was created.

4+1 https://ics.uci.edu/~andre/ics223w2006/kruchten3.pdf

The 4+1 view model organizes a description of a software architecture using five concurrent views, each of which addresses a specific set of concerns.

  1. Logical view — addresses functionality that the system provides to end-users. (Functional requirements) Class or Component diagram is used.
  2. Process view — focuses on the system’s runtime behavior addressing performance, availability, concurrency, and fault-tolerance. (Non-functional requirements) Sequence or Activity diagram is used.
  3. Development view — illustrates the system from a developer’s perspective and is concerned with software management. Component or Package diagram is used.
  4. Physical view — describes the mapping of the software onto the hardware and the physical connections between components. Deployment diagram is used.
  5. Scenarios — describe the behavior of the system as seen by its end-users. Ties the 4 views together used to illustrate and validate requirements. Created first. Use case diagram is used.
4+1 view model

4+1 is a view model used for “describing the architecture of software-intensive systems, based on the use of multiple, concurrent views” ~P.B.Kruchten

UML diagrams

While 4+1 view model of architecture is considered “generic” and could use different notations, UML is widely used. Unified Modeling Language helps you specify, visualize, and document models of software systems, including their structure and design.

UML diagrams

Modeling is the designing of software applications before coding.

Used in Logical view, the class diagram is a type of static structure diagram that describes the structure of a system by showing the system’s: classes, their attributes, operations and relationship.

UML class diagram — notation
UML class diagram — example

Used in Logical view or Development view, the component diagram breaks down the actual system under development into various high levels of functionality.

UML component diagram — example

Each component is responsible for one clear aim within the entire system and only interacts with other essential elements on a need-to-know basis.

Used in Process view, the sequence diagram details how operations are carried out — what messages are sent and when, in a particular scenario based on a time sequence.

UML sequence diagram — example

Sequence diagram is all about ordering, not duration.
It is somewhat close to the code level and language-neutral.

Also, used in Process view, the activity diagram illustrates workflows of stepwise activities and actions with support for choice, iteration and concurrency.

UML activity diagram — example

Activity diagram is particularly helpful in illustrating how different components of the system collaborate to accomplish specific use cases.

Used in Process view, the deployment diagram shows the configuration of run-time processing nodes and the components that live on them.

UML deployment diagram — example

Deployment diagram models physical hardware elements and the communication paths between them.

Last but not least, the use case diagram specifies the expected behavior (what), and not the exact method of making it happen (how). Use cases represent only the functional requirements and should be simple.

UML use case diagram — example

It summarizes some of the relationships between actors and systems.
It doesn’t show the order in which steps are performed.

Although there are 14 UML diagrams Class, Component, Sequence, Activity, Deployment and Use case diagrams are the most used.

4+1 view model of architecture VS UML diagrams used

Why use 4+1?

First of all, putting ideas on paper before coding is always helpful. Secondly, visual is better than reading documentation. Lastly, 4+1 is easier to model since you illustrate the system from different perspectives.

While there are other alternatives like C4, TOGAF, 5+2, SysML, ArchMate, ADL etc 4+1 seems to be good enough and easy enough to use. Good luck!

--

--

Билигүн.Б (Програмч аав)
2B +1% better 2day

I am who I am... || өөрийнхөөрөө байхаас ичихгүй