This, That, and the Code

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:

  1. Refactor the data access (a mixture of CodeIgniter chained approach and horrible dynamic SQL stuff) into Model Classes
  2. Refactor the Controller into Controllers
  3. Organize the views into directory structures to make things a little cleaner (optional)

I’ll let you know how this goes.

Blogged with Flock

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>