print Proposal: Change to autoload system for 0.2

In general the autoload system functions very well within the context of the Scorpio Framework; however adding third party libraries can be tricky, especially if they have peculiar naming conventions or capitalisation. This proposal outlines several ideas for improving the autoload mechanism. All proposals will break existing autoload cache files.

Change autoload naming format

This has been implemented in trunk as of revision 130.

The main problem with the autoload system is how to name the cache files. The autoloader itself has already been improved to allow for underscore separated classes (e.g. My_Class_here), however the cache file has issues with the capitalisation. The first proposal is to require all autoload cache files be lowercased without any spaces between components.

This would require most autoload caches being re-named and once done solves the problem in the most elegant manner without other huge changes. This is the preferred solution and removes potential problems with Windows and Linux (case insensitive versus case-sensitive).

Re-build autoload system

The next solution is to re-build the autoload system and at the same time, introduce a revised naming convention. This is the most drastic solution, and probably what will be adopted for a future major version.

The reasoning behind this is that some Scorpio classes share namespace and could result in namespace collisions with some PEAR modules and other frameworks components. As much as it would be annoying, using a proper "Scorpio" prefix would remove any possible conflicts in the future. Classes that are likely already affected include system, systemLog and dbManager et al. Changing the name space would also allow the capitalisation to be revisited and probably modified to use true CamelCaps instead of pseudoCamelCaps (which are normally methods). Underscore separated class names would be avoided out of personal preference.

<  1  >