Archive for January, 2003

Back Again

Friday, January 24th, 2003

Overall Class Structure

I have decided to loosely base some of my data access classes on the “Data Access Object Pattern (+ More Widgets)” database model featured on phpPatterns. There is currently three layers to each entity: DAO -> EntityBaseClass -> EntityClass. The DAO layer allows for common code to be shared to every generated entity.

The EntityBaseClass is generated off of the database scheme. The basic insert, update, delete, and select features are implemented along with select by primary keys, etc.

The final layer is the Entity class which inherits the EntityBaseClass. The Entity class is the main class that the user will interact with. This class may changed to add additional functionality.

Database Abstraction Layer

I will also be using the ADODB PHP library for database abstraction.

Template Library

I’m debating whether or not to use patTemplate or bTemplate as my template library of choice. While I like the overall design of patTemplate, bTemplate works exactly how a template library should. Recently, the bTemplate webpage seemed to disappear and it has an account suspended message on it.

I’ve been debating how to structure my admin pages so far. I prefer to work with list, add, edit, and delete pages to each entity in my database. I’m going to play around one template file and one main admin page vs. one template file and four admin pages. Each list section will be assembled into a main menu to allow each section to be accessible.