[nycphp-talk] intro question
jsiegel1 at optonline.net
Wed Aug 27 13:00:02 EDT 2003
Hope you don't mind if I "steal" this piece and use it for the new
"fundamentals" section of NYPHP which will be dealing with newbie
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of David Mintz
Sent: Wednesday, August 27, 2003 9:42 AM
To: NYPHP Talk
Subject: Re: [nycphp-talk] intro question
Here's my newbie preachment:
Learn from my newbie mistakes! I was in much the same boat when I
to learn PHP/MySQL by developing an ambitious scheduling and record
keeping system for ourselves, the court interpreters in the federal
* The urge to just do it is powerful, but time spent reading, planning
your design, and playing with and testing techniques, is well invested.
did my app in an improvisatory, ad hoc way that makes me marvel that it
works as well as it does.)
* While you might not do full-blown Test Driven Development, where you
literally write tests for your code before you write the code itself,
should use an approach that is similar in spirit and strategy. Test the
hell out of little pieces and make them prove themselves under every
scenario you can think of.
* If some piece of code looks like it's getting too complicated, it
probably is too complicated. Step back and rethink.
* Consider using a templating system like Smarty. When HTML and PHP are
blended together indiscriminately, it is torture to read and maintain.
* Think about security from Day One, not as an afterthought.
* Consider using classes and objects, like somebody just said. There are
different schools on this, but one nice thing about OOP is that the
you begin to think about a name for your classes, you are thinking about
what they are supposed to do and where they fit in with the rest of the
picture -- it automatically encourages you to think.
* Be pretty anal about following your own variable, class and method
naming conventions consistently. For example, will it be this_style or
* Think about your database schema carefully before you commit to it,
try to avoid the promiscuous hard-coding of things like table and column
names to the extent possible, so it doesn't cost hours of acute pain
someone decides that a table needs to be altered. This will also make it
easier to re-use your code on future projects.
* Consider using version control, like CVS. Yes it's yet another tool to
learn, and it can drive you insane when you don't understand it, but
someday you will be grateful for it.(http://cvshome.org/)
* Comment abundantly
* Have fun!
Email: See http://dmintzweb.com/whitelist.php first!
"Y dále p'abajo"
> Subject: [nycphp-talk] intro question
> > Hello...
> > I would like to know if PHP and/or MySQL is the answer to my design
> > problem. I have been told so, but I am a beginner to both, and need
> > good intro tutorial also.
talk mailing list
talk at lists.nyphp.org
More information about the talk