PHP : phrame: A Simple PHP Application Framework

Creative Commons License
This work is licensed under a Creative Commons License. Commercial license available upon request.
Copyright © 2001-2005 Eric Pollmann.

This is a very simple, template-based PHP application framework that I spent entirely too much of my free time developing. None of the other frameworks I encountered fit my needs precisely, so I rolled Yet Another. I've been using DeZign by Datanamic lately in conjunction with phrame to develop a few simple apps (~10 inter-related tables). Phrame has a *long* way to go to become a usable framework for even moderately complex applications, but it might be just what you need!

The precepts guiding the design of this framework were:

  1. Keep It Super Simple (KISS): I started out using Smarty + ADODB, then realized that not only was there significant code bloat with that route, but also, it was taking me longer to develop apps than if I coded them by hand. phrame's entire templating + security + mysql base library is only 600 lines of code, including lots of comments and a backwards-compatability layer for ADODB.
  2. Object Oriented: After several approaches were tried then scrapped, I decided to go with an object oriented architecture that uses the ideas behind Aspect Oriented programming without requiring a brain meltdown or language extensions. I started out with each page being a method, then realized I wanted Aspects. In this iteration, each page / application in Phrame is implemented as a class that inherits common behaviour. If you think of each page / application as a 'method', this common behavior is a collection of 'aspects' that all such pages / apps share. For more, look at the auth_page class, and how it is abused by the table_editor class.
  3. Customizable / Extensible: Want to plug in your own authentication methods? Simply over-ride one function. Want to completely change the look and feel? Update the css or templates, no need to touch the application logic. Want to add your own application but inherit the security or process flow from the table_editor sample application? Just subclass it.

Instructions for use:

See a live demo.

Download phrame