SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard mark_W's Avatar
    Join Date
    Mar 2004
    Location
    West Midlands, United Kingdom
    Posts
    2,631
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Class' Effectively

    Hiya,

    Ive only recently started learning OOP and feel that already I can see the benifits of it. It is something I would like to further embrace and wanted to start by asking a quick question here. What I actually want to do is create a cmf/cms that I can use on projects for clients.

    The kind of idea I had in mind was something like, there is a folder that contains all the modules. For example you have a statistics module that sits under the mods folder in a statistics folder. That statistics folder contains a class that does all the work and a file that uses that class and contains html output. Not a lot of output just something that echos the details, like IP and Browser.

    What I wanted to try and get is an idea of exactly how I would implement this. Im not sure exactly how I would get it to use templates, I want the templates to virtually just be plugged in....so you drop them in the templates folder, select them and they just work. Also what the best way of creating some sort of controller for checking to see if certain modules are active and if they are initializing their class'.

    I hope I make sense

    Mark

  2. #2
    ********* Victim lastcraft's Avatar
    Join Date
    Apr 2003
    Location
    London
    Posts
    2,423
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hi...

    Quote Originally Posted by mark_W
    What I wanted to try and get is an idea of exactly how I would implement this. Im not sure exactly how I would get it to use templates, I want the templates to virtually just be plugged in....so you drop them in the templates folder, select them and they just work. Also what the best way of creating some sort of controller for checking to see if certain modules are active and if they are initializing their class'.
    You are going to overload yourself with all of this.

    Can you give an example of exactly you want to happen. I mean a specific instance, such as if the statistics module is loaded I want to see this happen when the user does this. By building up the project one step at a time you will find things much more manageable.

    yours, Marcus
    Marcus Baker
    Testing: SimpleTest, Cgreen, Fakemail
    Other: Phemto dependency injector
    Books: PHP in Action, 97 things

  3. #3
    SitePoint Wizard mark_W's Avatar
    Join Date
    Mar 2004
    Location
    West Midlands, United Kingdom
    Posts
    2,631
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Marcus,

    I understand what you are saying, I had already started building it up piece by piece and thought that maybe I should have a more complete view on how I was going to like all these pieces together and how I was going to provide a uniform look throughout the site/modules.


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
  •