ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Coldfusion and PHP (expressionengine) - Having and eating cake

October 23, 2007 3:31pm

Subscribe [4]
  • #1 / Oct 23, 2007 3:31pm

    webdev7

    16 posts

    Hi,

    I’ve been looking for a better CMS solution for sometime, and have heard many good things about EE. My strongest server side skills are currently in Coldfusion, but EE hits the sweet spot in terms of functionality, usability, and price vis a vis most of the Coldfusion based CMS’s I have looked at. I’m definitely willing to learn PHP as necessary to make things work and/or extend EE, but would prefer to continue most of my development in Coldfusion.

    So I’d like to bounce these thoughts off you. Would it be feasible to use EE for the CMS related functions of a site, and Coldfusion for the rest? And in pages where you want to use both, is it feasible to pass coldfusion variables or pages to PHP and vice versa?  Or is it possible/feasible to configure a server to first process a page through Coldfusion and then PHP, or vice versa, automatically without resorting to code to do this? Here of course, speed is the main concern.

    I’d appreciate all comments, but am especially interested in those that have experience with this or special insight into feasibility.

    Thanks.

  • #2 / Oct 23, 2007 3:57pm

    Derek Allard

    3168 posts

    Welcome to EE… and with a great title to “having and eating cake”.  Love it.

    First, the good news.  Your knowledge of CF will have some translation into using EE.  As ColdFusion has CFML, and we have an ExpressionEngine specific syntax as well.  So conceptually, you’ve got a good headstart.  Learning PHP is absolutely not needed, but if you do know PHP you can push EE even farther.  That said, many, many, many EE developers don’t know PHP, and are able to bend and shape their sites with EE without problem.

    Now the catch.  I’m not aware of any nice ways to run both PHP and ColdFusion on the same site.  Even if it is possible, I suspect the complexity it introduces would far outweigh any beneficial benefits.  The only “clean” way I can think to implement this would be to use a subdomain.  So run EE on http://ee.yoursite.com and run CF on http://cf.yoursite.com... but the two won’t communicate nicely with each other.  To directly answer your question, I can’t see how EE and CF could both be used on the same page.

    I think you’ll find though that as you get into ExpressionEngine, you’ll find yourself desiring ColdFusion less and less, and in my opinion, the transition would be a natural one for you.  That said, don’t take my word for it.  You can download EE for yourself to play with for free, or even better yet, do a $10 1 month trial and really push the limits.  Both of these options are available at try ExpressionEngine.

  • #3 / Oct 23, 2007 4:30pm

    webdev7

    16 posts

    Hmmm. I was under the impression from other sites that it is possible to have both PHP and Coldfusion installed, even passing information from one template to the other. Basically, if a php template calls a cfm template with variables passed in the URL, it should work no problem. Possible, but likely not feasible.  I do suspect its not possible to have automatic processing of the same template by both application servers, but perhaps others have input on this.

    I agree that using the EE tags in XHTML should come as second nature coming from a CF background. I will likely try the $10 trial, but wanted some opinions first.

    One thing is certain, EE has speedy and helpful support, very refreshing! Thanks!

  • #4 / Oct 23, 2007 4:38pm

    Derek Allard

    3168 posts

    You’re very welcome, and I’m glad for whatever little bit I was able to help.

  • #5 / Oct 23, 2007 8:47pm

    draymond

    22 posts

    Hi webdev7:
    I read your post about CF/EE with interest. I was just contemplating the same questions and wondering what sort of posibilities or nightmares would result. I do exclusively CF, but have several EE sites where I have tried to add a little php, but it’s a bit larger curve than I anticipated.

    Though I have not done it, I know a lot of people are running CF and PHP on the same windows box, but I don’t know the extent to which they are running both for one site.

    There is an interesting project at http://scripting.riaforge.org/ called Scripting for ColdFusion 8, which claims to allow PHP and Ruby to run within a CF custom tag like <cf_php>. (CF8 only because it relies on Java 6) I’d love to talk to someone who is using it.

    It seems intuitive that you could have a CF page and make a cfinclude call to a PHP page or an EE template, which would run through it’s own parser and just come into the CF template as html. But that probably just shows how ignorant I am of web server processes.

    Anyway, I’d love to know more about what you are doing, and compare notes on what you find out.

  • #6 / Oct 24, 2007 12:54am

    webdev7

    16 posts

    draymond,

    Definitely interesting. I did a search on <cf_php> and came up a fair amount. I think it’s just going to take some experimentation. The concept of including an EE template, or part of one where needed, is just the idea I was considering, and this custom tag may allow it. Until I get into EE though, it will be hard to tell.

    There really isn’t much more to tell about what I’m doing. Just a mix of both, as needed, for the right functionality. I’ll post back here as soon as I’ve had a chance to try some things. Please do the same yourself if you give it a go, or if you find other methods for accomplishing our shared goal.

  • #7 / Oct 29, 2007 1:40am

    Brett Gullan

    70 posts

    Hi webdev7,

    You can certainly run PHP and CF on the same server—IIS or Apache. CF runs in its own application space, via an HTTP connector and either webserver can be configured to pass off requests for .php or .cfc/.cfm as necessary. However you won’t be able to share session data, etc.

    Once properly configurd, there’s nothing stopping you from using say:
      http://www.somesite.com/index.php/some/ee/section
    ..and…
      http://www.somesite.com/index.cfm?a=b&c=d
    ...within the same site. And as you mentioned, you can certainly pass data back and forth as url params or cookies.

    You would be also be able to configure CF to access the underlying EE database, but you’d need to become familiar with the SQL table structure used by EE.

    I don’t think including EE templates within CF (or vice versa) is going to work, as you will need to make another HTTP request in order to parse the template (in either direction) as a simple cfinclude does not generate a request. You might be able to use cfmodule, you’d need to check—I can’t remember off-hand whether that will work.

    A couple of things you could consider though:

    1) Using AJAX/AHAH to call one page (or page fragment) from within another.
    2) Develop your CF functionality as Web Services (using CFCs) and call that from within your EE pages (or custom modules).

    HTH

    Brett

  • #8 / Oct 29, 2007 12:11pm

    webdev7

    16 posts

    All great ideas to consider Brett. I appreciate your time to respond! I’ll look into them further.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases