Professional Freelance Web Developer
CodeIgniter Activist, Caffeine Junkie

Elliot Haughin

CodeIgniter 1.7.0 – A Step in the Right Direction

25th October 2008

It’s been quite some time since CodeIgniter has seen a major update, and this week we’ve finally got one! I actually got the news via twitter, which shows just how much of a mainstream communication platform it’s becoming!

CodeIgniter 1.7.0 has plenty of new features and bug fixes, but I’m not going to list them all. You can check out the changelog to see them all.

But I would like to point out some of the more interesting updates.

First of all, there’s a new form validation class (finally!) as long as a year ago I’ve been wanting to see a fresh validation class, and this one is much much better.
It’s far less complicated, take, for example, setting validation rules.

$this->form_validation->set_rules('username', 'Username', 'required');

One line of code sets the post name, the display name, and the rules for the field. Much better than having to declare them individually.

Form validations rules can also be saved in config files, removing them from the controller code, and making them much more flexible. They are auto-loaded too.

This, is one of the best improvements CodeIgniter has seen for a long time, and I’m looking forward to getting my hands dirty and really pushing the limits of this one.

The session class has also had a little modification:

Updated the Sessions class so that any custom data being saved gets stored to a database rather than the session cookie (assuming you are using a database to store session data), permitting much more data to be saved.

So when you’re using code like:

$this->session->set_userdata($my_basket);

The ‘custom’ data is saved in the database, which means you can use more than the standard 4KB which cookies allow. Lovely :)

Another nice little addition is the PHP Style Guide, which gives developers a nice set of coding standards which PHP adheres to. So, now you know exactly how to write you code so it feels right at home with CI’s native code.

I’m really happy with this update, and I’m looking forward to using it more.
What’s your favourite new/updated/fixed feature?

  • Ben
    CodeIgniter rocks. I agree with Ghassem on the fact that no authentication/authorization class comes natively with CI... That's my current problem, I have to find a good library to do that. Though, it is a very nice feature from CI I can implement Zend classes into it - Zend_Acl for instance.
  • Btw, that was a response to Joshua with regards to AR.
  • I haven't 'seen' any problems on my site when I upgraded to 1.7.0 from 1.6.3.

    Maybe I should get in #codeigniter some of these days.
  • One major problem is they have broken the AR class as far as I can tell, there has been a lot of talk in #codeigniter about all the errors the AR class is throwing up now.
  • @Ghassem,
    You can easily ad modules and helpers and plugins to application folder without the need to hack core.
    Also you can add functionalityies to core classes by extending them, just in your application folder.
  • With all of these features, there are some vital lacks in codeigniter:

    1)framework standard Authentication system
    2)you can not define modules without hacking the core
  • I am with Jamie Rumbelow. I hope EllisLabs focuses on the bugs first. With the new release, I believe my app was hit by a bug in session class which forced me to create an authentication library using $_SESSION rather than CI sessions.
  • Great step. Thanks for sharing that with us.
  • Marcin Zaremba
    I think, that is a good step. I like new version so much. Thanks Elliot for great news ;)
  • Thanks for the update Elliot ... hope this means EE 2.0 will be out soon! :)

    Your new blog design rocks, btw!
  • David
    I love the new release, and like yourself, first saw it via Twitter. I've already started to get my hands dirty. Only thing bugging me is that you can't set primary keys with the Forge without throwing some nasty errors and SQL errors. Hopefully EL will patch stuff up and keep moving toward EE 2 and the version of CI that's built off of. :)
  • It's great to see that CodeIgniter is progressing - however slowely. After a period of stagnation an update is just what we need.

    What I'm concerned about is that EllisLabs will focus on smaller bug fixes rather then push forward development of EE2 and the CodeIgniter release it will be based on.
blog comments powered by Disqus

Boring Stuff

Design © copyright Elliot Haughin 2009

Content published here are copyright their respective owners.

You cannot copy content from this site, either in English or translated to another language.

Keep Subscribed

Theres lots of ways for you to keep up with me on the web.

Please Note

Information given out on this blog should only be used as a guideline. I hold no liability for any code I write.

Always consult a professional before acting on this guidance.