13
Jul

Laravel vs Codeigniter

Laravel vs Codeigntier

 

I just came across with two posts for Laravel Framework with two different opinions
Laravel is awesome and Laravel – a beautiful PHP framework that does not make me feel stupid but with the same conclusion (Laravel is awesome!). As both blog posts where intrested, I would like to have my opinion too with the Laravel framework and Codeigniter.

 

So which is more awesome?

Laravel indeed! I think Phil and Vladstudio gave enough reasons to move to Laravel and I don’t want to say more.
As you already perhaps know I am now actively developing 2 libraries in Codeigniter and all my projects at my portfolio are all made in Codeigntiter Framework. So the question is did I move to a different framework? Well … I already done it long time ago… I am using for my big projects Zend Framework as it has really lot of libraries such as Amazon Services, Advance Memcache, really advanced db active record, e.t.c. However for all the small/medium projects I am still using Codeigniter as I am familiar with the code and I’ve already created extensions for CI . For example I don’t care if Codeigniter doesn’t have a Layout controller I have created mine. I don’t mind if it has not an Authorization library (with full database structure e.t.c.) I have already created mine and so on. However I was looking forward for a brand new framework that has these functionalities in the Core system and not as external libraries. I have to say that I am more “stack” to Codeigntiter framework rather than “like” Codeigniter Framework. I work with Codeigniter for 4 years and I have created my own libraries and my custom CMS is based on Codeigniter so it is difficult for me to move to a different framework if I don’t have a good reason to do it.

So Codeigniter is dead??

To tell you the truth I thought that actually CI will die someday but this will simply never happen. Why?
1. The large community will never let Codeigniter to die! You really cannot realize how many people are using Codeigniter for small but also large projects right now.
2. It is stable enough and tested from many users. This means that even if a new version have something unstable (e.g. 2.0.3) I am sure that the users have already mentioned it and solve it. If you don’t care about changing the core of CI for fixing small bugs that’s fine.
3. It is really well documented. I think is the best documented framework that exists in PHP right now.
4. Very easy to use even if you don’t know about MVC architecture. A really good start especially for Newbies that only used pure PHP to their projects as I was one time before using CI.
5. Really 0 configuration to start working with CI
6. CI 3 is promising more stability and more organized unit tests.

