In Kruchten's "4+1" view model of software architecture, what are the five views and what does each one describe?
answer
- Logical = functionality, Process = runtime/concurrency
- Development = modules/build, Physical = nodes/deployment
- +1 = scenarios tie the four together
- Kruchten 1995, IEEE Software
- One diagram cannot serve every stakeholder
basics
~20 sLogical view: functionality and domain structure. Process view: runtime processes, threads, concurrency. Development view: code modules, packages, build units. Physical (deployment) view: mapping software onto machines and networks. Plus Scenarios: key use cases that tie the four together.
solid answer
~50 sPhilippe Kruchten's 4+1 model says one diagram cannot describe an architecture, so you draw four largely independent views plus a fifth that binds them. The **logical view** shows the functionality delivered to end users — domain concepts, responsibilities, and their relationships. The **process view** shows the system at runtime: processes, threads, concurrency, synchronization, throughput and how work flows between running units. The **development (implementation) view** shows the static organization of the source: modules, layers, packages, libraries and build/dependency structure, addressed at programmers and build/release owners. The **physical (deployment) view** maps software elements onto hardware — nodes, networks, replicas — for system engineers and operators. The **+1**, **scenarios** (use cases), is a small set of architecturally significant flows walked through each of the other four views; they justify the design, expose gaps, and act as validation. Each view has its own notation, its own stakeholders and its own concerns.
go deeper
Name the five views and one sentence each on what they contain. Getting logical vs development straight (functionality vs source modules) is the main thing.
Add the stakeholder for each view and give a concrete example of a question only that view can answer. Explain that scenarios validate the other four.
Discuss which views you would actually maintain for a given system and why, the mappings between views, and where the model's cost lies (stale documentation). Compare with C4.
Frame 4+1 as an instance of the general viewpoint idea (ISO/IEC/IEEE 42010): choose views from stakeholder concerns, not from a fixed template; add or drop views deliberately and state the mapping and consistency rules between them.
## Where the model comes from Philippe Kruchten published "Architectural Blueprints — The 4+1 View Model of Software Architecture" in *IEEE Software* (1995). The core idea is a reaction to a very common failure: a team draws **one** boxes-and-lines diagram and tries to make it answer every question anyone could ask about the system. The result satisfies nobody — the operations engineer cannot find the machines, the programmer cannot find the modules, the performance engineer cannot find the threads. The fix is **separation of concerns applied to documentation**. Instead of one diagram, you draw several *views*, each one a projection of the same system that deliberately keeps only what one audience cares about and deliberately throws the rest away. ## Vocabulary you need first - **System** — the actual thing that exists (or will exist). - **View** — a representation of the whole system from one perspective; a filtered picture. Not a part of the system, a *projection* of it. - **Stakeholder** — anyone with an interest in the system: end user, developer, tester, operator, security officer, project manager, customer paying for it. - **Concern** — a question or interest a stakeholder has ("can it survive a machine failure?", "where do I add a new payment method?", "what runs on which server?"). - **Notation** — the drawing language used (UML class diagram, sequence diagram, deployment diagram, plain boxes and arrows). ## The five views in detail ### 1. Logical view **Question it answers:** what functionality does the system provide, and how is that functionality decomposed? Contents: key domain abstractions (Order, Account, Shipment), their responsibilities, relationships and generalizations; sometimes layers or subsystems of *functionality*. Typical notation: UML class or package diagrams, ER-ish domain models. **Audience:** end users (indirectly, via analysts), business analysts, designers. Note it is about *functional* structure, not files. An abstraction in the logical view may be spread across several modules, and one module may implement several abstractions. ### 2. Process view **Question it answers:** what happens at runtime, and how do concurrent parts interact? Contents: processes, threads, tasks, queues, schedulers, the units of concurrency; how they communicate (messages, RPC, shared memory); synchronization points; where the throughput, latency, deadlock and starvation risks are. **Audience:** integrators, performance and reliability engineers. This is the view where non-functional properties like **response time**, **throughput**, **availability under load** and **fault isolation** actually become visible. Nothing in a class diagram tells you that two components run in the same thread and therefore block each other. ### 3. Development view (also called the implementation view) **Question it answers:** how is the source organized, and what depends on what at build time? Contents: modules, packages, libraries, layers with allowed dependency directions, the build/release units, ownership boundaries. **Audience:** programmers and the people managing the build, the repository layout and release process. This is where rules like "the domain layer must not depend on the web layer" live, and where team-to-module ownership (a Conway's-law concern) becomes explicit. ### 4. Physical view (also called the deployment view) **Question it answers:** what runs where? Contents: physical or virtual nodes (servers, containers, devices), networks and links, how processes from the process view are allocated onto those nodes, replication, failover topology, sizing. **Audience:** system engineers, operations/SRE, infrastructure. One logical system usually has *several* physical views — the developer laptop configuration, the test environment, the production topology — because the same software is deployed differently in each. ### 5. Scenarios — the "+1" **Question it answers:** do the other four views actually work together? A scenario is an instance of a use case, chosen because it is *architecturally significant*: it exercises the risky interactions, the peak load path, or a failure mode. You walk each scenario through the logical view (which abstractions participate), the process view (which threads and messages), the development view (which modules), and the physical view (which nodes). Scenarios play two roles: a **driver** (they motivate the design during discovery) and a **validator** (once the views exist, walking a scenario finds contradictions and gaps). They are also, deliberately, redundant with the other four views — that redundancy is what makes them able to detect inconsistency. ## Why the views are "largely independent" Each view can use its own notation, be maintained by different people, and evolve at its own pace. But they are not fully independent: an element in one view maps to elements in another (an abstraction is implemented by modules, modules are packaged into processes, processes are deployed to nodes). Those mappings are where most architectural bugs hide — for example, a logical decomposition that looks clean but forces two chatty components onto different machines. ## Trade-offs and common misuse - **Not all five are always needed.** Kruchten explicitly says the model is a menu, not a mandate. A single-process CLI tool has a trivial process and physical view; drawing them is waste. A distributed real-time system may need extra views. - **Cost of maintenance.** Every view is a document that can go stale. Views you do not maintain are worse than views you never drew, because readers trust them. - **Notation is not the point.** 4+1 is often taught as "five UML diagram types". The model is about *audiences and concerns*; UML is just one way to draw them. - **Overlap with newer models.** The C4 model (context/container/component/code) covers roughly the logical + development + a slice of the deployment concern with a strict zoom hierarchy, and adds a separate deployment diagram. Many teams today draw C4 and reserve the process view for the genuinely concurrent parts. ## How to use it in an interview Name the five, say what each shows *and who reads it*, then add the punchline: the views exist because different stakeholders have different concerns, and scenarios are what keep the separate views honest.
- Which of the 4+1 views would you consult first to diagnose a latency problem, and why?The process view: latency comes from runtime interaction — thread pools, queues, synchronous call chains, lock contention. The physical view is the immediate second, because network hops between nodes add latency the process view alone may hide.
- Do you always have to produce all five views?No. Kruchten treats the model as a menu. Drop views whose concerns are trivial for your system (a single-process desktop tool barely needs a process or physical view) and add extra ones (for example a data view or a security view) when a stakeholder concern is not covered.
- What is the relationship between an element in the logical view and one in the development view?A many-to-many mapping. A logical abstraction can be implemented across several modules, and one module can host several abstractions. Recording that mapping is what makes the views a coherent description rather than four unrelated pictures.
Like architectural drawings of a building: the floor plan (logical), the people-flow/fire-drill study (process), the materials and assembly sequence (development), and the site plan showing the building on its plot with utilities (physical). The fire drill walked through all of them is the scenario that proves the set is coherent.
saying these in an interview costs you the question
- Saying the logical view is 'the class diagram of the code' — it describes functional abstractions, not source layout
- Confusing the process view with a business-process/workflow diagram; it is about runtime processes, threads and concurrency
- Treating the physical view as optional detail for ops rather than an architectural view that changes design decisions
- Claiming all five views must always be produced for every system
- Describing scenarios as just 'the requirements list' rather than a small set of architecturally significant flows used to validate the other views
- Presenting 4+1 as a set of mandatory UML diagram types rather than a concerns-driven model