Home arrow PHP arrow Page 6 - Best PHP Practices

Where Do I Start? - PHP

One of the things I hear from people and my friends is questions about the best way to work with PHP. They always want to know how to get started on a project, what software to use, how to plan it successfully, and so on. In this article I plan on revealing the “magical secrets” about how I do my PHP programming so quickly with so few bugs.

TABLE OF CONTENTS:
  1. Best PHP Practices
  2. It’s like Typing, only with a Pencil
  3. What You See is… Well, You Know
  4. Get your Hands off MySQL!
  5. PHP Time, YAA!
  6. Where Do I Start?
  7. Loose Ends
By: James Murray
Rating: starstarstarstarstar / 225
September 20, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: