Tony Marston wrote:
"Stut" <stuttle@xxxxxxxxx> wrote in message
news:452ED193.8080707@xxxxxxxxxxxx
My general approach to designing a system is data-centric. I tend to start
by defining the database schema since getting that clear in my head tends
to lead me to a decent design.
What a coincidence! That's exactly my approach, but I've taken it one step
further. I always start with a properly normalised database which I can then
import into my daa dictionary application. From there I can press a button
and create a class file for each database table, and I am ptting the
finishing touhes to a procedure whereby I can press another button to
generate the scripts which will maintain each table. This means I can get
basic transactions up and running without writing a single line of code. All
I have to do is edit these files to include business logic and any
customisations.
This level of automation is not possible with some people's OO
implementations, so I can only conclude that their approach is not the
optimal one.
Youch!! Your implementation seems to be focused on development
efficiency rather than runtime efficience. In all but rare research
projects this is backwards for a web-based system. This is exactly the
practice I am trying to discourage. It's a well-known fact that code
generators are a poor substitute for real developers.
For most projects I don't start out with OOP in mind, but my brain is used
to building OOP-style systems so nearly everything I do ends up with a few
classes.
The difference with me is that I don't waste my time with trivial websites,
I concentrate on administrative web applications. But even when I wrote the
code for my own website at http://www.radicore.org I still used all my
database classes as it was far easier than doing it the traditional
old-fashioned way
Trivial websites are where you can get away with using code generators.
For anything non-trivial I would not feel comfortable with a
jack-of-all-trades-master-of-none-style of code. Now that I think of it
I'm quite anal about the quality of my code, so I don't think I'd ever
use a code generator - never have before.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php