![]() |
Making an argument for CodeIgniter (or any MVC FW) versus Drupal - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Making an argument for CodeIgniter (or any MVC FW) versus Drupal (/showthread.php?tid=35677) |
Making an argument for CodeIgniter (or any MVC FW) versus Drupal - El Forum - 11-07-2010 [eluser]Peter Drinnan[/eluser] I have a client for whom my company has build a lot of complex business applications using CI. We build it all using a modular design so it is like a suite of CI applications. The client just hired a newbie developer who is telling them they should develop everything with Drupal from now on. I have been writing code since 1995 (VB, C++, Java, Perl, PHP) and was an early adopter or PHP Nuke, Xoops and Joomla. I don't have any issues with CMS except when it becomes an unnecessary overhead. The CI architecture to me is a beautifully easy way to maintain and modify code and is generally familiar to anyone who has experience with any MVC framework. The problem I have with Drupal specifically is that it somehow missed the MVC boat altogether. At least with Joomla, there is an MVC model to follow. I am looking at my clients existing apps that are all beautifully CI structured modules and thinking how the heck will anyone migrate that into Drupal without completely rewriting it. Is this total insanity on the part of my client or am I missing something here? I'm thinking that if they really want a CMS wrapper, they at least use Joomla because it would not be that difficult to reformat the existing CI code. Is it really practical to "Drupify" something that works perfectly in CI. Anyone else deal with this kind of thing? I am lost on this one. Making an argument for CodeIgniter (or any MVC FW) versus Drupal - El Forum - 11-07-2010 [eluser]tonanbarbarian[/eluser] not really experienced with Drupal, but I am with Joomla, and my suggestion is that it is fairly easy to drop a CI app into Joomla and have it run as if it were a Joomla extension. It may be possible to do the same with Drupal. The advantage of using a CMS is that you only have to code the specific things you need for the site. You can find extensions to handle a lot of the common things clients might need on their site, and then once they need something very specific you can build an extension for it, in CI, and that way it is - secure - easy to maintain - fast (I have found my CI code running inside joomla is just as fast if not faster than an extension using the core Joomla framework) to integrate you CI into an existing CMS you just need to see if you can rename your CI index.php to whatever file the CMS uses as its start point. i.e. in Joomla it is based on the component name. You then need to convert the CMS urls to CI urls, and vice versa. so a CI url /controller/method/param1/value1/param2/value2 would be index.php?option=com_something&c=controller&m=metho¶m1=value1¶m2=value2 in joomla. i actually leave the CI index.php file as index.php if possible and then have the joomla start page run some code first to convert the url into the correct format and then include the CI index.php Making an argument for CodeIgniter (or any MVC FW) versus Drupal - El Forum - 11-07-2010 [eluser]Peter Drinnan[/eluser] Thanks tonanbarbarian. I think your approach would work nicely in Joomla. Like I mentioned earlier, the fact that Joomla is already MVC oriented makes it feasible to recycle CI code inside of a Joomla module. I am familiar with Joomla but less so with Drupal. I'm not really sure if I'd want to be a Drupal guru. It seems that while everyone is moving towards object oriented coding in PHP with an MVC architecture, Drupal is going .... well I really don't know, but my guess is it is in another direction. The question is has anyone ever successfully migrated a CI app into Drupal without having to completely rewrite it? Thanks in advance. Making an argument for CodeIgniter (or any MVC FW) versus Drupal - El Forum - 11-07-2010 [eluser]tonanbarbarian[/eluser] i am not talking about rewritng the app at all my apps are pure CI code which just a couple of helpers and one file that includes the CI index.php file. About the only changes you have to make to your app is make sure that any links the CI code creates are converted to a format that the CMS likes. And you would have to do that for any CMS drupal, Joomla etc Making an argument for CodeIgniter (or any MVC FW) versus Drupal - El Forum - 11-07-2010 [eluser]Peter Drinnan[/eluser] Hi tonanbarbarian. Don't get me wrong. I understand and appreciate your advice, but if you look as a typical Drupla module, you will see it is very different from what a Joomla module (or extension) looks like. I have done the type of thing you describe before where I rewrite the urls and load my app as a sort of sub-application, but have you ever looked at Drupal code? It is really bizarre if you come from an MVC environment. I am really fishing to see if anyone has done actually done what you describe for combining Joomla/CI with Drupal/CI. Thanks again tonanbarbarian. I do appreciate your advice, but I guess I wasn't specific enough in saying that Drupal/CI compatibility is my real concern. I am certain it isn't an issue with Joomla. |