Kohana vs CodeIgniter, year 2011?

I'll start with a quick nit-pick then move on to the real answer. That is: PHP5 has always been supported by CodeIgniter. The PHP 4 vr 5 comparison is down to the fact that CodeIgniter was built back in 2006 in full PHP 4 style A brief history, Kohana 1 and 2 were essentially forks of Codeigniter that included changes and improvements that EllisLab were not willing to include.

This ranged from bug fixes, feature tweaks and new libraries up to some big changes to make it use a more PHP 5 syntax than the reliance on $this->foo that CodeIgniter has always had. 1 and 2 were following in the CodeIgniter philosphies, but Kohana v3 was a total rewrite that changed a lot of this logic CodeIgniter stayed the same for a long time as 1) EllisLab were the only guys doing and development work on it and 2) they were struggling to get ExpressionEngine stable for the 2.0 launch. If I was working on getting some software stable, re-writing the entire framework would be the last thing I'd want to do, and I'm sure EllisLab felt the same These days CodeIgniter is open to the community via the addition of 4 "CodeIgniter Reactor Engineers", of which I am one.

We're working on taking out bugs, removing the need for all sorts of hacks that have been common knowledge for so long and generally making improvements At the same time, compatibility is massively important. Kohana has always been more of a "we're doing this because it is the best thing for the framework" which sadly would often leave developers needing to recode a lot of their applications if they wanted to upgrade. This is fine, and to be fair is often a good thing in the long run as it keeps the framework moving forward, but for us over on the CodeIgniter team we preffer to keep your applications compatible long term It's this reason that not has much has changed.

We haven't thrown in namespaces just for the hell of it or recoded everything to be static and we still support PHP as low as 5.1. X, even though PHP 5.2. X is now officially unsupported by Zend/PHP themselves. I don't know many developers still working with 5.1. X locally but it's always good to know that some of your older applications are still going to work with the next upgrade. That said you should probably move your arse and upgrade.

;-) Kohana is great and does a lot of things very well. Their documentation is drastically improved over the last few months and cannot be used as an argument against using the framework as it has been in the past, but for me it is not as simple or logical as it could be CodeIgniter is probably the best framework for learning how to use MVC in your projects. You know it'll be stable for a LONG time and you know that pretty much any server will be able to host it Or, have a look at FuelPHP which is essentially CodeIgniter written for a PHP 5.3 world by some of the long-standing CodeIgniter community (including myself) and follows all the same ideas of simplicity, low barrier to enty, etc Take a look over all 3 and use whichever makes sense to you.

Long-term compatibility, PHP 5.3 support, etc may all be deciding factors on which you use, but on their own merits all the frameworks are excellent.

I'll start with a quick nit-pick then move on to the real answer. That is: PHP5 has always been supported by CodeIgniter. The PHP 4 vr 5 comparison is down to the fact that CodeIgniter was built back in 2006 in full PHP 4 style.

A brief history, Kohana 1 and 2 were essentially forks of Codeigniter that included changes and improvements that EllisLab were not willing to include. This ranged from bug fixes, feature tweaks and new libraries up to some big changes to make it use a more PHP 5 syntax than the reliance on $this->foo that CodeIgniter has always had. 1 and 2 were following in the CodeIgniter philosphies, but Kohana v3 was a total rewrite that changed a lot of this logic.

CodeIgniter stayed the same for a long time as 1) EllisLab were the only guys doing and development work on it and 2) they were struggling to get ExpressionEngine stable for the 2.0 launch. If I was working on getting some software stable, re-writing the entire framework would be the last thing I'd want to do, and I'm sure EllisLab felt the same. These days CodeIgniter is open to the community via the addition of 4 "CodeIgniter Reactor Engineers", of which I am one.

We're working on taking out bugs, removing the need for all sorts of hacks that have been common knowledge for so long and generally making improvements. At the same time, compatibility is massively important. Kohana has always been more of a "we're doing this because it is the best thing for the framework" which sadly would often leave developers needing to recode a lot of their applications if they wanted to upgrade.

