Has anyone successfully fused/grafted code igniter and modx?
I don’t mean to get into a discussion about the merits of both - I’ve used both and each has their place - but I find codeigniter much easier in developing applications. While I know there are many things in store for modx - I have projects to do now and I find as a real solution for application development - CI wins. But I want the ease of managing content and page-pieces of modx.
It seems there are two approaches:
1) have the index.php be a codeigniter and use the modxapi to include snippets, chunks etc.
2) or to use the modx index.php and use a snippet to access codeigniter
I prefer option 2 because it seems to make more sense for the static content and the general approach of what I want to do.
I had some initial trials that didn’t work - and I’m on a tight schedule so I didn’t have time to work on it more. I would be interested in talking to anyone also working in this direction. It could be that our company would pay for help with this (but I can’t say for sure) in that it would save us some time.
Thanks,
Yehosef
-
☆ A M B ☆
- 2,475 Posts
I can see what you mean... MODx doesn’t offer default domination over forms and randomly created database tables, whereas that’s pretty much what Code Igniter thrives on. MODx does offer you a nice built-in GUI, and for those projects that don’t require special development or where lots of people will be logging in, well, MODx offers a very functional and familiar interface that you don’t have to reinvent.
I think what you outlined is exactly how you have to integrate the two systems... by default, the functionality of a system like MODx is achieved by piping the entire url back to the index.php page as an argument... so the index.php is the application, and the url just determines how the app runs. That’s how Code Igniter works too... but I think if you made a clever hack to your apache config file (or to your .htaccess file), you could make a separate directory where Code Igniter lives, and all of those urls beginning with that directory name won’t be passed over to the MODx index.php. Or vice versa. At least, that’s what I’m going to try.