Architectural Styles
The catalogue of named macro-structures a system can take, from monolith to microservices to space-based, plus how to pick one and how to combine several. Interviews use style names as shorthand, so knowing the trade-offs behind each name saves a lot of explaining.
part ofSoftware design & architectureoverview, primer and where to startread it →on this pageshowhide
explore
- Structural Styles46 questions
- Monolithic Architecture5 questions
- Modular Monolith5 questions
- Layered / N-Tier6 questions
- Client-Server Style6 questions
- Peer-to-Peer Style6 questions
- Space-Based Architecture6 questions
- Microkernel / Plug-in6 questions
- Pipes & Filters / Dataflow6 questions
- Application Architecture22 questions
- Hexagonal / Ports & Adapters6 questions
- Clean Architecture6 questions
- Onion Architecture5 questions
- MVC / MVP / MVVM5 questions
- Distribution Styles86 questions
- Service-Oriented Architecture6 questions
- Microservices Style6 questions
- Event-Driven Style6 questions
- Serverless Architecture34 questions
- Microfrontends34 questions
- Selecting & Combining Styles12 questions
- Choosing an Architectural Style6 questions
- Combining & Hybrid Architectures6 questions
- Backend Developerroleanchors this topic
- Full Stack Developerroleanchors this topic
- Java Backend Developerroleanchors this topic
- Kotlin Backend Developerroleanchors this topic
- Software Design & Architectureskillanchors this topic
- Android Developerrole
- Computer Scienceskill
- Forward Deployed Engineerrole
- Frontend Developerrole
- Game Developerrole
- Server-Side Game Developerrole
- Software Architectrole
- iOS Developerrole
questions
166 · 4 sectionsIn a microkernel (plug-in) architecture, what is the difference between the 'core system' and a 'plug-in', and what does each side own?
basics
~10 sThe core is a small always-on engine that only knows how to load and talk to plug-ins. Plug-ins are separate, swappable pieces of code that add actual features, each following rules the core sets.
In plain terms, what is the Pipes and Filters architectural style, and can you give an everyday example of it?
basics
~20 sIt's a design where data flows through a chain of independent processing steps called filters, connected by pipes. Each filter does one small job and hands its output to the next, like workers on an assembly line.
What is the client-server architectural style, and what does it mean for a client to send a 'request' and a server to send back a 'response'?
basics
~20 sThe client-server style splits an app into two roles: a client that asks for something (a request), and a server that has the data or logic and answers back (a response). The client initiates; the server waits and replies.
In a typical N-tier layered architecture with presentation, business, and data access layers, which direction are calls allowed to flow, and why shouldn't the data access layer call back into the presentation layer?
basics
~20 sCalls only go downward: UI talks to business logic, which talks to data access. Data access never calls back up - that would tangle everything together, making each part impossible to change or test alone.
What is a modular monolith, and what concretely distinguishes it from a monolith whose packages happen to be organized by feature but have no enforced boundaries?
basics
~10 sOne app, one deployment, but cut into modules that hide their internals and only talk through defined entry points - unlike a folder-organized monolith where any code can still call any other code directly.
In Clean Architecture, the 'Dependency Rule' says source code dependencies can only point inward. If a UseCase class needs to save data to a PostgreSQL database, why shouldn't that UseCase class directly import a JDBC or ORM library?
basics
~10 sInner circles (business rules) must never depend on outer circles (frameworks/DB). The use case defines an interface it needs; a database-specific class outside implements it. This keeps business logic free of database code.
In Hexagonal Architecture (Ports & Adapters), what is a 'port', and what distinguishes a driving (primary) port from a driven (secondary) port?
basics
~20 sA port is an interface the core app defines. Driving ports are ways the outside world calls INTO the app (like an API). Driven ports are ways the app calls OUT to things it needs (like a database).
In the classic MVC (Model-View-Controller) pattern, what job does each of the Model, View, and Controller play, and why does splitting responsibilities this way help maintainability?
basics
~10 sModel holds data and business rules, View shows it on screen, Controller takes user input and decides what happens next. Splitting them means you can change how something looks without touching how it works.
In Onion Architecture, why is the domain model placed at the center of the design instead of the database or UI?
basics
~20 sOnion Architecture puts the business rules in the middle of the app, like the core of an onion, and everything else (database, web framework, UI) sits in layers wrapped around it. The middle never needs to know about the outer layers.
Clean Architecture draws four concentric rings - Entities, Use Cases, Interface Adapters, and Frameworks & Drivers. For a typical web application, what kind of code lives in each of these four rings, and how does data get from an outer ring's format into a form the innermost ring can use?
basics
~20 sEntities hold core business rules; Use Cases run application-specific workflows; Interface Adapters translate between the app and the outside world (controllers, presenters); Frameworks/Drivers are the actual web server, DB, UI. Data crosses rings as plain data structures, converted at each boundary.
In an event-driven system, a service publishes an 'OrderPlaced' event instead of calling the shipping service directly. What are producers and consumers, and how does this decouple the two services?
basics
~10 sA producer creates and sends out an event (like 'something happened') without knowing who's listening. A consumer picks up events it cares about and reacts. Neither needs to know the other exists directly.
In the microservices architectural style, what does it mean for a service to be 'independently deployable', and why is that the defining trait of the style?
basics
~10 sA microservice can be built, tested, and released on its own, without redeploying other services at the same time. This is the core feature that lets teams move fast without waiting on each other.
What does it mean for a service in a Service-Oriented Architecture (SOA) to be 'coarse-grained', and why did SOA favor this over many small services?
basics
~10 sA coarse-grained SOA service bundles a whole business capability (like 'Order Management') behind one interface, instead of splitting into many tiny services, so fewer calls and less network chatter are needed.
In a microfrontend architecture, what is the basic difference between mounting a microfrontend as a JavaScript bundle directly into the DOM versus embedding it via an iframe?
basics
~20 sJS mount loads the microfrontend's code into the same page so it shares the DOM and can talk to other parts easily. An iframe loads it as a separate mini-webpage inside a box, fully isolated but harder to communicate with.
In a microfrontend architecture using Webpack Module Federation, what is the difference between a 'host' application and a 'remote' application, and how do they connect at runtime?
basics
~20 sA host is the app that loads pieces from other apps; a remote is the app that shares its pieces. Webpack lets the host fetch and run the remote's code straight from the browser, without both being built together.
When starting a new system, what should drive the choice of architectural style (layered monolith, modular monolith, microservices, event-driven, and so on) — and what should not?
basics
~20 sChoose from the qualities the system must have (scale, availability, speed of change, cost) plus its constraints (team size, skills, deadline, budget, regulation). Do not choose by fashion, resume value, or what a famous company uses.
What is a hybrid (mixed-style) architecture, and why do most real systems combine several architectural styles instead of using exactly one?
basics
~20 sA hybrid architecture combines more than one architectural style in one system, for example a modular monolith plus serverless functions at the edge. Different parts of a system have different needs, so one style rarely fits everything.
What is an Architecture Decision Record (ADR), what does it contain, and why is capturing the rationale for a style choice as valuable as the choice itself?
basics
~20 sAn ADR is a short document recording one significant architecture decision: the context, the options considered, the decision, and its consequences. It matters because it preserves why something was chosen, so later teams can tell a deliberate trade-off from an accident.
Compare a modular monolith with microservices across scalability, deployability, testability, operational cost and data consistency. When would you pick each?
basics
~20 sA modular monolith is one deployable unit with internal module boundaries: simple, cheap, easy to test, with single-database transactions, but it scales and ships as a whole. Microservices deploy and scale independently and isolate failures, but add network calls, eventual consistency and operational cost.
In a system of microservices, when should two services communicate through synchronous request/response calls versus asynchronous events on a broker, and what changes about failure handling in each case?
basics
~20 sUse a synchronous call when the caller needs an answer right now to continue its work. Use an asynchronous event when you are announcing that something happened and other services can react later, without the caller waiting.