A Follow-Up on Kohana 3 & CodeIgniter 2 – The Flip Side

The other day I wrote about my experiences/opinions with Kohana 3 and CodeIgniter 2. I’ve received feedback from both sides of the debate, and want to share some follow up thoughts and some of (IMO) CI2’s downsides.

Shadowhand commented:

…This is typical of pretty much all programming tools. For example, look at Python right now… they have been on the 2.x series for a long time and 3.x is not backward compatible.

I will be the first to admit that Kohana has had development instability in the past, but 3.x is rock solid and has a real release process in place. Please help us by judging 3.x separately from other versions.

I should say that my basis for opinion on the “instability” of Kohana has been based on its rewrite between versions 2 and 3, and the rapidity in which those major versions came out. IIRC, the 2.3 series (when I first started dabbling with it) was released in the early-mid 2008, and the 3.0.x series started to become available in mid-late 2009. If I had written an app for release with 2.3 in late 2008 and then been faced with a rewrite a year later that would’ve cost quite a bit just in man hours just to learn the framework (again) and figure out a semi-painless way to migrate my existing code to work with a new code base. Not to mention rewriting docs for my users, and so on.

To be completely fair, CodeIgniter 2 has a lot of its own shortcomings. I previously mentioned the procedural helpers, and the fair bit of hacking required (for me) to get it working the way I want (usually involving modules and autoloading, which yes, are a core part of Kohana). Another thing that irks me with CI is how the config items are lumped into one huge array which can make it very difficult at times to ascertain which config file I got a variable from, not to mention the possibility of item name collisions. Usually to get around this I would simply prefix my custom config files with file_configitemname, but that’s not entirely helpful for the core config files.

And please, PLEASE don’t get me started on using “eval()” in the database class. I know it’s a bit of a workaround…and a lot of times I use my own class or Doctrine, but even so..

Stewart commented

…I do have a problem with how they went about it (they should of made it clear KO2 had no future, rather than stringing people on and a new version number doesn’t really make it clear it is really a new framework.

This sums up my feelings pretty well. From what I’ve been able to ascertain (looking through commits on github and such), the API has remained fundamentally the same in the latest series.

And perhaps, for me, that was it. I just want to know there is fundamental stability within the framework itself, without the worry that my code will have to be completely reworked every 12-16 months.

FWIW I do find developing with Kohana quite easy and fun, and if the recent fundamental stability holds out I may be singing a different tune.

I should also take a moment to thank both EllisLab and the Kohana dev team for putting the countless hours into developing these frameworks so I don’t have to! 🙂

Advertisements
Leave a comment

14 Comments

  1. I’ve been developing in CI for a while, and have been looking into Kohana recently.

    I think I might have to create a simple app in both like you did to decide.

    God articles though, very helpful!

    Reply
  2. dkinzer

     /  November 27, 2010

    Thanks for the article. I’m also in the process of tying to decide between CI and Kohana. I’m leaning towards Kohana since I’m new to both. But the poor documentation on Kohana is what’s worrying me.

    Reply
  3. I am Also a CodeIgniter Fan. tried Kohana. Both are using for dev apps. Waiting for 2.0

    Reply
  4. What is the best solution for the beginner? Kohana 3 or CI2? I don’t like a way of thinking like – “App in Kohana 2 won’t work with Kohana 3.” – It’s nonsense (and reason for using a framework is gone)!

    Reply
    • Jen

       /  December 31, 2010

      If you’re a beginner I would definitely recommend CI2. CI’s community is far larger and documentation is much better than Kohana’s. There’s the added bonus of not worrying about your base code changing dramatically between versions.

      As you become more familiar with PHP and working with a framework, Kohana would then be a good place to turn, IMO.

      Reply
  5. Sinan Eldem

     /  October 26, 2011

    I read your posts and found it very useful. Thanks.

    Reply
  6. memedroid

     /  January 4, 2012

    for the CI configuration array, i do it 2d array way like this:

    $config[‘module1’][‘config1’] = ‘module1_config1_value’;
    $config[‘module2’][‘config2’] = ‘module2_config2_value’;

    Reply
  7. memedroid

     /  January 4, 2012

    I’m a long time CI user myself(about 3 years +) and I tell myself if i will learn another framework, it would be ZF(employment wise, learned ZF experience gives you a higher pay in hour), or a totally new framework/language like Ruby on Rails (as what i’m learning now).

    My 2 cents.

    Reply
  8. jurgen

     /  February 2, 2012

    Thanks a lot for this article .. I think I made my decision now on which framework to use. I think I’ll go for Kohana. I have 1 question though which may seem silly: why is the system/classes structure like it is? A directory full of classes extending all other classes in a subdirectory. I fail to see the point?
    And if anybody could come up with some good tutorials about Kohana (like how to build a complete website, with some kind of blog, with Auth,…. feel free to post then 😉
    Thank you for keeping this thread alive!

    Reply
    • Jen

       /  February 2, 2012

      The main reason is transparent extension, since PHP < 5.3 doesn't support namespaces or have the class_alias function available. I've actually found the Kohana forums have a decent amount of information on them, and if you view the kohana-modules repository on GitHub, that should give you some code examples for a lot of different things. 🙂

      Reply
      • jurgen

         /  February 2, 2012

        Thank you for your quick reply, Jen!
        So I’m guessing your still in favor of Kohana then? 🙂

      • Jen

         /  February 2, 2012

        Kohana seems to have stabilized quite a bit over the past year, so that’s a huge plus. I’ve also been watching Laravel and messed around with it a little bit, and enjoy working with it. Some of the changes CodeIgniter has introduced with 2.0 and now 2.1 are great as well.

        Not sure that really answers your question, but there you go! 🙂

  9. Roy

     /  February 13, 2013

    Thank you for the useful information.

    In the past I’ve used Drupal and WordPress, and have recently worked on legacy PHP code, but I’ve never tried either of these two frameworks. If somebody were starting from scratch today, and so didn’t have the backwards-compatibility concerns from v2 to v3 of Kohana, does that change the recommendation as to which one to choose? I’ve heard some comments that CodeIgniter is getting “rusty.” On the other hand, the more documentation the better and it looks like CI really wins there. Tough choice for me!

    Reply

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: