Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix an old coding style php script

Is there any advice on how to start fixing an old-fashioned-style php script?

A few days ago I received an offer for developing an old PHP project, and by old-fashioned I mean the structure did not use OOP coding method and it doesn't have a definite framework.

I am confused on where to start, and wanted to know what methods there are for developing an old script.

Note: They don't want to spend lots of money on starting a new project.

So what methods would you suggest for updating an old php script?

like image 234
Farshad Avatar asked Feb 01 '10 22:02

Farshad


1 Answers

Joel Spolsky writes:

"[Netscape made] the single worst strategic mistake that any software company can make: They decided to rewrite the code from scratch."

So, whatever your course of action, priority is to work with the existing code. Refactoring will be one of the best methods you can use.

What can you not do, if the code base is not updated, that you absolutely must? How much and of what particularly do you need to upgrade for that action to be possible? Consider these two questions.

like image 153
erisco Avatar answered Oct 10 '22 04:10

erisco