I have intention to complete my draft of a CRUD PHP-class. Don’t know what is it? Easy!

Imagine you have a site where users point some places at Google Maps framed at your page. As developer of this site you will have to create several admin pages:

a page to manage users: e.g. grant permissions to your friend or deactivate a gonzo user

another page to tune options of the map points: fix a typo or edit coordinates of points

Just two pages, but I bet you’d need at least 3-5 hours to make a small draft form to manage these entities. To make things worse, let me remind you of paging, client and server sides validation, date-picker dialogs or even data integrity checks.

So, to cut the long story short, CRUD class generates all this for you in a couple of lines of code. So you just define what database table you’d like to manage – drum-roll! – you get a ready-made interface! (I call it a Table Manager Class – it helps you to manage any table in your system)

By the way, CRUD stands for Create, Read, Update and Delete. So CRUD class allows to play with data you have.

As Petrovich said (a laboratory assistant in my university), “first check what others have done”.

While the former is rather crude (it doesn’t work in some conditions, settings are embedded in PHP code), Symfony’s generator is quite nice: settings are separated from logic in a Yaml file and the code is being regenerated for you every time you make a change.The drawback of the latter is that you have to deal with huge Symfony framework to have this feature.

So my idea is to prepare a stand-alone PHP class to make generation of admin inteface easier. I’m going to use an Ext.js JavaScript framework to beautify the interface.

6 Responses to “CRUD Class”

Sounds great, we’ve used Symfony before and found while it is an amazing platform the framework is too big for most small projects. Something simpler like you are developing sounds much more appealing.
Can’t wait to see what you come up with.