liveBook · Manning

Software architecture

As explained in Grokking Software Architecture

Software architecture comprises the significant structural and behavioral decisions that shape how a software system is built, deployed, and changed.

A food truck needs more than a tasty menu: its service window, cooks, grill, and fridge must work together, including during a lunch rush. Software architecture is similarly about a system’s shape and the reasons for that shape. Its significant decisions affect how the system is built, tested, deployed, and changed. section 1.3

Figure 1.2 A software system, like a food truck, has a distinct structure. The API is the service window, the business logic is the cook, and dependencies like the database and cache are the grill and fridge.

The food-truck layout maps familiar working parts to an API, business logic, and dependencies. section 1.3

Architectural decisions happen at many scales. Choosing a database, placing logic in a class, or changing a configuration line can make later work easier or harder. A useful test is whether the choice significantly affects the ability to build, ship, or change the system. Not every decision needs formal review: a disposable script may be fine with duct tape. section 1.1 section 1.3

Architecture also translates business needs and user requirements into technical choices. Before solving “make it faster,” ask why, for whom, and what is actually needed. The goal is a complete solution for today, not elaborate protection against every imagined future. section 1.4

A repeatable thinking process turns a vague idea into a defensible decision:

Pick your pain on purpose

A bank transfer may favor consistency because a wrong balance is costly. A social feed may favor availability because a slightly stale post can be preferable to an error. Friendster’s emphasis on consistency came with availability costs, including long page loads: an excellent technical goal can still be the wrong business tradeoff. section 2.9.1

There is no universally perfect architecture. Consider behavior under stress and the cost of change, not just today’s structure. Apply sound principles consistently across scales: keep methods focused, classes cohesive, and components loosely coupled. section 1.10 section 3.7

How Grokking Software Architecture covers it

How deep it goes
Provides a five-stage decision process and a self-check for comparing options and recording consequences.
Examples
Illustrates system structure with a food truck and tradeoffs with bank transfers, social feeds, and Friendster.
What you can do after
Evaluate architectural choices by identifying alternatives, weighing tradeoffs, and explaining their consequences.
How it connects
Connects architecture to separation of concerns, cohesion, coupling, and consistency versus availability.

Also explained in

Compare how 2 books explain software architecture →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.