Baby Steps to Great Software
Without given too much away…
I recently inherited a website written in PHP that uses the CodeIgniter Framework (Which I like). The problem is that the people who used it to develop the website didn’t appreciate the MVC pattern.
Let me boil it down for you. The project consists of:
- 1 Controller
- 0 Model classes
- 30 view files in the same directory
- 0 lines of documentation
A real doozey, to say the least.
Since I’m going to be extending this masterpiece, I’ve adopted the following procedure for refactoring it to be more manageable:
- Refactor the data access (a mixture of CodeIgniter chained approach and horrible dynamic SQL stuff) into Model Classes
- Refactor the Controller into Controllers
- Organize the views into directory structures to make things a little cleaner (optional)
I’ll let you know how this goes.
Blogged with Flock