Published by Mijingo

movie icon image

EE Insider Blog

Spend your time learning and developing sites with ExpressionEngine and we'll use this blog to keep you informed of all the news related to ExpressionEngine and CodeIgniter.

» Read more in the Archives.

» Have a tip? Send us your EE news.

Learn ExpressionEngine Today

Over a series of 8 videos, watch and learn as Ryan builds an entire ExpressionEngine website from beginning to end. Get started now.

EE 2 Week Straggler: The Return of Derek Allard! (Interview)

We had sent out a set of interview questions that we weren’t sure we would receive for ExpressionEngine 2 Week. Derek Allard, one of EllisLab’s developers, was on vacation. Since he’d been slaving away for years on EE 2, we gave him a free pass. But Derek is what the kids call a “trooper” and he came back to us this week with the answers! It turned out to be a really great interview, timely due to the discussion and popularity of CodeIgniter and EE, and we got permission from the ‘Lab to post it. So, EE denizens, it’s my pleasure to give you our interview with the great Derek Allard:

Let’s start with a general question. Most readers of EE Insider know of CodeIgniter but not everyone may be aware what a PHP framework is, why it matters and how CodeIgniter fits in. Can you give a quick overview of what CodeIgniter is and why its been so popular among web developers?

No, let’s start with an apology. I know it was EE 2.0 week last week, but I was out at EECI, and then my wife and I took a week to tour around Holland - so sorry, hopefully it’s worth the wait. smile

To the question; my favourite (editor’s note: Canadian) way of describing CodeIgniter is “It helps when you want help, and gets the hell out of your way when you don’t”.

CodeIgniter is a toolkit for PHP developers. It’s high quality code that helps you do your tasks, whether complex or menial, quicker and more predictably. It also offers a level of abstraction to your code, meaning it is more flexible and can be re-used easier, and conventions (that can be broken) to make things faster for you to develop a web application.

We all know EE 2.0 is built on top of the CodeIgniter framework. Why was this done and how did it impact CodeIgniter itself? Will CodeIgniter continue being an open source framework?

Easy question first; yes, absolutely CodeIgniter will remain Open Source.

Why was EE built on CodeIgniter? There are a number of advantages for us here, and I’ll outline a few in a moment, but in my mind the real answer is that we wanted to practice what we preached. We are committed to making CodeIgniter a fantastic framework with a fantastic community around it, and we wanted to prove it by building our flagship product on it. If EE 2.0 built on CI is not enough to convince people that CodeIgniter is a more then capable framework, there is nothing that will convince them.

On a technical level, here are a few of the notable advantages: database abstraction, strong, well-tested security, and powerful proven code libraries. If you are an ExpressionEngine Addon developer, these are pretty significant.

Also (and I know I’ve mentioned it already) there’s the CodeIgniter community, where you’ll find some of the sharpest coding brains I’ve ever met. At EllisLab we’re really spoiled, between the two (ExpressionEngine and now CodeIgniter) groups, we’ve got something really special. Everyone is committed to quality, helping and sharing. Best of all, as ExpressionEngine gets better then CodeIgniter gets better, and vice-versa.

So on a superficial level, we’re likely to see an infusion of developers; and on a deeper level, we’ve got 2 communities with similar “personalities” and values coming together.  The possibilities for future development, Addons and extra functionalities is pretty cool. And as I once said , even if you are an EE developer who doesn’t do much coding; the nerds are excited, and you should be excited that the nerds are excited.

Can you name a few examples of CodeIgniter features that came out of implementing a feature in EE 2.0?

Oh boy, a lot. I’d say at somewhere around 75% of everything since 1.6 is directly attributable to EE development.

Now, before I continue, let’s be clear on something… asking me this question means that I’ll get into details that will have most of your readers rolling their eyes and moaning “BOOORIIIIIIIIIING” at their monitors. You’re setting me up to be the most boring interview ever aren’t you?

S’okay, I’m a nerd, let’s get into specifics.

The database stuff got a lot of attention. The entire database forge class that allows you to create, modify and delete tables and otherwise manipulate your database was added for ExpressionEngine 2. When I built it we didn’t know what to call it, so I suggested “DB Forge”, and Rick Ellis joked that we could only implement it if we called it “day-bay-for-jay”.

Active Record was also dramatically expanded to allow for all the complex SQL that ExpressionEngine used. For example where_in(), or_where_in() and the like. Also limiting on updates and deletes, and expanded functionalities like count_all_results(), and min, max, average and sum selection. These weren’t difficult queries to write manually, but we liked the idea of developers being able to pick Active Record and use it as much as possible. There are still some very complex queries that Active Record doesn’t handle well, and we’ve got some ideas for how to handle that for the purposes of database abstraction.

Oh yeah, and Active Record caching.

For the File Manager we needed some more information. Enter get_dir_file_info(), get_file_info(), get_mime_by_extension(), symbolic_permissions() and octal_permissions() to the File helper.

There were a bunch of general speed and security enhancements. The XSS protection is tighter, natively handles arrays, is more picky (ie: fewer false positives) and generally much snappier.

With EE 2.0 built on CodeIgniter, it seems that this will open up EE add-on development to an existing, vibrant community of developers. How will CodeIgniter impact add-on development for EE 2.0? Do I have to go back and relearn add-on development? Is it easier now that before?

Yeah, there are parts of Addon development that you’ll need to relearn, but you know, if you’re at a level where you’re writing Addons then nothing there will be confusing. Ultimately it’ll be much (much) nicer for you. Addons now have access to CodeIgniter resources and coding conventions. You’ve already posted some really informative articles about that topic, and I’d suggest people start there if they want to learn more.

Can you share any future additions to CodeIgniter that are in the works? Where do you see CodeIgniter 3-5 years from now?

Everything in CodeIgniter evolved out of a programming need. As I’m sure everyone knows, it is essentially an abstraction of the best parts of ExpressionEngine 1. So really, most of the new things added into CodeIgniter come from developer need, either our own need for our products, or the needs articulated (and often added) by the CodeIgniter community itself. CodeIgniter will continue to be driven by real-world needs and implications.

Thanks for the chance to share this with everyone. I just want to close by saying that if CodeIgniter sounds interesting to you, then get involved. CodeIgniter has changed the way I look at programming in the same way that ExpressionEngine changed the way I look at building websites.

Posted on Nov 05, 2009 by Kenny Meyers

Filed Under: ExpressionEngine 2 Week

TheBrad07:03 on 11.05.2009

A Derek Allard centerfold would go a long way toward making up for the lateness of this interview. Just sayin’.

Lou08:57 on 12.08.2009

I’ve been digging around EE 2.0 for the past two days, figuring out the “agile records” template from the inside out, oh joy.