Is CodeIgniter a wise choice for large applications?

Joseph picture Joseph · Jul 22, 2009 · Viewed 16.9k times · Source

I keep on reading how great codeigniter is from a development standpoint. And I am sure that using the framework will make the development process quicker. But the question I ask myself is, will there be a difference to a individually made framework, which caters to your needs?

Is CI, despite the advertised small footprint, going to "bog" down the system because it is basically a framework on a framework (the later referring to PHP as framework of C)? Are there good ways to spread the load? Are there any large applications in the wild that have been made with CI?

Thanks Casper.

Answer

ascotan picture ascotan · Aug 3, 2009

I'm running a codeigniter site with about 11K files.

I've heavily modified the codeigniter's basic structure for my needs. For instance, I have 3 applications with 3 front controllers using the same system files. I'm using smarty as my templating engine. I have rich PHP web apps powered by jquery and prototype/Scriptaculous. I use form validation, authentication, active record, emailing, etc. etc.

My experience so far has been very positive.

Once you get a (real) templating engine like smarty plugged into Codeigniter you have all the power that you'll need for medium to large sites.

You have to think about organizing your site into large 'metagroups' as the 'controller' structure in Codeigniter expects such behavior. ('blogs', 'merchandise', 'forums', etc..)

CI is very easy to add plugins for.

The framework simplifies a lot of crap you would otherwise need to hand code. It's fast, simple and configurable.

My one big complaint with CI so far is that it's not very multi-application aware. The default layout assumes you're running 1 application. In my case, I have a global application with the global file that can be pulled into all running applications. However, this could be solved more elegantly. Additionally, you have to add a little extra fluff to switch between front controllers.

My favorite aspect of CI is easy of active record on a MySQL DB. It's dead simple to set up a DB connection and get active record queries running.

I would say that it's pretty easy to get started with. Just make sure you shop around and figure out how to plug smarty into your app. You CAN use the default 'view's of Codeigniter, but the minute you need if/else logic in your templates you're screwed.

I set up a 'templates' and a 'content' area in each app that I can fill with smarty templates and static content respectively. The rest I can pull from a DB connection.