Modularity
Modularity is the organization of a system into separable components with distinct responsibilities and defined interactions.
Architecture Modernization: Socio-technical alignment of software, strategy, and structure
A modular architecture organizes a system into separable modules with well-defined responsibilities and limited dependencies between them.
- How it is used
- Positions modular architecture as a response to fragile changes, slow delivery, and difficulty scaling team productivity.
- How deep it goes
- Explains the organizational rationale and a phased transition, but does not specify how to implement module boundaries.
- Examples
- Uses Vinted’s expanding category tree and CloudSuite’s shared backend API to show different pressures on modularity.
- What you can do after
- Practice/perform phased modularization by planning collaboration where team boundaries still cross shared technical artifacts.
React Quickly, Second Edition
A software architecture that organizes functionality into reusable, loosely coupled components with separated responsibilities.
- How it is used
- Organizes React web-app functionality into components as part of a simpler development approach.
- How deep it goes
- Introduces component-based architecture and JavaScript components, but does not specify component boundaries or coupling rules.
- Examples
- Illustrates a JavaScript condition that selects a login or logout link.
- What you can do after
- Evaluate/understand component-based organization as one reason React can simplify web-app development.
Read how React Quickly, Second Edition explains modularity →
Get Programming: Learn to code with Python
Modularity is the organization of software into separate components with distinct responsibilities and interfaces.
- How it is used
- Organizes large programming tasks into smaller, testable units that can be combined into complete programs.
- How deep it goes
- Explains modules through inputs, tasks, outputs, testing, functions, classes, and reuse, without detailing formal interface design.
- Examples
- Uses attendance, car assembly, arithmetic operations, document similarity, card games, and a two-player shape-moving game.
- What you can do after
- Build programs from reusable functions, classes, and libraries while testing smaller pieces independently.
Read how Get Programming: Learn to code with Python explains modularity →
Retrieval Augmented Generation, The Foundational Ideas
A modular architecture organizes a system into independently developable, deployable, scalable, and replaceable components.
- How it is used
- Separates system components so they can be developed, deployed, scaled, and replaced independently.
- How deep it goes
- Details component specialization, substitution, scaling, routing, and orchestration costs.
- Examples
- Uses product updates, policy changes, and a retriever-generator system with a replaceable document index.
- What you can do after
- Apply modularity by separating retrieval and generation, standardizing interfaces, and planning component scaling.
Read how Retrieval Augmented Generation, The Foundational Ideas explains modularity →
Functional Design and Architecture: Examples in Haskell
Modularity is a structural property in which a program is divided into relatively independent parts with separable responsibilities.
- How it is used
- Organizes programs into independent parts to reduce complexity and make responsibilities easier to maintain.
- How deep it goes
- Defines decomposition, interface boundaries, and implementation hiding, but stops short of a detailed modularity procedure.
- Examples
- Uses C opaque types, Linux kernel-style procedures, sensor interfaces, and adapter-based object-oriented designs.
- What you can do after
- Evaluate designs by identifying separable responsibilities, stable interfaces, hidden implementations, coupling, and cohesion.
Read how Functional Design and Architecture: Examples in Haskell explains modularity →
Software Security for Developers
A modular monolith is a single application organized into well-defined independent modules that communicate through clean interfaces and own specific domains or features.
- How it is used
- Organizes authorization by domain while keeping the application in one deployable unit.
- How deep it goes
- Explains module ownership, authorization placement, encapsulation, auditing, and testing, but does not specify implementation mechanics.
- Examples
- Uses Users, Invoices, Reports, and Teams modules plus a department-based invoice authorization decision.
- What you can do after
- Designs and audits module-local authorization without introducing distributed-service enforcement complexity.
Read how Software Security for Developers explains modularity →
The Joy of JavaScript
A software design approach that structures a program as separate modules with well-defined responsibilities and interfaces.
- How it is used
- Organizes JavaScript code to separate concerns, isolate behavior, and manage application design beyond framework-level structure.
- How deep it goes
- Explains pre-module patterns and their function-scope rationale, but stops short of detailed native module mechanics.
- Examples
- Uses global scripts, object namespaces, IIFEs, IIFE mixins, factory functions, and fine-grained functional decomposition.
- What you can do after
- Evaluate/understand how function scope and pre-module patterns isolate code and organize small JavaScript applications.
Functional Programming in Scala, Second Edition
A modular program is composed of components whose meanings and reuse can be understood independently and combined through explicit composition rules.
- How it is used
- Uses pure functions to separate computation from effects, improving testing, reuse, parallelization, and composition.
- How deep it goes
- Explains independent components, composition rules, effect separation, and local reasoning, stopping short of implementation mechanics.
- Examples
- Uses coffee purchasing, substitution of string expressions, and high-level parallel mapping as concrete modularity examples.
- What you can do after
- Apply effect separation and pure-function composition to make computations easier to test, reuse, reason about, and parallelize.
Read how Functional Programming in Scala, Second Edition explains modularity →
Systems Programming with Zig
Modularity is the organization of software into separable components with focused responsibilities and reusable interfaces.
- How it is used
- Uses modularity to reuse validation across interfaces and isolate interpreter logic from interactive runtime dependencies.
- How deep it goes
- Works through validation composition, module imports, and test build steps; leaves frontend implementation aside.
- Examples
- Uses a word-ladder web service and a CHIP-8 interpreter with separate VM and test modules.
- What you can do after
- Apply it via Zig build modules to isolate VM tests and reuse validation logic in HTTP endpoints.
Functional Programming in C#, Second Edition
A software design principle in which a system is composed of discrete, reusable components.
- How it is used
- Uses modularity to break down an expanding transfer controller and reuse logic across controllers.
- How deep it goes
- Explains functional modularity through validator functions, dependency arguments, partial application, and composition.
- Examples
- Uses a transfer-booking controller and a date validator supplied with either a system clock or a fixed test clock.
- What you can do after
- Apply function-based modularity by passing dependencies as arguments and composing validators into request handling.
Read how Functional Programming in C#, Second Edition explains modularity →
Software Engineering for Data Scientists
Modularity is the organization of software into separable components with clear relationships and relatively independent responsibilities.
- How it is used
- Structures data science and machine learning workflows so pipeline tasks can be developed, maintained, shared, and evaluated independently.
- How deep it goes
- Explains modularization through file organization, reusable functions, imports, and a guarded main block.
- Examples
- Uses ordered Python pipeline files, customer churn cleaning functions, pandas data loading, and imported reusable code.
- What you can do after
- Build modular Python workflows that improve readability, portability, maintainability, and production integration.
Read how Software Engineering for Data Scientists explains modularity →
Acing the Frontend Interview
Modular architecture organizes software into separately defined units with focused responsibilities and explicit boundaries.
- How it is used
- Organizes JavaScript code for clarity, maintainability, reduced global scope pollution, and scalable applications.
- How deep it goes
- Explains ES Modules through import/export, file separation, scope, benefits, and comparisons with legacy formats.
- Examples
- Uses an ES-module interview question, import/export syntax, module-format comparisons, and a re-exporting example.
- What you can do after
- Apply it via ES Modules to split reusable code across files and explain their advantages in interviews.
Vibe Engineering
Modularization is the organization of software into separate, bounded components with defined interfaces and relatively independent builds.
- How it is used
- Organizes codebases for parallel agent work by isolating compilation, caching, and build activity.
- How deep it goes
- Explains module boundaries through independent compilation units, cache keys, parallel builds, and shared-I/O avoidance.
- Examples
- Uses self-contained modules, independent recompilation, and two agents changing separate modules as concrete examples.
- What you can do after
- Build it from scratch by separating a project into independently compiled modules with isolated cache keys and parallel build paths.
The Well-Grounded Rubyist, Fourth Edition
Modularization is the organization of software functionality into separate reusable modules.
- How it is used
- Organizes large Ruby programs by separating behavior into reusable modules and combining those behaviors with classes.
- How deep it goes
- Explains modules through class comparison and a Stack mixin, while signposting deeper method-lookup mechanics.
- Examples
- Uses a Stacklike module, a Stack class, include, and equivalent modular and nonmodular implementations.
- What you can do after
- Apply Ruby modules with include to share a general behavior across multiple classes without duplicating implementation.
Read how The Well-Grounded Rubyist, Fourth Edition explains modularity →
Introduction to Generative AI, Second Edition
A modular architecture divides a system into separate components that perform distinct functions and can be designed or modified independently.
- How it is used
- Organizes generative AI systems into coordinated components for retrieval, generation, validation, safety filtering, and targeted intervention.
- How deep it goes
- Explains component separation, advantages, and failure risks, but stops short of implementation details.
- Examples
- Uses document retrieval, draft generation, safety screening, persistent audit logs, and runtime safeguards as system components.
- What you can do after
- Evaluate modular and end-to-end architectures by comparing control, reliability, interpretability, complexity, and deployment demands.
Read how Introduction to Generative AI, Second Edition explains modularity →
Building LLM Applications with DSPy
Modular organization is a structural pattern that separates an application into composable components with distinct responsibilities.
- How it is used
- Uses modularity to make DSPy applications easier to develop, test, debug, review, and monitor.
- How deep it goes
- Explains component boundaries and substitution, but does not detail implementation internals.
- Examples
- Uses interchangeable language models and predictors, with scikit-learn model swaps and PyTorch architecture changes as comparisons.
- What you can do after
- Apply modular organization by swapping DSPy language models or prompting techniques without changing other code.
Read how Building LLM Applications with DSPy explains modularity →
Also covered in
- Snowflake Data Engineering
- Software Architecture Decision-MakingIn early access (MEAP)
- Simple Object-Oriented Design: Create clean, maintainable applications
- Think Like a Software Engineering Manager
- Modern C
- Modern Angular
- Timeless Algorithms, The Foundational IdeasIn early access (MEAP)
- Build AI-Enhanced Web Apps
- Functional Programming in JavaScript
- Shipping Go: Develop, deliver, discuss, design, and go again
- Collaborative Software Design: How to facilitate domain modeling decisions
- Go in Action, Second Edition
What to know first
- functionA function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- contractA contract is an agreed specification of the conditions, expectations, rights, or obligations that govern behavior or interactions between parties or software components.
- natural language interfaceA natural language interface enables interaction with a system through human-language text or speech.
Related concepts
- functionuses · A function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
- DSPypart of · DSPy is a Python framework for declaratively programming, composing, evaluating, and optimizing language-model applications and pipelines.
- function compositionuses · Function composition constructs a function by applying one function to the result of another.
- lazy evaluationaddressed by · Lazy evaluation is an evaluation strategy that defers computing an expression until its value is needed, potentially avoiding the computation entirely.
- monolithic architecturekind of · Monolithic architecture is a software architectural style in which an application's major functionality is organized and deployed as a single unit.
Questions about modularity
What is modularity?
Modularity is the organization of a system into separable components with distinct responsibilities and defined interactions.
Which Manning books explain modularity?
Architecture Modernization: Socio-technical alignment of software, strategy, and structure, React Quickly, Second Edition, Get Programming: Learn to code with Python, Retrieval Augmented Generation, The Foundational Ideas, Functional Design and Architecture: Examples in Haskell, Software Security for Developers, The Joy of JavaScript, Functional Programming in Scala, Second Edition and 8 more.
What should I know before learning modularity?
Manning books that teach modularity usually introduce function, language model, contract and natural language interface first.
What is the difference between modularity and end-to-end architecture?
Modularity is the organization of a system into separable components with distinct responsibilities and defined interactions. An end-to-end architecture handles multiple processing steps within a single unified model invocation or integrated system.
What is modularity a kind of?
Modularity is a kind of monolithic architecture. Monolithic architecture is a software architectural style in which an application's major functionality is organized and deployed as a single unit.
What is modularity part of?
Modularity is part of DSPy. DSPy is a Python framework for declaratively programming, composing, evaluating, and optimizing language-model applications and pipelines.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.















