Re: [PHP] [Q] Development Best Practices

From: Chris Hayes (chayes_at_antenna.nl)
Date: 11/18/03


Date: Tue, 18 Nov 2003 11:21:05 +0100
To: php-general@lists.php.net

At 04:20 18-11-03, you wrote:
>Adam wrote:
>
>>My question, how do you guys build your pages? Do your scripts generate
>>all the HTML? I'm looking for tips and resources. Remember for my first
>>site I've embarked on a fairly large site. Code maintenance will be an
>>issue for me as I need to enhance and fix it later on.

My mistake in coding is that I always start with the parts I know I can do,
then slowly add the other functionality. I would call this an organic way
of coding, and the more additions I make, the more little changes i need to
make to the existing code until it is full of extra conditions. This is
partly because my chef keeps inventing new functionality, but mostly
because I did not know how to write a proper plan (i did try).
I tried my own way, i tried Unified Modeling Language (UML) , but that was
a bit too heavy for a one-person coding project.

Right now I am rigourously reorganising the whole mess, which would not
have been necessary had I made better plan.
The most simple rule is: divide functionality. Do not mix logic with
presentation. Have your SQL part, your logic part and your presentation part.
And of course add loads of comment while you are working. Best for the
thinking process is to first make comments of the steps you want to make,
and only then add the code. I noticed that while writing the comments, I
would adjust my plans.



Relevant Pages

  • Re: [9fans] sad commentary
    ... would utf-8 qualify as a functionality that didn't exist ... the fact that Windows is "still" the best platform if you need to do word processing in many languages has nothing to do with its comparatively low performance with many applications--an important OS functionality it lacks. ... I even doubt there's a "simple" way of inputting, say, Hebrew or Arabic in Plan 9. ...
    (comp.os.plan9)
  • [9fans] Plan 9/plan9port coding conventions
    ... like to know what coding conventions the Plan 9 community endorses. ... char *s = nil; ...
    (comp.os.plan9)
  • ANN: LAPACK and ScaLAPACK new functionality survey
    ... LAPACK and ScaLAPACK new functionality survey ... We plan to update the LAPACK and ScaLAPACK libraries and would like to ...
    (sci.math.num-analysis)
  • Re: up front designs always useless
    ... Sounds like a good plan. ... > is that learning early is better than learning late and coding provides ... Coding provides insights in some areas. ... > what I understand Big Up Front Design to be. ...
    (comp.object)
  • Re: View Source functionality yanked by MS update, need help!!
    ... That article is talking about the view-source HTTP protocol in coding a web page as mentioned here: ... that really need this functionality. ... around this besides downloading webpages? ...
    (microsoft.public.windows.inetexplorer.ie6.browser)