|
Posted by Mike on 05/01/05 19:54
> I'm about to start writing a big web app (mostly in PHP). But
> I'm not sure if I should layout the DB first then write the
> app, or should I just start writing the app and add stuff to
> the DB as I need it. How do you guys go about it?
>
> Thanks,
> Dan.
>
Dan,
The single-greatest thing you can do if you haven't already is to get some
paper, get a pen and sketch it all out. Plan your DB schema now, map out all
the parts and get a working flow-chart.
Then, work on building your framework/foundation (your DB would fall under
here). Get all your db's and tables built and throw in some junk/test data.
After that, start in on your code. I've always found that with a working DB
(even with just test data), my progress is greater since I see results in
real time and won't have to dev, hope it works and then find out when I'm
setting up the DB that there's other problems.
And all throughout this process keep referring to that flow-chart. Keep
revising it and making/taking notes and ensure that it's accurate and
concise.
While it seems like a lot of overhead, the benefits you get from doing this
when working on larger projects is invaluable. You always know how
everything works and rarely need to grep countless lines of code looking for
comments to figure out how something is working.
In short - work from the bottom up and include the DB structure in that.
Good luck & have fun!
-M
Navigation:
[Reply to this message]
|