Categories
Programmer's Mindset

I Need PHP Advice From The Community, #tekx

I will try to keep this short.

My Background:
I have been programming for 20 years (12 professionally).  Grew up on BASIC and PASCAL.  And first job was in the old school Q&A database.  Needless to say, I started out very procedural.  My first web programming started in 1999 with PERL.  And I have always had the attitude of I will make it work and work quickly.

Advice Needed:
I took over a project 6 years ago.  It started with no pay, just a percentage of profits at the end of the year.  I took what they already had, and extended it to be able to sell more.  I year after that I was hired full time and have just been adding on top of the mess since then.  Spaghetti code, procedural, unused database tables, unused database fields, it’s just a mess.  I know OOP, but haven’t had the aha experience until a couple of years ago.  I used objects here and there, but ultimately not in good form.  

I went to TEKX to improve my skills.  I have been looking into Zend Framework, CakePHP, and others for about a year, and have decided to go with Zend Framework and Doctrine.  So I am going to rewrite my entire codebase.  Here is where I need advice.  I’m at a fork in the road.

I can either keep my bad database structure and work with it, or start from scratch and migrate the old data into the new database layout.

Pros for keeping the DB structure:
I can build parts of the site in ZF and get the code live quicker, letting the old codebase continue to run and eventually die out on its own.

Cons for keeping the DB structure/Pros for rewriting the DB structure:
The old DB is a mess.  A new DB structure will probably improve speed and data accuracy.

Cons for rewriting the DB:
I will have to rewrite the entire codebase before it can go live.  Everything will need to be rewritten and tested.  A data migration script will need to be written.  And a date will need to be set for new code to go live.

Any advice would be greatly appreciated.

2 replies on “I Need PHP Advice From The Community, #tekx”

Probably too late to comment, but redo the db. If you are taking the time to rewrite the code, give it a clean database to play with. IMHO

Leave a Reply

Your email address will not be published. Required fields are marked *