Elliot Haughin

Weblife

Thoughts

Tunes

  • 19 hours agoHillsong – Stronger
  • 19 hours agoHillsong – High And Lifted Up
  • 19 hours agoHillsong – He Is Lord
  • 19 hours agoHillsong – This Is Our God
  • 19 hours agoHillsong – Desert Song
  • 19 hours agoHillsong – Run
  • 2009/01/05Hillsong – Run
  • 2009/01/05Hillsong – Home
  • 2009/01/05Hillsong – Run
  • 2009/01/05Hillsong – Home

CodeIgniter 1.7.0 - A Step in the Right Direction

Posted by Elliot on Saturday, October 25th, 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?

Posted in: codeigniter.

11 Responses to “CodeIgniter 1.7.0 - A Step in the Right Direction”

  1. Jamie Rumbelow Says:

    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.

  2. David Says:

    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. :)

  3. bjorn Says:

    Thanks for the update Elliot … hope this means EE 2.0 will be out soon! :)

    Your new blog design rocks, btw!

  4. Marcin Zaremba Says:

    I think, that is a good step. I like new version so much. Thanks Elliot for great news ;)

  5. Julian Says:

    Great step. Thanks for sharing that with us.

  6. Thorpe Obazee Says:

    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.

  7. Ghassem Says:

    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

  8. MajiD Says:

    @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.

  9. Joshua Gdovin Says:

    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.

  10. Thorpe Obazee Says:

    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.

  11. Thorpe Obazee Says:

    Btw, that was a response to Joshua with regards to AR.

Leave a Reply

Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008Christmas 2008