Is it possible to convert working pure PHP appication to Yii

I was once asked, if it would be possible to do step-by-step conversion of a large project written in pure PHP into Yii. In my opinion, it is possible, but absolutely not worth it.

Most professional frameworks are complete opposite to “pure PHP” code in actually all areas. Code is separated most times (i.e. into model, view and controller in MVC design pattern) and uses mostly framework classes or code. I would even say, that writing an application in some framework means using only 10-20% of pure PHP code and doing rest purely on framework classes, extensions, controllers etc.

In other words: porting a “pure PHP” application into framework code would mean writing that application from scratch. I’m not sure, if you would be able to reuse more than 5% of your original source code?

Leave a Reply