This is fine, and to be fair is often a good thing in the long run as it keeps the framework moving forward, but for us over on the CodeIgniter team we preffer to keep your applications compatible long term. It's this reason that not has much has changed. We haven't thrown in namespaces just for the hell of it or recoded everything to be static and we still support PHP as low as 5.1.X, even though PHP 5.2. X is now officially unsupported by Zend/PHP themselves.

I don't know many developers still working with 5.1.X locally but it's always good to know that some of your older applications are still going to work with the next upgrade. That said you should probably move your arse and upgrade. ;-) Kohana is great and does a lot of things very well.

Their documentation is drastically improved over the last few months and cannot be used as an argument against using the framework as it has been in the past, but for me it is not as simple or logical as it could be. CodeIgniter is probably the best framework for learning how to use MVC in your projects. You know it'll be stable for a LONG time and you know that pretty much any server will be able to host it.

Or, have a look at FuelPHP which is essentially CodeIgniter written for a PHP 5.3 world by some of the long-standing CodeIgniter community (including myself) and follows all the same ideas of simplicity, low barrier to enty, etc. Take a look over all 3 and use whichever makes sense to you. Long-term compatibility, PHP 5.3 support, etc may all be deciding factors on which you use, but on their own merits all the frameworks are excellent.

8 This answer makes me vomit. So many untrue and half-true statements here. CodeIgniter still is not an "open" project, even if you have 4 "community" devs. Putting public in front of every method in the framework is not "supporting PHP 5".

Supporting PHP 5.1 is bad, not good, as it is so buggy and slow that even Zend recommends PHP 4 over PHP 5.1. As for CI being "the best framework for leaning how to use MVC", that is highly subjective. You should know better than to make such statements. – shadowhand Apr 8 at 15:09 12 Your reply is way off base.

For starters, define open. CodeIgniter is on BitBucket and GitHub and we're actively accepting pull requests.In what way is that not open source? Secondly, the Core team are the ones who made did a lot of find-replace on visibility scopes, not us.

PHP5 support means "it works with PHP5", at no point did I say "Yeah its a fully PHP5 framework!". There are plans to move a lot of the core from proceedural functions and leaf classes to use a lot more static classes. This will cut down a lot of the GLOBAL dependencies and start moving us towards a more PHP 5 base.

– Phil Sturgeon Apr 8 at 15:40 9 As for it being the easiest to learn, sure it is. There is more "getting started" documentation (screencasts, tutorials, nettut articles, etc) than Kohana has. I'm not sure why you've taken such exception to this answer as nothing here is wrong or incorrectly stated as fact.

I've been talking to some of the Kohana dev's plenty as of late and we get on just fine. There's no need for that sort of attitude. – Phil Sturgeon Apr 8 at 15:43 4 LOL, Don't talk about compatibility when you renamed the core classes Controller and Model to CI_Controller and CI_Model, effectively breaking entire apps unless someone went through changing all the names manually or remained stuck with 1.7.– Click Upvote Apr 17 at 12:22 2 Click Upvote: This was the closest that 2.0 got to an incompatible version, but bearing in mind that 1.7. X to 2.0 is a major jump (not a minor) some incompatibilities are epxected.

Still, a find and replace change is different to a total logic change where re-coding is required. – Phil Sturgeon Apr 17 at 17:49.

Now Kohana 3 and CodeIgniter have almost nothing in common, so comparing these ones is not the same as it was back in 2008. I've been using CodeIgniter in 2007/2008 and it was a very good framework at that time, because the hosters didn't support php5 so actively, it had a great documentation and a large community forum. Surely there were some things that just had to be to support PHP4.

Also CodeIgniter had a lot of restrictions that didn't let new developers to shoot their leg. But for a seasoned developer these restrictions just made the work more complicated. As my experience grew I've switch to Kohana in May 2008 and it's still the framework of my choice.

I'm not very close to CodeIgniter right now, so I will tell you the strong sides of Kohana. Kohana is like a Swiss-Army Chainsaw for PHP. You can do almost anything because it is very easily extended, though the default out-of-the-box toolkit is what you need for most of the tasks.