But this are not enough reasons for me anymore! I need more features as things runs so fast and we need more and more. I don’t like to look for external libaries for obvious things . Laravel can support really lot of stuff that in my opinion every modern framework should have. To be more specific some small things that I liked in Laravel:

  • Templates with basic webpages layout with sections… e.t.c. [Please tell me which website DOESN'T have a basic layout?]
  • Exceptions with detailed stack trace. [CI doesn't have it!]
  • Authorization library
  • Object Oriented Libraries with autocomplete. I don’t know when CI will get rid of the $this->library_name->library_function(); and $this->load->library thing. In laravel it is simple “Libraries and Models are very easy to use thanks to the Laravel auto-loader”
  • Widgets with assets (such as JS and CSS). Lavarel has bundles that it is great and with a very good structure.

and really many more reasons but especially I like that it makes me feel.. happy! I don’t want to be more specific about the two frameworks. If you want to read more you can go to Laravel – a beautiful PHP framework that does not make me feel stupid and read why to choose Laravel instead of other frameworks. I agree with the person who wrote it but not for … Zend (come on monster???) I just wanted to mention 2-3 things about Laravel and tell my opinion about Laravel and Codeigniter. The Laravel is still in an experimental stage for me so perhaps I will change my mind in the future. But till now… I LOVE IT.

Table Comparison

Module Laravel Codeigniter
Layout Control Yes No
ORM Yes No
Error Stack Trace Yes No
Class Auto Loading Yes No
–Database mySQL Yes Yes
–Database SQLite Yes Yes
–Database MSSQL Yes Yes
–Database PostgreSQL Yes Yes
–Database Cubrid Yes No
–ODBC drivers Yes No
–Database MariaDB No No
Authentication Library Yes No
External Modules Yes (Bundles) No
Form Validation Rules Yes Yes
Internationalization Yes Yes

For more you can go straight away to laravel.com/

Not convinced yet? Check out what this guy from envato is saying:

So what do you think? I am curious to see what is your opinion about it.

enjoyed this post? share with others:

twitter stumble upon digg

This entry was posted on Friday, July 13th, 2012 at 9:02 am and is filed under Codeigniter, Laravel, PHP. You can follow any responses to this entry through the RSS 2.0 feed.
  • GoFrendi Gunawan

    Somehow I’m agree with you. We feel there are things missed by our beloved framework. We try to write the missing puzzles. But then, come a more powerful framework, and soon we feel despaired…. :(

    I’ve play up with django. It is a good but conservative framework in python. I’ve also play up with fuel-php, but I don’t familiar with the code. I think I will look at laravel to get some inspiration :)

  • http://www.vontikakis.com/ vasilis vontikakis

    Hi  Codeigniter is very good framework to begin, if a project grows  the things are not so good, also like the symfony 1.4 before symfony2 which i had used, and now i definetely go with yii and his modular extension from uniprogy. Laravel sounds interesting and ORM seems good almost lke yii’s RaR, maybe i tested it.

  • web_and_development

     I agree, Codeigniter is a very good framework to BEGIN with. After this you are desperately searching for another framework. Yii seems very interesting I just never really tried it to a project to see the real benefits of it. It is always about the time that you have to learn new things and Laravel didn’t take me a lot to learn it. It is straight forward what it is all about and that’s why I like it till now.  

  • Eric

    I am currently doing all my PHP procedurely. I know I need to learn a framework. Which of the two is best for OOP newbies?

  • web_and_development

    Well actually it depends. Codeigniter for me is the best solution for now to start with. It is really really easy, has lot of documentation, a huge community to help you and it doesn’t require any actual knowledge of OO programming as it is easy understandable. Laravel at the other side has a fast growing community but it requires some basic knowledge of OO programming, that if you don’t have it you have to search the whole web to understand what’s happening.
    If you want a suggestion, start with Codeigniter, learn how to use it and add then check NO-CMS ( http://www.getnocms.com/ )  as a good start for your project with HMVC and grocery CRUD included rather that starting from scratch.
    I started Codeigniter when I didn’t even know what MVC was so I can tell you that it is really easy to understand how it works.

  • http://twitter.com/wtfnasa Jacob Mulligan

    Why is CI good to begin with but not great for growth? I’m relitively new with php development and have been using CI for a couple months and have found it to scale just fine. 

  • web_and_development

    The CI is and will be for me the easiest and fastest way to create a website. However there are so many important features that you will need in the future that just CI can not handle. For example it doesn’t follow some important OO techniques such as static Classes. Moreover there are so many libraries in different places on the web it is just tiring to search all the time for something good (google,forums,sparks …e.t.c.) I realized it after 3 years of using it, so for now I think you will be just fine. If it scales your requirements it is ok.

    In addition don’t forget that Laravel is new borned and we still need time to trust it for our really important projects.

  • http://www.facebook.com/parakrama.maralanda Parakrama Senanayaka

    according to comparison laravel is really amazing more than codeigniter i hope it to try out and i ll reply

  • LeaFZy

    I am a junior programming and never thought about using this laravel framework but when I read the documentation about this framework  I did change my mind. Lot of people said that laravel is the best and easy to learn without any hassle And my friends did changed too, from hassle codeigniter to fresh and young laravel.  Thanks to laravel author. He makes our P life easy.

  • marviorocha

    Nice, I have used CI 3 or 4 years I have test other FW how to Cake, Yii … Any time have a test laravel more don’t liked because documentation!

    You can look a new light framework is Mako http://makoframework.com/ Is realy! More CI is best.

  • Sheperson

    One thing I really like about Laravel is the ORM.
    It doesn’t hurt you, as CI does!!!

  • Maxime Pacary

    Well, Laravel supports internationalization : 
    http://www.laravel.com/docs/localization

  • web_and_development

     Oups you’re right. One more reason then to choose laravel :-)

  • http://3dwebtech.gr/ κατασκευη ιστοσελιδας

    κατασκευή ιστοσελιδας
    http://3dwebtech.gr

  • http://www.facebook.com/gottier Brian Gottier

    In the last few months it seems that people are really bashing CodeIgniter. Yes, it’s not using the latest PHP 5.3+ bells and whistles, but it’s a super reliable framework, and not every customer’s hosting account is running PHP 5.3+.

    After much work on Community Auth http://community-auth.com , I’m not about to jump ship, but I do have my eye on other frameworks. I do want to build a website using Laravel soon, but I have already found things about Laravel that I don’t like. I guess every framework will have something that doesn’t please somebody.

    I was recently trying Symfony2, which I hate. Kohana is OK, but the community seems a bunch of elite PHP users that would prefer not to be bothered. Fuel annoys me in ways that made me not go past the beginning steps or checking it out. I’ve tried Zend, and looked at about every framework there is. In the end, I always go back to my CodeIgniter. I think it’s here to stay.

  • http://www.facebook.com/gottier Brian Gottier

     So does CodeIgniter. Did you read and look at the comparison table?

  • http://abbotfrost.webnode.com/ Adrian Duke

    Laravel is awesome and Laravel – a awesome PHP structure that does not create me experience outrageous but with the same summary ( As both websites where intrested, I would like to have my viewpoint too with the Laravel structure and Codeigniter.

  • http://abbotfrost.webnode.com/ Adrian Duke

    Laravel is awesome and Laravel – a awesome PHP structure that does not create me experience outrageous but with the same summary  As both websites where intrested, I would like to have my viewpoint too with the Laravel structure and Codeigniter.

  • http://fml.crynobone.com Mior Muhammad Zaki

    Does Laravel support ODBC driver and Cubrid?

  • http://www.facebook.com/people/Julious-Loa/515758071 Julious Loa

    Yeah, laravel, fuelphp, yii – orm, layouts, crud etc… Yeah these things save you time, but there’s one big BUT ci always bits every framework in any test (requests per second, time per request etc).
    Its like a bare hammer. And when u get the proejct done by hand, spend more time using ci u will benifit in performance. That’s why i still use ci for a variety of projects. Others nom-nom too much :)

  • http://www.facebook.com/people/Julious-Loa/515758071 Julious Loa

    Btw

    ORM >> yes – there’s a solution for ci;
    Class Auto Loading >> yes – cmon one function __auto() makes the magic
    Authentication Library >> yes – there’re solution for ci.

    Its just that ci doesnt have them out-of-the-box. But that is solvable.

  • Stunt

    I can’t find the REASON to switch from CI to Laravel in all this items you listed here !!! this is feature compare . I never find a REASON ! because CI is working fast without problem sometimes need external packages ..

    I believe Laravel is very well but I can’t find the REASON for switch ..

  • ranacseruet

    Hmm, nice saying. I haven’t tried laravel yet, but will like to checkout soon. I have been using codeigniter for years and still quite happy, never thought to leave it.

  • http://fearlessflyer.com Michael Soriano

    so much hype about Laravel. I like CI and Zend FW. But will soon try out Laravel. Just waiting for a new project.

  • thefuzzy0ne

    Your comparison table is a bit pointless. You’re comparing 2 frameworks by the features supported by the core.

    Layout Control: Yes – Phil Sturgeon’s Template library, as well as others.

    ORM: Yes! There are lots of ORM libraries around. You can even use Doctrine!

    Error Stack Trace: No – I agree, we’re lacking here.

    Class Auto Loading: Yes – It’s not supported by the core (yet), but it’s rediculously easy to implement on a per-project basis.

    Database Cubrid: Yes. But Laravel doesn’t seem to support this…

    ODBC drivers: Yes. But Laravel doesn’t seem to support this…

    Database MariaDB: No – Agreed. But you can’t possibly support EVERY DBMS, so we support the most commonly used ones. Laravel doesn’t support this DBMS either…

    Authentication Library: Yes – There are many authentication libraries available.

    External Modules: Yes – We have a “third_party” directory to allow installation of vendor specific code, and we have a package installer (Sparks).

    One of the main concepts behind CodeIgniter is that it’s lightweight, fast and stable, and if you need more functionality, you can add it yourself, or use a spark/library written by someone else.

    I agree, Laravel is nicely done, and in some places better than CodeIgniter, but it’s also not as good in some places.

    CodeIgniter is slow to grow, definitely, but one of the goals was to remain as backwards compatible as possible, so people can upgrade easily without it breaking their existing apps. The community is currently working on CodeIgniter 3. We have already seen a lot of improvements, and there are many more to come.

    So, to answer your question “which is more awesome?”, there’s no real answer. You use the framework that best suits the situation you need it for. CodeIgniter gives you a lot of choice and doesn’t make too many assumptions about how you want to do things. So long as CodeIgniter remains backwards compatible, there will always be new PHP features that it doesn’t support. The only way to get around this, would be to rewrite it from the ground up, which goes against the whole “backwards compatibility” ideal.

  • http://www.CyberPP.com/ Lok Sarath

    I started with Laravel before CI. I honestly say yes, Laravel is much awesome, but my company required me to use CodeIgniter.

  • johnroyzreit

    Thanks for the post! I think Laravel is awesome PHP framework. I like it and I want to use it in my projects.

  • SixteenStudio

    This “backwards compatibility” deal this framework sticks to is simply detrimental to the progression of standard web practises.

    All “backwards compatibility” means for us is that a select group of programmers (CodeIgniter programmers who have not dabbled in PHP 5 features elsewhere, for instance) will be stuck in the past and not enjoying the new & improved features our beloved programming language has to offer.

    Now I’m not going to jump in and say which is better, as that is completely subjective and my own opinion, but in the best interests of a professional developer who wants to continuously progress throughout their career, I myself (and I suggest this to many others) should stick/move to a framework like Laravel that supports the future development of PHP, rather than a framework that is hanging onto somewhat deprecated coding standards.

    Anyone who says otherwise is probably not interested/motivated enough to move to a better framework or is just being plain ignorant.

    On CodeIgniter vs. Laravel – It’s my opinion that Laravel definitely has the upper hand as out-of-the-box it is a fantastic solution that offers many in-built features that are simplistic and very well optimized, and it is also implements a lot of very useful features that you might see if you have used other programming languages (e.g. Active Record Migrations from Ruby)

    CodeIgniter on the other hand is still a very adept framework and although it is most certainly out-dated, I won’t fault it for that because it is a framework with a thriving community, a large code-base and is the chosen framework for so many small to large scale sites. I have used it for a few myself and it does what it says on the tin at the end of the day, and as thefuzzy0ne says, comparing 2 frameworks by their core features is an unfair judgement as there are many extensions for CodeIgniter that can make it a just-as-useful framework as Laravel.

    I myself have extended on CodeIgniter for my client’s projects as I don’t like the core functionality too much but I have built upon that to make something that I am very happy with and is more than competent for any type of project!

  • Allan

    I have been using CI and I have always tried jumping ships to laravel, however my confidence level with laravel is very shaky and I still find myself trapped in CI, i guess CI is so flexible that makes me find it still relevant in my projects

  • SPeed_FANat1c

    How CI does not have autoload classes? It has.

    http://ellislab.com/codeigniter/user-guide/general/autoloader.html

    Or I dont understand something.

  • web_and_development

    At the webpage that you’ve send it says CodeIgniter comes with an “Auto-load” feature… As you can see they say “Auto-load” instead of auto-load (without the quotation marks ) . So this means that they have something like auto-load. If you want a real auto-load for Codeigniter you can check: http://net.tutsplus.com/tutorials/php/6-codeigniter-hacks-for-the-masters/ ;-)

  • Carlos

    The best stuff that laravel has and ci lacks is:
    · Migrations: Once you used them, you will need them forever
    · Eloquent ORM: Pretty awesome. And if you add some packages like Ardent it gets even better
    · Packages: You can easilly add packages with composer and there are tons out there.
    · The routes works better than in CI and you can use a route only for get, post, put, delete… and create a web service really easy and fast
    · The code is beautifull and you don’t have to type so much
    · The blade templating system. awesome.
    · PHPUnit ready
    · Models are 100% better than in CI 2 lines of code and you are ready to query your table
    · Etc, etc etc…

    Just try it!

  • Rob

    CodeIgniter is dying and just can’t keep up with the pace of Laravel. There is just so much more that comes out of the box with Laravel. http://www.websanova.com/blog/laravel/10-reasons-why-laravel-is-better-than-codeigniter

  • uchsarath

    Laravel is LEAN for Web Startup. It works like a charm as Ruby on Rails.
    http://www.inoover.com

  • Mark Kevin Besinga

    thats not going to happen. CI 3.0 is coming ^_^