Stay away from CodeIgniter!

Posted: January 21, 2014 in Miscellaneous

Last few weeks I have worked on some project that was written in CodeIgniter. CodeIgniter is very popular PHP framework praised by all, and it is little less popular then Yii, but since I am few years now in Symfony both 1 and 2, this was the opportunity to check out and to learn something new.

I have expected a challenge, but after 10 days, thats it, I learned and used everything that CI has to offer. CI is so ridiculously lame excuse for framework that I do not know why is it called a framework at all?

And here is why – it is better to state what CI does have and support rather than what CI does not support or have but it should.

CI does not have any, like, any class loader at all! Not even like Symfony1 with array of paths to files with classes, not to mention PSR standard implemented like Symfony2. Simple – just forget about any class loader at all and use requirerequire_once, include… etc…

No dependency injection at all! CI has something that loads “libraries”, “views”, “helpers” and whatever. Especially if you load a library -> the reference to loaded library is attached to controller, that is, to CI instance. Every library is singleton, as well as CI instance. Like, this is lame attempt of Dependency Injection, which Symfony1 and Symfony2 has where you can have total control of delivery of services classes.

No modularity! CI is not modular framework, so you can expect a mess with large scale projects. I have used and wrote some Sparks, it is cool, but for CI. In comparison with Symfony, it is pure crap.

Routing is so primitive that is too rude to write about it. Of course, you can provide your own routing class, but hey! I do not want to write core functionality of framework, I want to write the application.

No Object Relationship Mapper (ORM) nor Object Document Mapper! If someone tells me that CI has Active Records, for God sake, I will punch him in the face! Doctrine1 was wrong because it had $object->save() and it was totally rewritten in Doctrine2 -> everything now complies with solid IT theory and everything is done via Entity Manager. I would be like satisfied if CI have something like Symfony1, but instead, you have a lame excuse for “working with objects and databases”. You, practically, have to write down all routines by your self. That means ALL queries.

Validation??? FORMS??? WTF??? Common validation tasks in general CAN NOT be solved with CI! Validation is so poorly, and forms… God damn! Nothing, it has nothing at all! Like, the hardest task is to validate a fucking date! How you can deliver a framework that does not have a date, date time form widget and validation for it???!!!? How is that not part of the framework – it is a fucking common task for every app?!?!

In conclusion: “CodeIgniter is fast, it has a small footprint” which is stated on their website. Yes, it is, it does not have nothing, therefore, there is nothing to load and execute. “You want to spend less time in front of computer” <- wtf? I spent hours and hours to write down some stuffs that I needed, and, of course, a lot of libraries from Symfony1 was included in project just to handle simple tasks.

Stay away from CodeIgniter! It is evil framework!

  1. Alexander Roussakov says:

    Yeahh man, i agree with you 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s