This version of ADOdb Lite has an innovative new module feature.
This is one of the things I have always thought ADOdb has needed... A way to easily extend the library where programmers do not have to rewrite the core library code.
The new module system will allow as many modules to be loaded as you need. The only real limit is in the amount of memory you have on your server. But I doubt if there will be tens of thousands of modules created for this library to make that ever come close to happening.
A module list variable has been added to the ADONewConnection function. You populate this variable with all of the modules you want to use with your database. If you omit this variable then none of the availible modules will be loaded.
There are two modules in this release of ADOdb Lite.
The first module is called "Transaction" and will add transaction support to most of the database drivers.
$db = ADONewConnection('postgres7', 'transaction');
The above will create your ADOdb Lite connection object with the transaction support module loaded.
The second module is called "Pear". I have removed all of the Pear Compatible functions from the adodb.inc.php and driver files. They have been placed into their own pear_module.inc file.
$db = ADONewConnection('postgres7', 'pear');
The above will create your ADOdb Lite connection object with the pear support module loaded.
If you need to load multiple modules you can enter as many as you want. You will need to place a colon (:) between each module in your list.
$db = ADONewConnection('postgres7', 'transaction : pear');
The above will create your ADOdb Lite connection object with the transaction and pear support modules loaded.
I have also executed the Web Stress Test on the new version of ADOdb Lite with the pear and transaction modules enabled. There was no detectable difference in pages per second loaded on the accelerated and non-accelerated tests. In some passes it came out a few pages per second faster.
I needed to add some form of module support to maintain ADOdb Lites status as being a light version of ADOdb. This new module system will allow users to run as small a version of ADOdb Lite as they need.
The next module I will be working on after this release will be a caching module that will add ADOdb's cache support.
I would like to think everyone for their feedback on this project as it has really helped in developement.
This version decreases the memory footprint of ADOdb Lite from approximately 94k to 83k.