Wednesday, February 15th, 2006

CFAjax: What it is and How to Use it

Category: Ajax, ColdFusion, Programming, Toolkit

<p> On DevArticles today, there’s a new article posted that looks a a seldom mentioned branch of the Ajax development family tree – ColdFusion integration – and a package that makes it possible, CFAjax.

This is for ColdFusion aficionados who want to use Ajax. Ajax is implemented in such a way that ColdFusion method calls on the server gets executed using JavaScript a la Ajax. This tutorial shows you where to get the code and how to implement it on your local server.

As you would expect, I will also describe an (extremely simple) to show how the code works. After this the reader may experiment with other samples provided by the CFAjax site. Some of the examples may not work immediately unless the virtual directory for testing is set up in a certain way.

The tutorial explains how to get the CFAjax package all set up on a Windows IIS server, including a screenshot step-by-step of what you’ll see along the way. From there, they give you the sample code you’ll need for both sides of the equation – the server script and the client-side Javascript to make the request. There are also a few other external Javascript libraries that you’ll have to include to get things up and running.

Finally, they cover the creation of the HTML file to work with the code already created. The end result? Two text fields that perform the math needed to add together the square roots of the two inputted values.

Posted by Chris Cornutt at 8:28 am
5 Comments

+++--
3.8 rating from 54 votes

5 Comments »

Comments feed TrackBack URI

“ColdFusion aficionados” – I sure hope that’s a joke.

Cold Fusion is an evil piece of crap, and deserves to die. :)

Comment by Yeah, right — February 15, 2006

Thanks for the post.

Coldfusion is a great, mature, high-level Rapid Application Development server-side language. To spread the word, it’s also possible (maybe obvious to some, but not others), to utilize Prototype.js and others like DOJO in the context of a CF app.

(As a background, unrelated to AJAX, all ColdFusion applications are J2EE applications, albeit indirectly. This makes it possible to integrate ColdFusion with Java, and J2EE JSP’s and Servlets. Also, while ColdFusion comes with the application server JRun, if you choose, instead of using the bundled JRun application server (by MM/Adobe), you can scale your application up to other servers BEA Weblogic, IBM WebSphere, etc. CF is J2EE Certified and can run on any J2EE certified server. What’s more powerful is you can leverage a lot of the work MM/Adobe has done to connect to Messaging gateways, etc, making it very easy to implement seemingly complex server-device interactions very easily)

With AJAX, mySQL, plus Coldfusion and a OO-related framework such as Fusebox, very compelling apps can be created in a very efficient, robust manner.

-Mark

Comment by Mark Holton — February 17, 2006

[...] Just when you thought I would never be happy with Ajax, I see there is an article about using ColdFusion with Ajax to produce websites. It seems finding Ajaxian.com was a major step forwards for me. Now, this CFML idea has (at last) fired a few brain cells and provided some inspiration. The article (thanks to Ajaxian.com where I found the link) has the following extract: [...]

Pingback by Why Dont You…Blog? » Ajax Cold Fusion — March 24, 2006

Thank you for finding this. You have rebuilt my faith in programming :-)

I had written Ajax off as an anoyance I had to learn to appease people tricked by the Web 2.0 hype but (slowly) I am learning that there are decent applications you can use it for. Linking it to CFML will be a big improvement.

Comment by WhyDontYou — March 24, 2006

What’s the best way you’d say to have Prototype.js available site-wide? or is it best to just do an include on the page that uses it? Anyone have seen any performance issues with either? Thank you – K

Comment by kumarka08 — June 19, 2008

Leave a comment

You must be logged in to post a comment.