CodeIgniter Forums

Full Version: Kohana (php 5) differences with codeigniter..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

El Forum

[eluser]Unknown[/eluser]
Hi there,

i have started in PHP and found 2 frameworks .. 1 being this and the other being Kohana...

After investigations (remember i am no expert!) .. it seems that codeigniter has some REALLY good documentation and Kohana does not.

It appears that Kohana uses PHP 5 features like new OOP type features etc where codeigniter still uses v4..

I was wondering if anyone can comment on what this means or how it would effect me... I would like to use the latest PHP 5 features... And i am coming from a c# .net background....


I think i probably prefer better documentation over better product... but i would really love some input from anybody

Thanks in advance

El Forum

[eluser]Johan André[/eluser]
Hi and welcome!

Codeigniter runs on both PHP4 and PHP5. The framwork itself is able to run in PHP4 but (if your server is PHP5) you code for PHP5 preferably. I write all my libraries using PHP5-features, usually because it's better at OOP.

Codeigniter has (like you already noticed) awesome docs and one of the best communities I've ever seen.

Furthermore, Codeigniter lacks ORM by default which I believe Kohana has. For me that is not a big drawback.

Kohana is a fork of Codeigniter which is PHP5 only.
There are other framworks for PHP which are worth to mention:

Symphony, http://www.symfony-project.org
CakePHP, http://www.cakephp.org

My choice is ofcourse Codeigniter, since it's easy to deploy in a shared environment and VERY easy to extend and code for. Go with CI and join us here! Smile

El Forum

[eluser]Unknown[/eluser]
Thank you Johan,

So can i clarify, are you saying this if i develop using PHP 5 then codeigniter uses PHP 5 features?

As i said - I am not experienced with PHP - i am c# developer. But i see a few comments from people saying to stay away from frameworks that support v4 of PHP because of the lack of support for true OOP (not the case with PHP 5)..

I must admit i did look at Zend framework but it looked overly complicated. Kohana i already mentioned is poorly lacking docs..

Thank you for the warm welcome...

When does codeigniter plan on abandoning php 4?

Thank you

El Forum

[eluser]skunkbad[/eluser]
Kohana was actually my first framework. I got some experience with it while converting my website to use Kohana, and then I decided that Kohana was making my site slow, and I needed to either revert back to the old site, or use a different framework. Load time for my pages that weren't cached was just not acceptable.

When I came to CodeIgniter, I was very pleased with the forum, and the way the community would respond to my questions. That wasn't something I was getting from the Kohana forum. Also, as you have said, the Kohana docs are lacking, and at least in my experience, the docs were wrong because they were supporting older versions.

If you are not experienced with PHP, I'd say Kohana is definitely not for you. Search their forum for a thread or two on the subject of poor documentation, and you will see that the attitude of their community is that Kohana is for PHP elite / guru types, and that "it shouldn't need documentation because the code has adequate comments". Interestingly enough, Kohana V3 has been out for months, and when I last checked, there was still no documentation. I won't say they don't care, but they obviously don't have anyone dedicated to documentation.

I make websites for money, as a freelancer. I don't do this for fun, so I can't spend time trying to figure out a framework. I use CI because it works, and regarding the OOP of php4 vs. php5, you will be able to use whatever php5 OOP code you want with CI. You can use php4 OOP with CI as well, and you can't say that for Kohana.

El Forum

[eluser]BrianDHall[/eluser]
+1 to what skunkbad states. I too rely on coding for my family income, so I can't afford (literally) spending time looking over core source code of a framework just to extract basic functionality from it.

As the docs improved, I strongly considered it yet again because it supposedly had ORM and possibly some auth features. I got as far as noticing it didn't seem near as good as DMZ, but it might have been ok, and yet again I ran into a thread announcing how something was going to be changed that would break backwards compatibility and generally screw up anyone who used the existing feature...because they wanted to name the function something else. Why they wouldn't just alias it and deprecate the old, I couldn't figure out.

...not to judge too harshly or too quickly, but I don't have time for that kind of stuff. When CI 1.7.2 came out all my existing code worked perfectly, and in DMZ none of my scripts have broken yet due to changes.


To clarify about PHP4 vs PHP5, CI for backwards compatibility is itself designed to work fine in PHP4, but will also work without problem in PHP5. Most add-ons and extensions to CI are only made for PHP5, even.

