Forum Moderators: coopster

Message Too Old, No Replies

What to use to replace PHP procedural code?

         

ramoneguru

2:08 am on Aug 5, 2007 (gmt 0)

10+ Year Member



Ok, so lately I've been given an application that is pretty much written in a procedural style (a bunch of pages with functions, no classes, using php 5, and just kinda flows in a procedural manner).

Now, the code needs to overhauled and become more maintainable for the next fellow that will be taking over this position. What paradigm should I use to replace the old stuff?

Some other developers keep telling me to use MVC to rewrite the whole thing. Is this a common practice to update 'legacy' code? Or are there other paradigms that I should consider before jumping in (I don't really know very many others so if you have suggestions please feel free to voice them).

I'm just curious about options.

Thanks WW.

--Nick

Habtom

5:14 am on Aug 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Now, the code needs to overhauled and become more maintainable for the next fellow that will be taking over this position.

I don't see it is a good idea to move to OO just for the reasons you mentioned. Procedural can still be maintainable. I agree OO could be a good thing when you do new projects, but changing an existing one could just be a waste of time.

You can do a few things with the procedural, make it readable, add comments and reorganize functions in pages.

Check out this thread [webmasterworld.com]