[thelist] php modularization

Joshua Olson joshua at waetech.com
Sat May 15 16:46:48 CDT 2004


> -----Original Message-----
> From: Codi Lechasseur
> Sent: Saturday, May 15, 2004 4:00 AM
>
> i'm trying to wrap my head around how you can make a php web
> application core, and then have plugin modules that interact with
> the core, without any changes to the cores code. for example.
> starting with user registration and login system as your core,
> then adding a search module that would be completelly independent
> of the core user registration system. is something like this
> possible in php. do i have to use oop?? any have any articles on this?

Codi,

In a modular system, there's really no way to make modules that are
completely independent of the core system.  By basic nature, the core system
should be what allows communications between all the modules through
exposing API's (Application Programming Interfaces).  API's are a
fundamental concept in application development, especially when trying to
make an application that is easy to modularize.

Implementation of a solid API doesn't necessarily require oop, but oop
concepts lend themselves very readily to API based interactions because of
the inherent encapsulation of private data elements.  Through PHP, you
should easily be able to create whatever modular type of system you can
dream up.  The quality of your product will be greatly affected by the
quality of your API's.  You should be able to plan API's before one line of
code is written by simply defining the abstract objects in the system and
defining what actions each should be able to do with other objects.  Once
those actions needing to be performed against an object you've essentially
defined the API for that object.  Document it and stick to it.  Any changes
to the API DURING the development should be held under the highest scrutiny
before implementation.  Always update your documentation any time you decide
to change/expose an interface through code if it doesn't appear in the
existing API documentation.

There's LOTS of material available on API concepts through Google.  I'd
suggest that you start there for sure.  Also look up modular programming on
Google.

Best of luck,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168




More information about the thelist mailing list