views:

61

answers:

1

I like CodeIgniter for php development, but I have a client with no tech skills that wants to make his own changes to his site. I taught him how to make pages in MODx (that was a feat in itself). Is it possible to develop a site with CodeIgniter and use MODx as the content management system? Will MODx mangle the framework?

+2  A: 

Short answer is "very probably". There's a good chance that modxcms handles all routing, controller actions, etc. on its own. There probably is no simple way to plug either one of these into the other.

Long answer is "it depends" followed by these conditions: what framework does modxcms use? How does it handle calls through its index.php file? What's the overhead of modxcms? If you want to manage routing in CodeIgniter, how will modx interfere? How would it be possible to have these two systems work together absent a some major refactoring of code?

Typically, it makes the most sense to stick to CMSs that are built on a platform that you like. For CodeIgniter, the only one I know of is ExpressionEngine, which is nice and all, but it costs. Other CMSs that I've experienced like Joomla or Drupal are a disaster if you're coming from something as clean as CodeIgniter.

So...not sure if this really helps you much, but I'd operate under the assumption that you can't (or at least shouldn't) mix CI with modx. IMO, it's easy enough to make a decent CMS using CI alone, giving you much more immediate control over the presentation. In my experience, taking a CMS like Joomla and trying to turn it into a complex alternate creation is probably one of the most annoying things a programmer can put himself through.

treeface
Thanks for the words of wisdom, including this post: http://stackoverflow.com/questions/3260351/joomla-as-an-mvc-framework-compared-to-codeigniter. MODx seems a little cleaner and stays out of the way more than Joomla, but you're probably right about the impending frustration. Building a CMS that looks like the MODx interface might be easier than forking from MODx.
JMC
You're very welcome, JMC. My words on Joomla are reserved solely for Joomla. I wanted to use Modx at the time, but was restricted to free CMSs. From everything I read, it seemed like Modx was much tighter than Joomla, but with regard to total control I'm sure there are similar issues. In the end, if you want to build something very personalized, I feel it makes more sense to just make it yourself with the lightest, but most powerful tools you can find.
treeface
+1 for writing your own CMS with CI. Much better than beating MODX / CI into what you want them to do.
stef