Over the past couple of days, I have been working on completing all of the PHP code required to query the WWDTM Stats Page database. Tonight, at the end of my two week sprint, I have reached that all important milestone and have successfully written a test to make sure it works.
Warning: this following contains a fair amount of programming talk. If you are not a programmer, please ignore the rest of this post ;)
The current version of the WWDTM Stats Page code has grown into a real mess and has become more and more difficult to add new features. The primary goal with version 2.0 is to write almost everything from scratch using proper class objects and breaking up code into manageable modules.
First, I also decided to move to the newer PEAR::MDB2 database access API from the older PEAR::DB package. Next, I wanted to build a new class that uses a Singleton code pattern to eliminate the need to create new database connections for each query and to reduce the amount of redundant code.
I have also decided to not depend on stored procedures as that would allow for easier database query optimization and allows me to possibly change out the underlying database with something different that may not support stored procedures.Continue reading“10 June 2012 Sprint: Data Access Code Completed”