CFM Templates And Remote CFCs - They're All Just ColdFusion Page Requests

Posted May 18, 2009 at 9:09 AM

Tags: ColdFusion

I think a lot of ColdFusion developers never stop and realize that ColdFusion itself provides a pretty awesome framework. Hooks into this framework are provided by the Application.cfc event handlers. These event handlers provide all sorts of potential for scope initialization, plugin development, security hooks, and complete and total control over page flow. Sure, Application.cfc is nowhere near as beasty as something like ColdBox or Model-Glue which act more like full platforms; but, I don't think the ColdFusion framework should be glossed over in any way.

One reason to believe that a lot of developers don't actively think about the inherent ColdFusion framework is that they think about CFM and remote CFC method calls completely differently beasts. Granted, remote CFC method calls do some additional packaging as part of the ColdFusion framework, but when it comes down to it, both CFM and CFC calls are just ColdFusion page requests. When you think about them in this manner, you can finally think about them in the context of the natural ColdFusion framework control flow.

 
 
 
 
 
 
 
 
 
 

Now granted, hijacking a remote CFC method call doesn't add any value in this particular demonstration. The point here was not to say that this is how the ColdFusion framework aught be leveraged; the point here was only to demonstrate that ColdFusion does in fact provide and out-of-the-box framework that is quite powerful.

From what I saw at cf.Objective(), the custom frameworks that people have developed are quite amazing! Heck, ColdBox itself looks more robust than most full applications I build - I have every intention to look into them and see how they can be integrated into my future projects. But, I also want to stay grounded and realize that they are building on top of an existing, powerful framework that ColdFusion already provides.

Post Comment  |  Ask Ben  |  Other Searches  |  Print Page




Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

May 18, 2009 at 11:05 AM // reply »
40 Comments

Maybe people are just impressed that CF8 lets you specify returnformat="plain" on remote method calls to let you get back a plain text response, since CFMX7 and before doesn't support returnformat and always wraps the response in a WDDX packet.

A few weeks ago I was working on a CFMX7 server and was disappointed when I realised I had to fall back to using a CFM page to wrap my CFC to get the response format I was after :P


May 19, 2009 at 2:42 PM // reply »
28 Comments

I moved to ColdBox for my framework, and never looked back.


May 19, 2009 at 2:51 PM // reply »
7,572 Comments

@Tim,

I saw Luis present at cf.Objective() on ColdBox and it looked really phenomenal.

When it comes to frameworks, however, I just want to make sure that things were not put in place due to any misunderstandings of how ColdFusion works. Not to say Luis would do that - he a freaking brilliant developer. I mean only to say that I want to make sure that things cannot be done more naturally in other ways.

I saw a bunch of things being auto-wired and auto-generated in all of the frameworks and I wanted to take some time and explore the idea that the inherent ColdFusion framework might make those things available in a more natural way.

I could be waaaay wrong :) But I figured it was worth exploring at some point.


May 19, 2009 at 3:08 PM // reply »
28 Comments

@Ben,

Let me first say, I appreciate what you are doing. I really think it's great how you'd like to code "All natural". I'm a big fan of keeping as much control as possible, and letting the language do what it was designed to do. (Rather then pump everything through a framework.)

But yet, at the same time, two weeks after you found jQuery, did you say "Gee, this is handy, but can I do this more naturally"? (This is an extreme example I know, because if anything jQuery makes things almost more natural.)

So in the end, for me I think as long as I'm not sacrificing a cleaner more "natural" solution, what ever gets the job done most efficiently wins.

..Also, side-note, part of what I like about Coldbox is how natural it feels once you get into it. As well as the fact you aren't tied to it, you can have part of an application using it, and another part not using it, without doing gymnastics. (Plus I'm hoping you'll start using it, so I can get your fascinating insight on that along with CF and jQuery. :)


May 19, 2009 at 3:45 PM // reply »
7,572 Comments

@Tim,

I 100% agree. I can write better programs with jQuery now than I ever could before! No questions asked. I suppose part of my hesitation is only that I don't know enough about the frameworks to see where the "pain" solution is.

In jQuery, for example, it's really easy for me to see what problems they are solving - easy DOM access / manipulation, unified event listening, etc.

When it comes to the CF frameworks, I guess I just need to dive in and try it out and see what problems they are solving. I think the problem is that my current application architectures are not big enough to have so much pain. But, if a framework can help me be MORE efficient, than I am all kinds of in favor of it :D


May 19, 2009 at 4:03 PM // reply »
28 Comments

@Ben,

The "Pain" for me was MVC. ColdBox kinda forces me to code that way. That and layout management, coming from FuseBox my apps feel naked without layout wrappers like I'm used to.


May 19, 2009 at 4:05 PM // reply »
7,572 Comments

@Tim,

Agreed - Layouts is something I would like to be forced to get better with too :D


May 20, 2009 at 3:41 AM // reply »
1 Comments

Thanks u r information


Post Comment  |  Ask Ben

Recent Blog Comments
Mar 20, 2010 at 12:07 PM
Drawing On The iPhone Canvas With jQuery And ColdFusion
Simply awesome. Saved my day. ... read »
Mar 20, 2010 at 9:00 AM
Building A Fixed-Position Bottom Menu Bar (ala FaceBook)
I would like to say thx for an easy way to create a bottom bar. I do have a ?. Is it possible to center the bar if i want to resize it to ex 85%. Regards Offenbach ... read »
Mar 19, 2010 at 7:26 PM
MySQL 3/4 - com.mysql.jdbc.Driver And allowMultiQueries=true
Thank you very much for this post. Adding allowMultiQueries="true" in context.xml didn't help until I added it to url as allowMultiQueries=true Good idea is to use prepared statements and it will he ... read »
Jim
Mar 19, 2010 at 4:49 PM
Nobody Puts Baby In The Corner!
Wow. This is like suddenly finding a support group for your secret shame. I'm not alone! I always liked this movie, even though it is extremely cheesy. I just wish Jennifer Grey hadn't gotten the ... read »
Mar 19, 2010 at 4:47 PM
Application.cfc OnRequest() Method Affects OnError() Arguments
@Jason and @Ben, I've been doing some CF9 refactoring on our systems and noticed an odd occurrence with onError as well. Found a way to work around my problem, but what I saw was... Background: Our ... read »
Jim
Mar 19, 2010 at 4:44 PM
Shoot 'Em Up Starring Clive Owen And Paul Giamatti
I actually enjoyed this movie quite a lot. It was different, certainly, but I think they were going for more of a Quentin Tarentino-"wow, that was weird"-vibe than an actual spoof. Once I realize ... read »
Mar 19, 2010 at 4:34 PM
An Intensive Exploration Of jQuery With Ben Nadel (Video Presentation)
Hey I guess the video is down. Is there anyway you can upload to youtube or vimeo or some other service? Greatly appreciated. ... read »
Mar 19, 2010 at 4:24 PM
ColdFusion CFPOP - My First Look
@Ben Thanks for the follow up! The root of the problem had to do with being able to trace bounced emails to specific records in a DB table. Let's say you run an email campaign and you get 1,000 bou ... read »