Concepts
The Concepts section explains how Plumego works internally.
If:
- Core defines what Plumego guarantees
- Architecture defines how systems should be shaped
- Guides show how to solve real problems
- Patterns define long-term discipline
Then Concepts sit in between.
They describe the mechanics —
the moving parts that make Plumego function.
What This Section Is For
Concepts answer questions such as:
- How does a request move through Plumego?
- What exactly is a Context?
- How does middleware wrap handlers?
- How does routing actually dispatch requests?
- What happens when execution stops early?
These are framework mechanics, not architectural advice.
Understanding them prevents misuse and false assumptions.
What This Section Is Not
Concepts are not:
- A tutorial
- A best-practices guide
- An opinionated architecture manual
- A list of features
You should not copy code from this section blindly.
Instead, use it to build a correct mental model.
Design Philosophy Behind Concepts
Plumego concepts are intentionally:
- Small in number
- Explicit in behavior
- Predictable in execution
- Free of hidden side effects
Every concept exists to support explicit control flow.
If a behavior cannot be explained clearly in this section,
it probably does not belong in the framework.
How Concepts Relate to the Core
The Concepts section explains how to use what the Core provides.
For example:
- Core guarantees a Context → Concepts explain how it flows
- Core provides middleware → Concepts explain wrapping semantics
- Core provides routing → Concepts explain dispatch behavior
Concepts never expand the Core’s responsibility.
They only clarify it.
Recommended Reading Order
Concepts are best read in order:
Request Lifecycle
The mental backbone of Plumego.Context
The request-scoped data carrier.Middleware
Explicit control flow around handlers.Handler
The HTTP boundary and translation point.Router
Deterministic request dispatch.Error Model
How failures move through the system.
Each concept builds on the previous one.
When to Read This Section
Concepts matter most when:
- You are new to Plumego
- Something behaves differently than expected
- You are debugging middleware or routing
- You are deciding where logic should live
They help you answer “what is actually happening?”
Concepts vs Patterns
A useful distinction:
- Concepts explain what happens
- Patterns explain how to work with it over time
If you understand Concepts but ignore Patterns,
your system will still work — but may not age well.
Summary
The Concepts section provides:
- A shared vocabulary
- A correct execution model
- Clear boundaries of responsibility
- A foundation for all higher-level guidance
Read this section to understand Plumego.
Read the rest to use Plumego well.
Next
If you are new to Plumego, start with:
→ Request Lifecycle
If you already understand the basics:
→ Architecture or Guides
All paths are valid once the concepts are clear.