AJAXWorld News Desk
ajaxCFC port for the Model-Glue Framework
How do you incorporate Ajax requests to the Model-Glue framework?
Jan. 16, 2006 12:00 PM

The latest fad in the
Model-Glue list has been AJAX. How to incorporate Ajax requests to the Model-Glue framework. Is it pointing directly to the model? To the controller? or going thru the full cycle by pointing to index, then controller, model, back to the controller, and passing arguments back to the view?
I ported ajaxCFC to work with Model-Glue and it came out great. It works just like any other MG event, where you have to define it in the config.xml, create a listener, use the controller, models, and views... it's beautiful. All ajaxCFC's add-ons like security and debugging work file. Request batch, complex objects, verbs, and sync requests possibilities still apply.
You can see it in action
here. To make this example work you need to download the head revision from the Model-Glue framework. The only reason why the stable release would not work is that you cannot suppress debugging in a template-per-template basis.
I added the
MG-echo example in the main ajaxCFC download, which also includes a modified version of ajax.cfc and engine.js. I will try to combine the stand-alone version with the MG one in the future, but for now, I will support both of them separately.
Enjoy.
About Rob GondaRob Gonda is the CTO for iChameleon Group and Contributing Editor to AJAXWorld Magazine. He is an Advanced Certified Coldfusion Developer, member of the Adobe Community Experts, frequent contributor to the CFDJ and ADJ, frequent speaker at IT and developer conferences nationwide, co-author of Real-World Ajax Book, author of ajaxCFC, holds a BS in computer science and engineering, an MBA with a specialization in entrepreneurship, and he specializes in Rich Internet Applications and object-oriented architecture. You can reach him at rob[at]robgonda[dot]com and read his blog is at http://www.robgonda.com