[wp-hackers] Less than Core, More than Plugins/Themes: Proposing Optional Modules.

Peter Westwood peter.westwood at ftwr.co.uk
Tue Feb 3 08:50:42 GMT 2009


On 3 Feb 2009, at 07:53, Ryan McCue wrote:
>
> There is, however, a catch: __autoload() is only available in PHP5+.
> And, I don't believe there is any way at all to replicate the
> functionality (being that the code that calls it is built into the
> Zend/PHP engine). This is most likely not a problem though, because I
> doubt the APIs would be ubiquitously used, even by about 3.2. Until
> then, we could have it as a progressive enhancement for developers who
> develop for PHP5+.
>
> So, for those of you who skipped to the end (I'm talking to you, tl;dr
> fans): standard API classes; must be included with the core; should be
> autoloaded; needs PHP5+; maybe progressive enhancement.
>

Personally, I would avoid autoload like the plague.  It is one of the  
more brain dead design decisions in PHP and encourages poor  
programming practice.

If you need to include files because you are using code in them -  
then you should include them relying on autoload when you know you  
need them is just a waste of execution time.

(I also hate the PHP concept of overloading as well but will save  
that rant for another day!)

I don't see why we need these "Optional Modules".

If there is API missing from our framework we should add it.

If there is a big piece of functionality that is required by a large  
portion of our end-users we should add it to the core.

We don't need to maintain optional pieces of code which are not used  
by many users - history has shown that functionality not in use by a  
large portion of the user base gets broken and doesn't get the  
attention it needs to be kept up-to-date.
Moving to having optional bits of code would only increase the burden.

The open-source model prefers choice over restriction which is why  
there are multiple plugins that do the same thing - this is not a bad  
thing it is a good thing!

Peter
-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5



More information about the wp-hackers mailing list