[geeklog-devel] Namespaces

Tony Bibbs tony at tonybibbs.com
Mon Dec 13 14:01:07 EST 2004

GL2 will need to be careful with namespaces because of it's object 
oriented nature.  I'd like to propose that we follow the PEAR model for 
name our classes.  To illustrate here is an example.

All core Geeklog code would start with the Geeklog_ prefix in their 
class names.  Thus the draft of the plugin API that Vinny created would 
be named Geeklog_PluginInterface.  It would reside, however, in a file 
simply called PluginInterface.php in the system directory for Geeklog 2.

Plugins would use their own namespace so, for example, the forum plugins 
would use something like Forum_ as the prefix for all it's code.  The 
obvious problems with namespaces is GL2 will need to officially track 
and manage the namespaces...this involves allowing plugin developers to 
register a namespace effectively reserving it for their exclusive use.  
This isn't terribly different than the notion of plugin names in GL 1.3.x. 

I wanted to throw this in for dicussion as this will need to be 
finalized and documented well early on.


More information about the geeklog-devel mailing list