开发者

how to convert zend framework php code to cakephp

开发者 https://www.devze.com 2022-12-27 23:14 出处:网络
i want to convert zend p开发者_开发知识库hp to cake php but not finding correct book and guiding to do that????Just download Cake, install and configure it and then gradually migrate your existing cod

i want to convert zend p开发者_开发知识库hp to cake php but not finding correct book and guiding to do that????


Just download Cake, install and configure it and then gradually migrate your existing code into it. There is no standard recipe how to do that. You have to do that manually, class by class, line by line. Cake's API is quite different from ZF's API so this will take a while, depending on how much coupling you got. Also, ZF does not have any ActiveRecord, while Cake is built around that, so the database part will probably take longest.

Migrating from framework to framework is a sure thing to introduce bugs into the code. If you don't have a solid unit-test base already, it's a good opportunity to add a test before migrating a class.

On a sidenote: why do you want to to do that anyway? Cake is compatible with PHP4 and has a rather messy and slow performing codebase. Migrating your application from ZF to Cake is likely a downgrade. And as others pointed out, you could have Cake and ZF coexist.


I suggest you learn how to use both frameworks and then port the code manually. There are no tools that will do this for you; there simply is no way to do this automatically, especially given then highly flexible nature of ZF.

Learn both, use your understanding to migrate the code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号