A PHP Scaffold Class

If you’re a fan of Ruby on Rails’ scaffolding feature, you’ll be surprised that the same thing can be achieved in PHP. In their 15 minute weblog instuctional movie, this feature is used and shows how development time is greatly reduced by dynamic generation of a pseudo–CMS for managing your applications database tables.

Now here’s a PHP class that enables us to do the same, where we can list, add, edit, and delete table rows for all our database tables. Of course we can do it with PHPMyAdmin, but here’s another option for rapid prototyping in our web applications.

Now if only someone would extend this to accommodate foreign keys and other table–to–table restrictions. For now, here’s our little PHP Scaffolding class.

2 Comments

  1. hi there thanks for the resources. just in case your readers want to have something automatically create a scaffold structure for a table I created a small php package that does that.

    Runs through the tables and creates basic scaffold for each table

    http://sourceforge.net/projects/scaffold4php

    hope yo guys like.
    Armando Padilla

  2. Armando, thanks for sharing the link. I’m sure other PHP developers will find it very useful.

Comments are closed.

© 2016 builder2

Theme by Anders NorenUp ↑

Follow

Get every new post delivered to your Inbox

Join other followers: