PHP
  Home arrow PHP arrow Page 6 - Best PHP Practices
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Best PHP Practices
By: James Murray
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 219
    2004-09-20

    Table of Contents:
  • Best PHP Practices
  • It’s like Typing, only with a Pencil
  • What You See is… Well, You Know
  • Get your Hands off MySQL!
  • PHP Time, YAA!
  • Where Do I Start?
  • Loose Ends

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Best PHP Practices - Where Do I Start?


    (Page 6 of 7 )

    I’d bet a piece of paper and a common writing utensil could help you out here. The most important thing to think isn’t, “where should I start”, but “where do I want to start?” I always start with the graphic layout of a site before I do any coding. This why I know what my limits are when I’m trying to code something. I know what kind of output I can work with and simple things like that. Then I figure out what the main focus to the project itself is, and I go from there.

    Usually it’s best to get the most important part working first so that you have something to show, and not to mention you can get input from other people on what they think of it, before you go putting a bunch of time into the things that aren’t as important. On most of my projects, I always start with the database connection first, then I move on from there, usually to the authentication, then the layout and interface. Finally I code any content management systems I may have, followed up by the smaller and more tedious parts; they usually include things like allowing the users to have an avatar, and things like that.

    Doing it this way is usually the best way because if a project gets abandoned, you’ve probably now got something cool that you can add to your library of scripts to help you build your scary PHP empire later down the road.

    I’ve also found that if you do in fact code the big parts first, you’ll see that you’ll spend less time going back to update finished code to work with the new things you have. And there’s less of a chance of the project being abandoned due to the lack of visual progress. Not to mention you get one of those really cool feelings of accomplishment half way through a project when you finish the important things.

    Another reason I like to code the bigger more important parts first is because you’ll get stuck on something at one point, which will make you search out an answer to your problem. You’ll end up learning a lot of new things about PHP that you probably didn’t know, but you’ll remember them because they’re so cool that you’ll want to use some of the things you find in the smaller parts of the project for added functionality. I mean really useful things too, like the mysql_fetch_object() function. Do you know what that does? If you don’t, I bet you’ll say “WOW that’s so cool and useful” as soon as you look at the PHP documentation to find out what it is.

    More PHP Articles
    More By James Murray


       · I was expecting this professional, anal retentive article and instead I get this...
       · Enough would be to say, that any pro project that gets started, first off lands on...
       · Your articles are almost always enjoyable to read and this one was probably one of...
       · I completely agree! this article was amazingly helpful.But who the heck is...
       · I disagree with your choice of PHP Editors, while you say Zend is a Good editor,...
       · I think there's an editor which is simple to the extreme but is very nice for php,...
       · What a waste of time this article was. Give me my money back!
       · Ok, here's your $0 back..
       · There are some good tips in this article but there is a lot more you can do to save...
       · I should have mentioned this in the 'Purity Balance.' Why not use HTML generated by...
       · I read it and thought, "wtf is this shit?" Dreamweaver/GoLive + MySQL GUI = PHP...
       · i agree on what you have said that the command line is still the best... but i guess...
       · In my opinion it had its good points. My biggest problem with it is the title of...
       · I developing Web applications in PHP since last two years, and i am VERY VERY...
       · I have heard this argument before regarding the apparent slowness of Zend Studio. I...
       · If the text does not need additional formatting, then block quote it with <PRE>...
       · I can code in Assembler; but why would I? Farmers could plant corn by hand; but why...
       · http://www.sextoyssexvideos.com
       · Thanks. Regardless of what people say it was useful. In a way it was a source of...
       · Regardless of what these other people are saying- thank you for helping n00bs like...
       · <a href="http://sextoyssexvideos.com/" title="Sex Toys">Sex Toys</a>
       · You compare a farmer using a WYSIWIG instead of his hands... The only comparable...
       · <a href="http://sextoyssexvideos.com/" title="Sex Toys">Sex...
       · 500 words about nothing.
       · 500 words about nothing.
       · [url=]http://www.sextoyssexvideos.com[/url]
       · [url=http://www.sextoyssexvideos.com/]sex toys[/url]
       · Crap article. What a waste of my time. The author has no idea what "best practices"...
       · I am not new to programming, but I haven't been in the game for about 5 years...
       · Me reading your reply to this article makes me wander a) if you are totaly ignorant...
       · I rarely post anything anywhere but I was so annoyed by this article so I had to...
       · The article wasn't bad, but has absolutely nothing to do with "PHP Best Practice."...
       · just surfin the web and got here with that nice-titled-article of yours. are you...
       · I have to say I was not impressed by this "Best PHP Practices" article at all. In...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT