Drupal and __autoload

Crell published some interesting benchmarks in 'Benchmarking magic'. He mentions the overhead of loading and parsing in PHP being a big bottle neck in the comments. My current project uses a few classes that kind of clutter the .module and aren't always used. Having PHP magic functions on the mind I immediately started thinking about __autoload and Drupal.

OO, Media, and Method Overloading...

I'm not a big fan of OO development. I think the OO approach is poor for readability and code comprehension. However, it does make for great black boxes. I really appreciate OO for encapsulating executable code. I recently wrote a module called ImageAPI for drupal that encapsulates Images in an object with a procedural interface for manipulating the Images stored in the objects. Later I wrote a wrapper around FFmpeg and took it a step further and replaced the procedural interface with methods.

There were a few problems this nicely encapsulated.

    Subscribe to RSS - OO