Review and next steps

The extraction of the action logic to a layer of Controllers completes a huge modernization goal for our legacy application. We now have a full Model View Controller system in place: a domain layer for models, a presentation layer for views, and a controller layer that connects the two.

We should feel very satisfied about our modernization progress. The code that remains in each page script is a shadow of its original self. Most of the logic is wiring code that creates a Controller with its dependencies. The remaining logic is the same across all page scripts; it invokes the Controller and sends the returned Response object.

However, there is a major legacy artifact for us to deal with. To finish a full extraction and encapsulation ...

Get Modernizing Legacy Applications in PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.