Codeigniter and Expression Engine
I, like so many of my PHP developer comrades, am very excited that EE2.0 is built using CodeIgniter. I’ve been developing on CI for close to two years now, and I love the working with the framework. When I first heard about the EE2.0 + CI mash-up I immediately thought that I could stop having to build small CMS systems for my clients and just drop-in an instance of EE into my CI app, and away we go. I’m not going to go scour the internet for this clip, but I do remember seeing an EE2.0 presentation where this drop-and-go mentality was first presented. Now that EE2.0 is out of Beta, I do have to admit I’m kinda disappointed with the integration.
To be clear, this is not a complaint. I think EllisLabs does a great job with both ExpressionEngine and CodeIgniter, however, I just wanted to touch on a few areas where I would like to see the two blend a little more cohesively. Also, being a CI developer I am more than capable of building add-ons/extensions to EE, so if you want to say “well why don’t you do it yourself then”, I agree with you…I should.
Here is my list of possible overlap areas:
Accessing raw data instead of using Template tags
Many times when I’m looping through channel entries I’d rather have a large array of entries instead of having to use the exp:channel:entries tags to retrieve a single entry. There have been many occasions where I have wanted to do some simple reorganization of some of the data thats returned in an entires loop, and being able to access the data array would be very helpful.
Templates acting more as Views
In a MVC setup, logic is kept away from the View files intentionally, and any logic that does make it into the View is for presentational purposes only. This is great, however in EE we don’t even have views, we have Template files. Coming from CI, I’m used to sending in large arrays of data into my views where I loop through the data and call various helper functions to “beautify” each piece and get it ready for output. I wish I was able to do this in EE. Instead of being able to access a simple helper function, the only way to alter my data is to create a Plugin for EE, which can get rather cumbersome.
Pre-template Logic
Lots of the projects I use EE for are somewhere in-between a content driven “magazine/blog” site and a simple web application. For these projects, its usually a tough choice between using Codeigniter or ExpressionEngine, but many times I go with EE because of the built in Admin interface. Usually in these projects, I get to a point where I need to add some functionality to a page that EE does not offer - be it processing a form, talking to a third-party API, or integrating some rather complex ajax features. For times like this it would be nice to have a “controller” file associated to a page where we can perform some of this pre-logic and even call various views from within the logic page.
Overall I’m very satisfied with ExpressionEngine. I do think the price is a little high and I have come across a few bugs that seems to be pretty major, but overall the architecture and philosophy behind the way it organizes content is the best I’ve seen. Right now I’m in the middle of 3 projects that all use EE and everyday I’m learning about new features and ways to optimize it for the way I build projects. I’m hoping that the more I use it the more I’ll learn how to tweak it to figure out many of my gripes I mentioned. What do you guys think? Are there any features you wish EE had or anything you think it does wrong? Let me know on twitter @bryant_