You can happily create your code entirely in PHP5 and never really be bothered by how CI is backwards compatible. It just works. You can $this-> all you want, or use ::, or ___ magic functions, just as if CI wasn't built to support php4.

El Forum

[eluser]n0xie[/eluser]
To add a few pros:

- CodeIgniter is backed by a commercial company. This means they have a commercial interest to keep their code secure, well tested and constant (i.e. backwards compatibility). Their own product Expression Engine (which is really a nice CMS, I got to play with it during the christmas holiday) runs on it.
- Kohana in particular seems to have the idea that breaking backward compatibility because the new and improved version is much better is a Good Thing™. I dread the day I would update my live servers and suddenly half my functionality is not only gone, but has either disappeared, has been renamed, or has been changed to something entirely different.
- Because EE runs on CI, there is a commercial motive keeping the project going: if all the developers who actively develop Kohana left to go do the next big thing (this has happened before with OS projects with RoR for instance) you are on your own supporting Kohana.
- This is also the reason why CI still supports PHP4. Sure some improvements could be made if it was entirely PHP5, but since CI is really fast (and I do mean REALLY fast) as is, it really wouldn't be THAT much of a difference (I know some people will disagree but this is how I see it).

My experience with the other frameworks is as followed:
- Cake: syntax looks a lot like CI but is about 100 times slower which is just plain stupid. Lots of code available though and a lot of developers swear by it.
- Symfony: very mature framework but a bit overkill for the sort of projects we usually do. Also a very steep learning curve which pays off once you learn to use the Symfony shell-like generate options.
- Zend: So modular that it gets annoying. It's far too 'complex' (as in too many options available which make it complicated, not as in difficult) for any sane person to quickly build something. Yes it is modular so very handy for big projects, but again the types of projects we do, CI is good enough.
- Kohana: CI but very disorganised and very bad documentation. They got a few things right, they got a few things very very wrong. It's up to individual taste I guess to prefer one or the other.

El Forum

[eluser]Aniket[/eluser]
Guys any idea abt YII ? ..seems a promising framework...tried few examples..but felt that it has a steep learning cure as compared to CI.... Smile
So any comments on YII ?

El Forum

[eluser]viisik[/eluser]
[quote author="n0xie" date="1262022021"]To add a few pros:

- Cake: syntax looks a lot like CI but is about 100 times slower which is just plain stupid. Lots of code available though and a lot of developers swear by it.

? where is lots of Cake code available

- Zend: So modular that it gets annoying. It's far too 'complex' (as in too many options available which make it complicated, not as in difficult) for any sane person to quickly build something. Yes it is modular so very handy for big projects, but again the types of projects we do, CI is good enough.

- can you explain what do you possibly mean by Zend being very handy for big projects - what is the criteria of a big project - suitable for Zend

El Forum

[eluser]2think[/eluser]
@madridjohn,
n0xie's reply was spot on! You cannot underestimate the importance of community and backwards compatibility.

We tried many of the PHP frameworks for a very large national charity site and CI was the only one we realized could be our most dependable in terms of community support, documentation and stability.

But if those are non-issues for you, then Kohana is great at adhering to high standards for OO in a framework.

@Aniket,
Yii is great but as stated by n0xie, the documentation and community for CI seem to make it stand apart. If Yii really gets traction, it will be because of their ability to do the same. I like some of the ways they implemented things and others, not too much but overall, quality framework with a good attempt at documentation.

El Forum

[eluser]CI2RULZ[/eluser]
i looked at every framework, kicked the tires, and CI is the best... period. It makes sense, and it does the job all frameworks are suppose to do... SPEED UP DEVELOPMENT. You can slice the pie anyway you want for a good debate, but if the framework you choose doesn't speed your development, then why even use a framework? I mean, there's nothing wrong with PHP w/o a framework. If it's not a functional rapid development tool... BYE. This is the biggest issue facing ZF right now, and why so many people dive into it thinking it's got to be the best since it's from zend... and a 1-7 days later they find it's taking them more time rather then less, probably lost and confused using google to find some answers, and with little help available since the framework is so flexible, no one seems to use it the same way. CI is great... it's documented... it's supported... and it's fast -> I highly recommend it.

Want more reasons... check out my blog post ->
http://www.cmiwebstudio.com/blog/10-reas...iter-rocks
Pages: 1 2