Home > WideImage > WideImage class/file naming scheme will change in RC1

WideImage class/file naming scheme will change in RC1

February 13th, 2009

I’ve been thinking a lot about this, and I’ve decided that I’ll change the class/file naming pattern in WideImage RC1 at the cost of breaking BC. There are two reasons for that: standardization and namespaces.

While I’m not really fond of PEAR-like naming (I prefer class names short and neat), it’s the current unofficial standard for user-base packages. Plus, class names can only be short and pretty if you can ensure you’ll have no class-name collisions. This means that only classes that are very specific (i.e. DirectoryIterator), or end-user can have such names, not the ones that come with libraries, or are introduced in the language itself when it’s already mature (PHP’s Date class collision, hint hint).

The other upside to this change is that it’s namespace-ready. When PHP 5.3 will be installed by most hosts, packages will start making a move towards the use of namespaces, and WideImage will be no exception. Changing the naming scheme now ensures that the users will have time to adopt the new scheme and will not have much trouble when the change towards namespaces is made.

Along with this change I’ll also drop support for autoloaders in WideImage. Autoloading is a great feature, but isn’t the right tool to use here, and caused a few problems when the library was embedded within some other project that already had autoloaders. So, the files will be included directly from WideImage.php, which shouldn’t cause much of an overhead, since the number of files is rather small.

Hopefully, I’ll also manage to put all this into a PEAR package, although for now not through the official PEAR repository. I believe these changes will make it easier for the developers to install and use this library. The price will be quite high, because backwards-compatibility will be broken by these changes, but it’s better now than never.

When are the changes expected? I’ll soon publish a beta2 version of the library, which will still have the old scheme, but will also create a RC1 branch in which I’ll make the changes. Both releases are scheduled in Q1 2009, which means quite soon.

Share and Enjoy:
  • Print
  • del.icio.us
  • Twitter
  • Facebook
  • Digg
  • Google Bookmarks
  • Technorati
  • FriendFeed
  • Netvibes
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • email
Author: Gašper Categories: WideImage Tags:
  1. No comments yet.
  1. No trackbacks yet.