SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Need some help

  1. #1
    SitePoint Zealot
    Join Date
    Aug 2003
    Location
    Singapore
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need some help

    I'm currently having some construction on my website, it now contains only static pages with includes everywhere, but now I'm a database driven with oop.

    The thing is, I've thought about the model it should follow, in a functions file I've built a rough function about how I should go about.

    Now how do I determine whether which sections need seperate functions, and not use a rough object model? The reason being I need to pull different data, and different sections have different needs, but I see that I could have a workaround by modifying parameters of the function which directly changes the query. But is this good oop practice?

    Let's say I've Profiles, Downloads, Rules, Gallery and Site Map sections. How would you determine if each should have its own functions, or use the main one?

    Thanks, sorry if I've put it across as very weird, I'd explain more if needed.

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah it's just a judgement call on your part. You can mess with your functions forever and add tons of extra parameters and code to get them to work in each area, or you can have separate, slightly different versions for each use. You have to figure out some balance.
    ck :: bringing chris to the masses.


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
  •