the Future of the Web
  • Home
  • Hire Us
  • Articles
  • About
  • Contact
  • Code Igniter

    May 14 2006

    I'm absolutely in love. While I bored was at JAX, I searched around for a PHP framework like Ruby on Rails. I already knew about CakePHP, but I wasn't convinced. I looked at a few others, but nothing caught my eye. Then I discovered Code Igniter.

    Code Igniter comes from the people who make Expression Engine. I had already heard great things about that, and I had even considered purchasing a license. Code Igniter, however, is free and open source. It's quite new (first beta was released in February) but it is incredibly professional and already very stable.

    Code Igniter does absolutely everything I want it to, and nothing I don't want it to. It's incredibly simple and clean, so there are no surprises or weird tricks. It forces you to organize your code using an MVC structure (actually, a VC structure — using a model is optional). This keeps your code cleaner and easier to maintain. It also comes with a number of libraries that help with common web development things like email and uploaded files.

    This weekend, I rewrote my whole custom-made blog code for this site. It only took about 4 or 5 hours, and it was actually fun to do. It also reduced the amount of code I had, and makes it much, much easier to maintain and change in the future. For example, until now I was too lazy to add contact pages properly, so I just added blog articles for Contact Me, etc. and pointed links at these. Now, I've changed the pages to use /contact/me and /contact/hire, and I could easily reuse my blog template. This change took about 10 minutes.

    By default, URLs are of the form /class/function/parameters. But if you want to do something different (I use /blog/2006/5/article-name), you can set up routing rules for anything you want. Actually, Code Igniter is totally flexible to let you do whatever you want. Anytime I got stuck, I poked around in the documentation and found that there was something in place specifically for my problem.

    Also wonderful: only the minimal amount of PHP is loaded to create each page. You can load classes globally, if you need them, but by default, you only load what you need when you need it. This keeps every page as fast as possible, something I was worried about with other frameworks like CakePHP.

    Okay, that's enough ranting. If you use PHP, check out Code Igniter. There are some videos you can watch to see just how easy Code Igniter really is. The user guide is also a pleasant read and explains everything really well.

    Tags: server codeigniter php framework
    View 30 Comments | Add a comment
  • Comments

    1. GeoffC at 11:42am on May 15, 2006

    Nice work.  I have been playing with CI for a few weeks, tis very nice to work with.

    Oh.. and come join us on irc.freenode.net / #codeigniter

    :)

    2. Roberto Bechtlufft at 2:17am on May 19, 2006

    I've been trying to understand MVC for a few weeks, but I always found it too complicated - I'm no PHP pro, I'm just a guy who likes to code now and then. But then I watched the video tutorial in Code Igniters site and, wow, that was a pretty good explanation! I'm already working on my wife's website using Code Igniters. Thumbs up!

    3. Jesse Skinner at 12:40pm on May 29, 2006

    I love ruby and rails. But I think php still has it's place. Also, my hosting provider doesn't support ruby. So until my hosting contract expires, I'm pretty much stuck.

    Regardless, when using php, Code Igniter is where it's at.

    4. zidane at 1:20am on June 2, 2006

    Is it possible to use it with smarty as a template engine ?

    5. Jesse Skinner at 8:54am on June 2, 2006

    @zidane - you know, I was just wondering about that yesterday. I've never used smarty, but from what I can tell, you should be able to load smarty, call smarty functions, assign values and call the display function all from within the controllers of Code Igniter. It seems like it would make a great combination.

    You also might want to ask/discuss this at the Code Igniter forum:

    http://www.codeigniter.com/forums/

    6. Fredrik Wärnsberg at 11:48am on June 2, 2006

    Why not learn rails? The reason he made rails for ruby and not php was because php wasn't enough for what he was trying to do in the first place.

    7. chris at 6:03pm on June 15, 2006

    Just looking through the documentation for CI for an hour or so and it looks very much like what I've been looking for over the past few weeks. So this is just a quick note to thank you for the headsup!

    8. rabi at 11:38am on August 31, 2006

    This is good stuff. Tried it, it was nice. Anything like this for python? Im not a pro just a designer.

    9. Jesse Skinner at 11:42am on August 31, 2006

    @rabi - I've heard only good things about Django (for Python), though I've never tried it out. I'd like to one day, once I get a web server that supports Python...

    10. Chris Lamb at 10:37pm on October 26, 2006

    Fredrik, I do know Ruby and have built a clients application on Rails.

    The problem for me with RoR was getting a server I could rely upon. It really seemed a patchwork muddling with Apache and fastcgi or lighttpd ... and on....

    Has the situation improved?

    11. Terry Apodaca at 9:24pm on December 6, 2006

    I'm using CI for the first time...to build a website for my family.  I'll keep you posted on my findings and experiences.

    12. Jesse Eickholt at 12:34am on January 3, 2007

    Just wondering if you'd be willing to share your code for your this blog.  I'm looking to play around with CI and revamp my blog.  I'd love to see what you did.  I nice work with this site.  It's very catchy.

    13. Jesse Skinner at 1:04am on January 3, 2007

    @Jesse - I've thought about releasing my code one day, but I'd want to package it up and make it more reusable first. I'll keep it in mind, and if I ever do, I'll be sure to announce it on here.

    14. angel at 2:47pm on January 31, 2007

    hi, could you pls tell me how to use css with codeigniter? this code does not seem to work->

    <link href="styles.css" type="text/css" rel="stylesheet">

    it's my first time to use a php framework. i'm having trouble installing cakephp and simfony(?) and somehow managed to make codeigniter work (thanks to the video tutorials).

    15. angel at 2:49pm on January 31, 2007

    nevermind, i found it out myself. just put the css on the root folder, not on the applications folder/subfolders. =p

    16. jonie at 2:29am on March 8, 2007

    i watched the CI video and i had an orgasm

    17. Rudy at 9:27am on April 3, 2007

    In Romania 8 March is Mother's Day,  so  I understood why jonie had an orgasm ... :p

    18. martin at 8:09am on May 8, 2007

    hi there jonie......

    r u sure u had an orgasm??wow.......

    well i had a fun time learning CI with the help of the tutorial vids..

    ^^ just had a hard time with the css problem..........

    19. pedro at 9:01am on May 29, 2007

    wow..

    you guys are talking about CI + orgasms..
    It must be good.

    20. Richard at 10:26am on July 17, 2007

    Hey, I have to agree.  I just downloaded over the weekend.  CI is allot more intuitive than cake, and as it claims - is fast!

    21. Jenny at 7:27pm on August 1, 2007

    From what I read, Smarty and Igniter do not really go well together - too much complexity overhead.

    I have seen sites that used CI - it is fairly intuitive, BUT the front end and back end are not separated, which is very hard to manage. I would stick with smarty and good software design.

    22. squirre at 8:53am on August 22, 2007

    hello, i'm a newbie in codeigniter, found same problem with css
    but i think i know how to do that now...

    i made a newbie tutorial in my blog
    http://codeignitercamp.blogspot.com

    23. kik at 2:08am on November 24, 2007

    just to mention that CI work pretty well with projax.

    24. Brian at 1:00am on January 9, 2008

    How is the front end and back end not separated in CI?  It seems that they are, with the back end submitting finished values to the front end view files when finished.

    It looks like it's not as slick as Smarty (ie. <?=$title?> instead of {$title}) but still does the job of separation, or am I missing something?

    25. eenx at 5:21pm on March 2, 2008

    I'll try it, thanks for the review

    26. Mohfeza at 5:15pm on March 13, 2008

    Could you please
    let me know if I can get CodeIgnitor hosing?

    27. Jesse Skinner at 6:38pm on March 13, 2008

    @Mohfeza - the great thing about Code Igniter is, all you need is regular PHP web hosting, and you should be able to find that anywhere!

    28. Dhila Pamungkas at 2:00pm on May 5, 2008

    I'm a real newbie on web programming..
    I've never used PHP before..

    One of my lecturer hired me to do some portal-making, and urged me to finish it this month with the assistance of CI, which I never used before..

    So.. what do you think I should start with?

    29. Jesse Skinner at 2:03pm on May 5, 2008

    @Dhila - Start with the CodeIgniter user guide and maybe pick up a good PHP beginner book. A month sounds like a tight crunch for learning and using a new language. Good luck!

    30. JM at 2:48am on August 5, 2008

    Code Igniter is an excellent framework, I'm using it in my two actual projects.

    Add a Comment

    Note: HTML tags and entities will be converted so that they are displayed as you type them. This means if you type in <em>, people will see <em>, and if you type &lt;em&gt;, people will see &lt;em&gt;.

  • Request a Quote

  • Jesse Skinner

    Jesse Skinner
    • Hire Me
    • About Me
    • Email Me
    • RSS Feed RSS Icon
  • Recent Articles

    • Test Driven Development
    • Google is Hosting Ajax Libraries
    • Parse Accept-Language to detect a user's language
    • Twitter
    • Three years of The Future of the Web
    • Saving data to a file with PHP
    • Easy web scraping with PHP
    • See all the articles
    • IBM: Where and when to use Ajax
    • Code Igniter 1.6.0 Released
    • See All...
  • Categories

    • javascript (37)
    • links (20)
    • about (19)
    • web (14)
    • server (10)
    • html (10)
    • css (8)
    • carnival (7)
    • browsers (7)
    • design (4)
    • seo (4)
    • ads (4)
    • standards (4)
    • events (4)
    • work (4)
  • Older Articles

    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
    • December 2006
    • November 2006
    • October 2006
    • September 2006
    • August 2006
    • July 2006
    • June 2006
    • May 2006
    • April 2006
    • March 2006
    • February 2006
    • January 2006
    • December 2005
    • November 2005
    • October 2005
    • September 2005
    • August 2005
    • April 2005
    • See All...
Copyright © 2008 Jesse Skinner | CSS | XHTML | RSS | Help | Impressum | Cutie Quilts | Internet Blog Top Sites