views:

120

answers:

1

I have current PHP codebase written in procedural (mainly) style that our client is using for some time now. What we want is to "strangle" (as in concept Strangler Application) that code and add Zend Framework to enable new development.

What I have now is custom route that routes all "old" HTTP request to one controller (i.e. Strangler Controller) and that controller will use cURL to make new request transferring that request to "old" application (this "old" code uses also .htaccess to do some rewrites...) and fetching response that I send directly to user browser. This is done because the old code already does all processing and templates and such stuff (session...).

Next step will be to implement ZendSessions so we can mirror user experience through both applications.

After writing some new features using ZF MVC we will route these new request to new code... Hopefully, this will all end in removing all old code in some reasonable time window.

What I ask:

"Is there anybody already doing this and if Yes, what are the advices with taking these step and implementations?"

Thanks in advance.

A: 

You definetly shouldn't do anythink like "half way" :) You should develop the project in whole and test it. Then send it live :) We've done that with bank intranet and it worked OK.

Tomáš Fejfar
What do you mean by "develop the project in whole"? There is planned ongoing development for this new application, but the basis must be done first (routing, sessions, orm)... I would take these 3 as "whole" basis, after that we can go and use both apps while developing new features and replacing current ones... Or?
f13o
My way would be develop the required features, then test them and then put them online. I guess you planed using something like: rewrite requests to new urls and route them to old app, then put some features to the new, test them and then move them to the live app while still having other features in old app, and contstantly adding more features. You will meet with huge problems maintaining data consistency and good design will be suffered to partional backward compatibility. You can't have good design when part of web is new and part is old as long as they share same data.
Tomáš Fejfar
And the "old design" is proven wrong in 99% of cases
Tomáš Fejfar