May 16, 2008

PHP modular framework

Posted in PHP tagged , , , at 5:23 pm by tetontech

QuickConnectPHP is a modular framework for the server side of PHP applications.  It can be downloaded from QuickConnectPHP on sourceforge.  The idea behind it, as with most frameworks, is to make it easy for developers to create applications that are scalable, flexible, and secure.

Currently I am working on a database access object to include in the frame work that interacts with Oracle.  The existing database access object works with MySQL.  Both of these classes have a straight forward API that hides much of the complexity of interacting with a database.  The main methods are getData for doing queries and setData for all other calls.  Prepared statements are handled as well as BLOBs, CLOBS, transactions, and stored procedures.

When the DAO is used to interact with a database it stores and makes available such information as error codes and messages, the id of any new records inserted into tables that use auto-incrementing keys, the field names retrieved in select statemets, etc.  If the getData method is used the result of the query is returned to the programmer making the call as a standard PHP 2D array.

The Oracle version is now moving into the testing phase.  The getData and setData methods allow the programmer to follow a prepared statement pattern that uses a ? as the place holder in the SQL.  They then replace these question marks with bindings to variables.  This frees the programmer from needing to know how to interact with OCI8 and doing variable bindings.

I hope to have this Oracle version in a beta state soon so a working version can replace the place holder in the QuickConnectPHP package available from sourceForge.

 QuickConnectPHP

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: