# Inside the Framework

The library goes on the web: requests come in, pass through checks, reach a controller and go back out. Every step is a pattern.

Updated: November 17, 2026

## [Model, View and Friends](https://www.ask-codey.com/courses/design-patterns/topics/dp-model-view-and-friends)

1. [MVC: Model, View, Controller](https://www.ask-codey.com/lessons/dp-mvc) (Journeyman): When one function reads the library's data, applies its rules and draws the page, every new screen copies all three jobs and the copies drift apart; MVC splits them into a model (the data and the rules), views (how it's shown) and a controller (what a request does), so a new screen is a new view and a rule lives in one place.
2. [MVVM and Components](https://www.ask-codey.com/lessons/dp-mvvm-and-components) (Journeyman): When a screen's code has to update every label by hand after each change, one change sooner or later forgets one and the screen shows something untrue; MVVM puts the screen's state and rules in a view model that tells the view when it changes, so the view, bound to it, redraws itself, and a component in Angular or React bundles a view with its view model.

## [The Request Pipeline](https://www.ask-codey.com/courses/design-patterns/topics/dp-the-request-pipeline)

1. [Middleware: The Airport Checkpoints](https://www.ask-codey.com/lessons/dp-middleware) (Journeyman): When every endpoint starts by copying the same checks (log the request, make sure someone's signed in), one endpoint forgets one, and every new check is an edit to all of them; middleware gives each check its own small step in a line every request passes through, so each step handles the request or passes it on, which is Pass 3's Chain of Responsibility at work in every web framework.
2. [How Frameworks Are Built from Patterns](https://www.ask-codey.com/lessons/dp-frameworks-from-patterns) (Journeyman): A framework you've never seen looks like hundreds of files and a lot of magic; follow one request through it and every step is a pattern this course has taught (a facade to start it, observers when it starts, a pipeline of middleware, a dictionary of routes, a container, a controller, a repository), and the framework calling your code, not the other way round, is what makes it a framework.

## [Exercise: The Request Pipeline](https://www.ask-codey.com/courses/design-patterns/topics/exercise-dp-request-pipeline)

1. [Exercise: The Request Pipeline](https://www.ask-codey.com/lessons/exercise-dp-request-pipeline) (Journeyman): Take a ticket from Riverside Community Library's platform team: every request's checks are written out in one function, and two other teams need them as separate pieces. Build a tiny request pipeline with no framework, turn logging, the sign-in check and timing into middleware, and let the security team add their own check in the middle, with the tests green throughout.

Source: https://www.ask-codey.com/courses/design-patterns/chapters/dp-inside-the-framework
