When working with legacy applications, there are two major problems tied for first place in causing frustration, pain, and overtime: globals, and includes. I talk about how to remove globals in “It Was Like That When I Got Here”. But removing includes can be a much bigger challenge in many ways.
My new book, “Modernizing Legacy Applications in PHP”, has an entire chapter on how to convert includes to independently testable classes. The chapter describes how to do this in a way that does not break the existing legacy code.
As a gift to PHP developers suffering under legacy applications, I have made that chapter part of the sample text for the book. You can read it here.
Are you overwhelmed by a legacy PHP application? Have you inherited a spaghetti mess of code? Does it use globals everywhere, so that a fix in one place causes a bug somewhere else? Does every feature addition feel like slogging through a swamp of includes?
It doesn’t have to be that way. “Modernizing Legacy Applications in PHP” gives you step-by-step instructions on how to get your legacy code under control by eliminating globals and separating concerns. Each chapter shows you exactly one task and how to accomplish it, along with common questions related to that task.
When you are done, you will come and go through your code like the wind. Your application will have become autoloaded, dependency injected, unit tested, layer separated, and front controlled. And you will have kept it running the whole time.
Buy the book today, or sign up for notifications on the mailing list below!