Php Framework CRUD model

November 27, 2006

Its time for framework, something which offers ready code for most common things we do for every new project. There are numbers of php frameworks available online which allows rapid application development. Also most of the frameworks varies from their config style. Learning curve is again involved in learning these new framework. In many cases I found its quite difficult to customize the frameworks. Every framework has their own style of code which you might not be familiar with.

Then what to do, I thought how about writing my own framework. Some points which basic CRUD model should have are :

-Ready Classes structure
-Code formatting
-Form generation
-Easy to understand by any other developer
-Should allow generation of Create, Read, Update and Delete in short CRUD

I have started thinking on the same line. I gone through old codes and started observing the common structure.
-in most of my projects I found all the classe has common structure
-common methods in each class eg. getByID, getAll, addUpdate
-inclusion of file is of same pattern
-most of the php code were common.

After identifying all these points, I started buidling my own framework. You believe me or not, my very basic framework was ready in just 2 hours.

I enjoyed building my own framework.

I will share my experience of building it next time.