Organization Patterns: MVC
The Model-View-Controller (MVC) design pattern is heavily used (and misused) in the PHP world. Many PHP frameworks help us – expect us – to organize our web application around this pattern. We’ll examine the intended separation of concerns. We’ll see the middleware, the request-response loop. We’ll configure GET and POST routing. We’ll look at the pattern itself. The model represents the data in our application. The view is the visual component that presents the interface for users to interact with that data, such as clickable links, form fields, and buttons. The controller coordinates it all.