Kohana routing system is a powerful tool, you can do any routes you want. See Routing Basics for basic routing examples. Also Kohana has the ability for reverse routing, so your presentation logic (controllers) do not depend on the urls.

Kohana has several Object Relation Mapping libraries that were developed specifically for it. Personally I'm using Jelly, but there are a lot of others. Any PHP ORM is integrated easily in Kohana When talking on integration, you may integrate almost any php toolkit for Kohana for any of your needs.

You may integrate the whole Zend Framework to be used alongside Kohana! Kohana's development is primarily on GitHub, so you can easily find any pre-packed kohana modules for your needs. So, in conclusion, I would recommend CodeIgniter to the ones that are new to MVC, to get the basics.

But the more you learn the more you understand what you need for your purposes.

I have not tried Kohana but have recently been working with CodeIgniter. I originally liked it but slowly grew to dislike certain aspects. Test Driven Development isn't feasible out of the box and I had issues using the Active Record library with Postgres stricter ways than MySQL.

There was a lot more that I liked about it and don't regret trying it out. Plus the issues I faced won't be an issue if you don't have to use full TDD and have a MySQL backend. With a lot "what framework?" questions they are asking an emotional question rather than a technical one and the best answer is download them, try out the examples and go from there.

CodeIgniter certainly isn't a bad framework and chances are you could go for something much worse (I guess the same is true for Kohana).

It really depends on what you want to create, and who's going to do it. I'd use CodeIgniter for any projects that I need others to maintain or code for. CI is much easier to follow and see what's going on.

There are a lot of developers out there that can code CI projects (not all of them are good though). Kohana is really powerful though. It's not always straightforward to see what's going on, and the docs aren't great.

I've learned the most by going backwards through classes to see what each extends does. I also recommend these tutorials. I like it a lot, but can't recommend it to people who aren't pretty good developers strong in PHP5.

Considering the subjective nature of the question, here is my subjective experience. A little over a year ago, after getting a new PHP gig, I started learning CI. I wanted a bit more structure in the PHP code that I would produce for this job.

During my first month of home experimentation, I was reading about something I don't even remember anymore on a forum, and the word Kohana caught my attention. Mostly because it's also a Ukrainian word that means beloved. So I proceeded to checking it out, I mean how could someone not give a beloved framework it's worthwhile attention.

After reading about it a bit I started liking some of the features it had to offer more and more. It also somehow seemed more intuitive than CI coming from an ASP. NET background, don't ask me how, it just did.

Thus before I had vested too much time into CI I decided to jump ship and give Kohana a shot. I'm not going to lie, it's been a bit of a struggle. Tutorials were lacking and being an OOP noob complicated things even more.

Thus my personal advice is that unless you have some MVC or OOP experience I would advise not jumping head first into Kohana on a new project, especially one with a tight deadline. Get comfortable with it first on a hobby project, or a project with a rather long deadline. Despite the feeling as if I'm trying to claw up a wall from time to time, I sincerely think it's been a worthwhile experience.

Also IRC and StackOverflow go a long way to mitigate that feeling. I would especially like to thank all the IRC folks, esp Isaiah, that took the time to answer what must have been rather silly noob questions from time to time. The experience I believe has not only made me a better programmer, it's opened up my eyes to new ways of doing things.

Heck I didn't even know what routing was or why it could be useful. It's also made me far more comfortable with writing and extending classes, though I still don't claim to be too knowledgeable in OOP. Thus my comparison may be somewhat biased as I only had a few weeks of CI experimentation before I jumped ship to Kohana, but my main point is that I haven't had a reason to jump back.

I've also managed to convince others in the workplace to start using Kohana... :) as there was no framework utilized beforehand... Note: I've only used Ko3.

Kohana is simple and similar enough that it makes sense. Just reading through Kohana's code has proven to me to be ample substitute for its lack of comprehensive documentation, which is improving. They are both beautiful frameworks, but it boils down to whether you prefer community vs stability and how big the php version issue is for you.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions