Grocery CRUD – A Life saver!

I was developing a back-office application for an manufacturing company. It started off as a small project, which is why I didn’t used any framework. But changes after changes, it turned into this huge monster, which has plain-old PHP codes which is not easy to maintain. So we planned to use a framework to reduce the development overhead we have. Picked CodeIgniter due to it’s very less learning curve and it turned out to be good. But what comes next, was not planned. When we started analyzing our old code base, all we had was CRUD!!! 80% CRUD pages, 20% Other functions. I was shocked because I know, it is painful to do CRUD and we have over 40+ tables! All I knew was, I was f’ed.

But still things has to move on, so slowly started migrating from plain old PHP to CodeIgniter, although CI is exceptionally well, doing CRUD in any language is painful. It was repetetive, boring and monotonous. After 2 months of work(and I still didn’t figure out scaffolding at that time, because it was a freelancing project), we hardly crossed 30% of project, and we planned to do whole migration in 4 months. It was far cry. I knew that even if I push myself to extreme, I couldn’t finish it. I was browsing myself, thinking if there is an scaffolding tool for CI, it will be great.(I know Yii is an option, but again, that has high learning curve and a new framework. So searching for a plugin is good option)
And then got a lot, but groceryCRUD caught my attention due to its sheer ease of use, and almost no-learning-curve.

After minutes of excitement, decided to give it a try. Started with couple of tables and bam! It was done. What I did in 2 days, G-CRUD did it in few minutes! I decided to go with G-CRUD and whatever 30% of CRUD work I did in 2 months, it did within in a couple of days(Design wasn’t our 1st priority). Yes, for simple Back-Office / Admin application, this is a perfect fit. You get the power of CI on one hand, and scaffolding ability on other hand with G-CRUD(Well, not exactly Scaffolding, but you know!). If it wasn’t for G-CRUD,I will still be doing the project with hours and hours of frustration and anger.

I love Grocery CRUD, for it’s simplicity it brings! Ease of use, how it manages relationship between tables and UI, is simply awesome. “Yii” is awesome but it wasn’t easy to setup and start working with, unlike CodeIgniter and going for a new framework is again big PITA. G-CRUD saved my day and I intend to use it for all small-medium BO/Admin projects! G-CRUD make scaffolding nice and easy.

And for all people out there who are looking for simple PHP CRUD Gen, there is nothing much simpler than this, at least that I know of!

Why Codeigniter?

If you want to learn new PHP framework and when you search for PHP frameworks, you will get confused easily. There are tons of FW’s out there, which looks similar and easy-to-use. But the fact is, it’s not all about easy to use, it’s about easy to handle, getting good support, and good understanding is what we need.

I learned PHP, just to create small web apps back in 2008. But after getting new job as Web Developer and started learning Spring, Hibernate, Play etc, I almost lost my touch in PHP. But recently, I had a specific requirement, that client only want it in PHP.

Years ago, I developed small sites,web apps which doesn’t contain more than 5 php pages, so I never got an issue with that. But the current project is huge, and if I start it w/o a framework I know it will be a chaos. So decided to learn one. When I google it, I come up with lot of options, from traditional CakePHP to light-weight Slim FW. Then I read, and read and implement samples and come to an conclusion.

When you are starting up things are easy, but to get going on, it’s very difficult. I liked Slim Framework much, but it is not an mature project yet and I don’t want to risk with it. Tried CakePHP, Yii, etc but finally settled with CodeIgniter because of it’s ease of config. Setup the CI project within 10 mins and wrote my first method, which I didn’t do with any other frameworks. I want to mention few points mentioned in CI, which suits me.

  • You want a framework with a small footprint. – Yes
  • You need exceptional performance. – Of course
  • You need clear, thorough documentation.- Indeed
  • You prefer nearly zero configuration. – Yes, I would love to
  • You don’t want to adhere to restrictive coding rules. – Good one!
  • You don’t want to learn another template language. – Exactly
  • You prefer simple solutions to complexity. – Yes
  • You want to spend more time away from the computer. – Of course

After checking these points out, I convince myself to go with CI. So I started with login page and navigate to dashboard, and to be frank, the templating that comes with CI is awesome and one can easily create new template, which of course saves you a hell lot of time.

Finally, the documentation is very clear and straight forward, one cannot feel like they missed out something. The community is very active, so you expect to solve problems as soon as possible, which I would prefer any day. If someone want to learn a PHP FW and want it to be easy, no config kinda thing, CI is the one for you. Although Cake PHP is another option, but CI looks good, and it leaves me no doubt in it’s capability. Be it’s Controller approach or template approach, it is much clear and precise.

UPDATE : For quite some time, CI went inactive mode. But now it has been took over by BCIT and from then, it become very active. They even released 2.2.1 already and v3.0 is already having RC2 version. Good to see CI picks up the race and I always worried someday it will die. But thanks BCIT for taking this forward.