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  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
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: starstarstarstarstar / 223
    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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT