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,
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.
Maybe someone has a better solution?