SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Wizard silver trophy
    beley's Avatar
    Join Date
    May 2001
    Location
    LaGrange, Georgia
    Posts
    6,117
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    How do you PLAN your PHP projects?

    I am working on a fairly simple script for a client, although it's the largest I've ever done (I'm pretty new at PHP)

    The script will call from three tables in a database... one containing listings, one containing categories, and a lookup table.

    The script is for a Chamber of Commerce that wants a business directory so people can search the database, and so they can edit it easily.

    So, my question is this:::

    How do you START developing database projects? How do you first PLAN the project before you start coding?

    Any help would be REALLY appreciated!

  2. #2
    SitePoint Enthusiast Domi's Avatar
    Join Date
    Jun 2001
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ususally just plan on paper, drawing a chart of the php scripts and what table and when it corresponds to.

    You have to have the right idea in your head before you start coding, so something visual always helps me.

    Cheers.
    Dominik
    Webmaster / Owner
    HostRecord.com - Web Hoststing Resource
    HostTalk - Web Hosting Discussion

  3. #3
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    :whispers to beley: "visio"... "visio"... "visio"...

    Actually, the ability to sketch out is incredibly vital to any development project so do it! After that, I normally do database design and normalization schemes (also vital). After that? Depends on the project
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  4. #4
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yup yup yup. Paper paper paper. Have "sketches" of all the access/admin/display pages, with reference to how they interconnect (you may find this actually helps you "reduce" the number really needed. Draw out the db schema, both graphically (table relationships etc) and in writing (datatypes etc).

    Look at what you've got...

    Start again! Reduce, test theoretical functionality. Look for holes.

    I have a working example of what you're doing on my site, but the code won't be good to cut and paste because the design had to incorporate the existing db structure of the Chambers internal client management system, and group by UK standard industry classification codes.

    It can be found here.

    Good luck!

    H
    Last edited by TheOriginalH; Nov 13, 2001 at 13:35.
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  5. #5
    SitePoint Wizard silver trophy
    beley's Avatar
    Join Date
    May 2001
    Location
    LaGrange, Georgia
    Posts
    6,117
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the help guys... I'm not really familiar with SQL but am learning. I know all the relationships and have a diagram of how they should interact. I guess my main problem right now is just writing the code right!

    Hopefully it won't be too hard. All those if-then statements give me a headache!!

  6. #6
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Another good tool for diagramming is SmartDraw - from Smartdraw.com

    I use it for all my digrams now when I'm not found scribling on a bit of paper.
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  7. #7
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's funny. I've never really "planned" what i've done so far.
    I've had a pretty decent vision of what i want, but theres always something that changes in the development process, so i can't really outline the whole thing first.

    So, i build and modify as i go, with a set goal that i want to reach.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  8. #8
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm with Defender on this one. I know it's extremely bad practice, but I've always just built bit by bit, no plans. Maybe that will change soon...
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  9. #9
    SitePoint Zealot Nate's Avatar
    Join Date
    Sep 2001
    Location
    BC, Canada
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Plan? The most planning I do is I write down all the fields that I will need for whatever I want to do, think about it, generally rewrite the list, and away I go.

    Then again, none of my projects are that ginormous...
    NATHAN WRIGHT
    PHP Developer, Simple Station

  10. #10
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey beley
    did the exact thing you are doing just a few months ago.. it was a little more complicated though.
    (http://www.welcometokelowna.com/directory/main.php3)

    I found that when I was making it that I ran into a lot of unexpected things that I didnt think about in the planning stage.

    Take the time and plan carefully, you wont regret it afterwords.

    Often the planning stage is skipped in order to try to get the project done faster, but it usualy ends up taking longer because of unexpected circumstances...

  11. #11
    SitePoint Zealot
    Join Date
    Sep 2000
    Location
    Seattle, WA area
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by slighltywhacked
    hey beley
    did the exact thing you are doing just a few months ago.. it was a little more complicated though.
    (http://www.welcometokelowna.com/directory/main.php3)

    I found that when I was making it that I ran into a lot of unexpected things that I didnt think about in the planning stage.
    I visited Kelowna this past summer and I absolutely loved it. Quite an excellent place.

    Anyways, I usually use tons of paper when planning out my projects. I make sure to sketch out the databases, a general idea of what functionality the site will have, how users will interact with this site, and also how admins will use it. I also make sure to leave plenty of room for ideas that come to my mind, as I usually get plenty of ideas that just come to my head throughout the development process.

    Taking the time to plan out your project saves you a TON of time that you would later have to spend re-doing things that don't work properly or don't fit with the rest of the site. If you don't sit down and plan your project, you'll probably wind up doing it poorly.
    David Baxter
    Freelance PHP/MySQL Developer
    Contact me for more information: [ Email ] [ICQ: 47136518]

  12. #12
    Database Jedi MattR's Avatar
    Join Date
    Jan 2001
    Location
    buried in the database shell (Washington, DC)
    Posts
    1,107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is what I've done for the past couple of years (seems to work real well even for very large applications (100's of DB tables, stored procs, etc.)).

    Let's assume you're going to write a message board system.

    1. Define the problem ("We need to write a message board system.")
    2. Define the parts in a spec document, high-level stuff like "Users can compose posts, threads, etc.".
    3. After you define the high-level things write more detailed specs like "users can't edit their posts after 5 minutes, etc."
    4. Determine a conceptual database model ("Well, we'll have posts which should have maybe a userid field along with a title, threads, forums, etc."). Nothing DB specific -- you don't even need to know what datatypes you'll use, just the components of the table.
    5. Determine what, if any, stored procedures/triggers can be used; no code but things like “When a user enters a post, their post count will increment. We can use a trigger for that.”
    6. Compare conceptual DB and specs, make sure they jive. If so, work out the physical model (use a diagram tool if you can since it can also generate the DDL statements).
    7. Create DB and tables.
    8. Create skeleton application code to perform basic tasks (show, insert, edit, delete records).
    9. Work out stored procs and such.
    10. Polish, repeat, polish, etc.


    It’s not an exhaustive list but it is off the top of my head. Really I should write it down and work out a method that I find works well but generally those are the steps even if I don’t follow them to the letter.

    Hope that helps!

  13. #13
    SitePoint Addict zoordaan's Avatar
    Join Date
    Feb 2001
    Location
    NYC/Texas
    Posts
    348
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I generally write down what I want to accomplish but sometimes I also draw digrams of how things should work. I my experience thinking about what I want to do before writing the code for it helps with determining what to select from the database.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •