官术网_书友最值得收藏!

Legacy Frameworks

Until now, we have been discussing legacy applications as page-based, include-oriented systems. However, there is also a large base of legacy code out there using public frameworks.

Framework-based Legacy Applications

Each different public framework in PHP land is its own unique hell. Applications written in CakePHP (from different legacy issues than those written in CodeIgniter, Solar, Symfony 1, Zend Framework 1, and so on. Each of these different frameworks, and their varying work-alikes, encourage different kinds of tight-coupling in applications. Thus, the specific steps needed to refactor applications built using one of these frameworks are very different from the steps needed for a different framework.

As such, various parts of this book may be useful as a guide to refactoring different parts of a legacy application based on a public framework, but as a whole, the book is not targeted at refactoring applications based on these public frameworks.

In-house, private, or otherwise non-public frameworks under the direct control of their own architects within the organization likely to benefit from the refactorings included in this book.

Refactoring to a Framework

I sometimes hear about how developers wisely wish to avoid a complete rewrite and instead want to refactor or migrate to a public framework. This sounds like the best of both worlds, combining an iterative approach with the developers' desire to use the hottest new technology.

My experience with legacy PHP applications has been that they are almost as resistant to framework integration as they are to unit testing. If the application was already in a state where its logic could be ported to a framework, there would be little need to port it in the first place.

However, by the time we have completed the refactorings in this book, the application is very likely to be in a state that will be much more amenable to a public framework migration. Whether the developers will still want to do so is another matter.

主站蜘蛛池模板: 芦溪县| 英吉沙县| 和顺县| 峨边| 鄄城县| 四平市| 万年县| 菏泽市| 新化县| 宜良县| 民权县| 沅江市| 荣昌县| 乾安县| 永兴县| 沽源县| 富平县| 南皮县| 东阳市| 金昌市| 蒙城县| 大关县| 雅江县| 鄄城县| 旅游| 巩义市| 武山县| 博罗县| 江源县| 六枝特区| 瑞安市| 大渡口区| 涞水县| 汝州市| 双鸭山市| 田林县| 吉木萨尔县| 武冈市| 万荣县| 平和县| 冷水江市|