php module system

Discussion in 'Web Design and Development' started by qwerty2k, Mar 10, 2009.

  1. qwerty2k macrumors regular

    Joined:
    Dec 27, 2007
    #1
    Hi,

    Basically i want to create a module system for a php web app i am creating but not entirely sure the best way to do it.

    what i *think* i want to do is have a skeletal core 'program' that loads modules and then add the actual programs functionality through modules that can interact with each other.

    now has anyone ever done anything similar or can anyone point me in the right direction of any articles etc that discuss this type of thing and offer some solutions/directions as to what may be best to achieve this.

    Thanks,

    Scott
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Sounds like you want to look into creating Pear modules. http://pear.php.net/
     
  3. qwerty2k thread starter macrumors regular

    Joined:
    Dec 27, 2007
    #3
    hi, thank you for your prompt response. i am using this as much as a learning experience as anything else and would very much like to create my own system so if you have any ideas about where i could find articles/help which discuss pro's/con's of certain ways etc i would be very grateful.
     
  4. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #4
    @OP:

    Aside from Pear, which is a framework and distribution system for reusable PHP components (how to install Pear packages), normally PHP modules are called extensions, i.e. they are statically compiled into the PHP core (enabled in the php.ini file), i.e. filename.so (shared object file). These .so files can also be dynamically loaded at runtime using the dl() method so long as the shared object file is in /libexec.

    Is that what you meant by extensions ----- shared object files?

    OOP programming and classes is a common way to create portable code that can be extended (as child classes), btw.

    -jim
     

Share This Page