Why am I here?

09Apr07

Believe it or not I am still aware that this blog exists, although you wouldn’t think it with the lack of posts over the last few months. Between one thing and another I’ve just not had the time to post as of late. Actually, that’s only partly true. The problem I’m having is coming up with interesting information to post. When I started this blog I had the intention of posting about whatever was catching my attention on any given day. It’s all well and good saying that though. In reality it’s not that easy to achieve. What I don’t want is for this site to turn into a sort of a life blog where I post about every meaningless event in my life. I’ve subscribed (and am still subscribed) to these types blogs in the past but I’ve found myself skipping over them recently. There’s just so many posts coming into my aggregator that I’ve had to get very strict about what I read or I’ll just spend by entire day reading meaningless crap. I’m being drawn more and more to posts that are short, interesting and relevant to what’s on may radar at any given time. Right at this moment I’m spending a lot of time developing a site using Code Igniter. Maybe I’ll post about my experiences with that over the next few days?

  • Adrian Smith
    Hi John,

    Overall I really like CI. It's accessible, easy to learn, functional and doesn't get in your way. Before I started using it I looked at both symfony and CakePHP. Both looked really good but I find that unless I can start using a framwork (to do even basic stuff) within an hour or two of reading the documentation then it's too much work. Maybe that's just me being impatient but there you are. With CI I watched the webcast, had a quick read of the documentation (which is nice and short but still informative) and very soon I was up and running.

    The scaffolding features in CI are pretty basic and not realy comparable with what's available elsewhere. In rails for example the scaffolding generates code for features that are repeatable given a few simple parameters. In CI, the scaffolding is there for one simple reason, to allow you to add/edit/delete data in your database during development.

    I've seen comments around various sites saying that the ActiveRecord layer in CI is weak compared to that of CakePHP. That's probably true, I've not spent enough time with CakePHP to understand what it can and can't do. With CI you're given a very simple database interbase. What you do is create a Model class, for example User (which isn't mapped to any table in particular). Within this class you add functions to perform the actions you want. For example, add(), update(), delete(), findByEmailAddress(), etc. Within each method you can write your own SQL or use a helper library that can generate SQL based on your requirements. I find being able to write the SQL myself the best option. SQL isn't difficult so why abstract it away and make life difficult for yourself. If your SQL is a select statement then you're returned an object representing the result set. You can loop through each row in the object just like any other array in PHP and accessing a column is as easy as user->firstname. All in all the database access/ActiveRecord layer in CI is more than adequate.

    I'll try and do a more indepth review at some stage.
  • I would be certainly interested in hearing about your experiences with Code Igniter. I'm in the process of developing my own PHP web framework for over a year now, so I am always interested to see how others do things. I just had a quick scan through the user guide on the Code Igniter website, which is pretty clear and concise, and I like the way they handle URLs in particular but I think they could make greater use of scaffolding.

    Have you found that using an MVC framework such as Code Igniter has reduced the development time of your project significantly?
blog comments powered by Disqus