Welcome Guest, Not a member yet? Register   Sign In
Integrating CI with drupal or expression engine
#1

[eluser]tim042829[/eluser]
I'm currently studying PHP via CI and also drupal. It is in my market and in my
future to be using PHP along with and integrated into a large CMS.
I think I understand that CI integrates with Expression Engine (EE). Am I correct?
Should I be studying EE rather than drupal?
IOWS: Is it more difficult to develop modules for drupal using CI.?

I would invite any and all comments. I don't wish to stir up an argument, if I am
trolling, then I am trolling for serendipitous enlightenment, not acrimony.

Looking forward to responses.
thanks
tim
#2

[eluser]treeface[/eluser]
Hi Tim,

Trolling you are obviously not. No worries on that front.

I see you've used Python before, and as such I'll try to stick to something resembling a good analogy. CodeIgniter is to PHP as web2py is to python. Drupal and Joomla are to PHP as pinax or skeletonz is to Python. If you've used any of these before, you'd see the major point of difference here:

1. CI and web2py are simply MVC frameworks for PHP that create a few core classes (most notably the Model and Controller) that you can use to structure your entire back end around. You still have to build your site, but things like URI routing, html structuring, data access, etc. are all handled by the framework's core classes which you can access at any time.

2. Drupal and the others are content management **systems**. I emphasize the word "system" because they are essentially complete systems. Integrating CI into Drupal is misguided for this reason: Drupal already does much of what makes CI useful as compared to frameworkless PHP programming. It's important to note that I think CI does a lot more in the way of being a useful framework for a programmer, but Drupal (probably..if it's anything like Joomla) has its own access points, routing methods, data access classes, etc. It *also* has this fancy application built around this custom system that can be called a "CMS". This CMS application relies on Drupal's custom PHP framework to operate.

So using CI inside of Drupal (or the other way around) would be a good way to a) figure out how both CI and Drupal work, b) make an unnecessarily large number of calls to scripts that probably do similar things, but most importantly c) make you want to kill yourself.

Now, Expression Engine is a CMS like Drupal or Joomla, but instead of relying on a custom framework, it was built by EllisLab to use CodeIgniter. This simply means that if you look at the code of EE, you will see that it uses CI's controller classes, URI routing, input libraries, model classes, XSS filtering, view loaders, etc. A system like Drupal or Joomla makes their own PHP classes to handle this...Expression Engine uses CodeIgniter.

So do you see now why your approach is perhaps a bit misguided? You would be smart, IMO, to sit down for a week and read this:

http://www.tuxradar.com/practicalphp

Given your programming history, that will get you totally in tune with how PHP works. This will prepare you for the next few days (which is all it should take) in which you can get acquainted with CodeIgniter. They have an exceptional user guide here:

http://ellislab.com/codeigniter/user-guide/

Alternatively, you can take a look at a very similar framework that was actually extended from CI a while back called Kohana:

http://kohanaframework.org/guide/about.kohana

Now, once you've got the basic idea of how PHP works and how frameworks work inside PHP, you can, if you want (I wouldn't...actually, I did and now I kind of regret having done so), download the Drupal or Joomla core to see how their whole content management system works. Joomla, for example, uses a bunch of core classes that ultimately do most of what CI does, but, as I said above, they built a massive(ly cumbersome) CMS on top of it.

Trying to make CI work within Joomla or Drupal is like trying to install a Ferrari's engine in a lifeboat on a cruise ship.

<b>Edit</b>

Ok it's really been bothering me that I can't come up with a good analogy here. In reality, it's more like installing a Ferarri's engine in a lifeboat on a cruise ship such that the engine punctures a hole in the side of the ship. It's also like trying to install a steering wheel on a horse by burrowing a hole into its brain. There's just no simple way to get the features of the two to work together without near-terminally crippling the other (or killing yourself trying to get it to work nicely).
#3

[eluser]tim042829[/eluser]
Thanks for the very thorough reply and the links. It is beginning to sound like
CI and EE are a best fit. I really appreciate the time you took to write your
reply

Smile I presume no horses were hurt in formulating the reply.
cheers
tim
#4

[eluser]treeface[/eluser]
Indeed! I'm glad to have been able to help. ExpressionEngine, from all I've heard, is EllisLab's flagship product, and as such I have heard not much bad about it. Something else you may want to look at is PyroCMS:

http://pyrocms.com/

This is run by Phil Sturgeon, who is very active in the CI community, and is quite an adept programmer, by my humble estimation. I haven't tried either of these CMSs, so use your best judgment (and research wisely), but given that they both work on top of CI, they are both viable options for you.
#5

[eluser]tim042829[/eluser]
Thank you again. More good stuff!
#6

[eluser]gowrav vishwakarma[/eluser]
Should try this
USING CI for joomla Extension Development




Theme © iAndrew 2016 - Forum software by © MyBB