php module system

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

  1. qwerty2k macrumors regular

    Dec 27, 2007

    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.


  2. Cromulent macrumors 603


    Oct 2, 2006
    The Land of Hope and Glory
    Sounds like you want to look into creating Pear modules.
  3. qwerty2k thread starter macrumors regular

    Dec 27, 2007
    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


    Dec 7, 2007
    Alexandria, VA, USA

    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. (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.


Share This Page