AJAX - A battle between Spry and CF8 built in facilities

I have been working on a new project which requires AJAX functionality and unlike some projects have some more time available to try out alternate ideas. The result has been interesting, so I thought I would share it.

There are a number of pieces of funcionality planned and in almost every case there has been a choice of using a CF function or a Spry equivalent and I have come down in favour of the Spry equivalent.

[More]

CF7 to CF8 difference

CF8 just gave me an error in some code that ran OK on CF7.

The error message is:

coldfusion.compiler.ASTsimpleVariableReference cannot be cast to java.lang.String

Which was caused by the use of a variable as an index in a loop. This would have taken ages to find but for a blog posting by Mike Rankin, thanks Mike.

Scaffolding progress

I finally got time to work on this again after a few weeks of hectic madness, which included passing my Coastal Skipper exam and visiting my sister for a weekend. I spent Sunday afternoon and yesterday evening generating code using the ColdSpring Templates and finding the bugs in the generated code. Then I found the place where the bug was generated and fixed the template.

Its quite tedious as on my laptop it takes a couple of minutes to regenerate the application with my test database.

I have uploaded what I have done so far to SVN as it makes my life easier to download it all from SVN onto the various machines I have to test it on. There are probably still bugs in the ColdSpring templates and I know that in the process I have broken the Reactor Templates.

I also changed the order that code is generated in. This is mostly for my own benefit as I was finding it difficult to find things. In the past code in the circuit.xml file was generated in order of fuseaction then object. Now its in alphabetic order of object then fuseaction. This means that all the fuseactions related to a particular object are next to each other.

The new Fusebox 5.5 will be realesed on December 1st so I am working to get my changes and fixes complete by them but I suspect the scaffolding will still be in Beta at that point as I haven't had as much opportunity to test as I would have liked. I been installing new servers or updating old code to later versions of CF rather than developing new code.

You can get the latest code version from SVN at: http://svn.fuseboxframework.org/framework/branches/dev/extensions/scaffolding

New Books from Peachpit and new sitepoint Blog about CF

I had a note yesterday from Jackie Hill of Peachpit with details of a some new books that they are releasing this month.

Ben Forta's bestselling ColdFusion book has been updated for version 8, Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started. May well be of interest to my readers. I checked on Amazon and they also have Volume 2 and Volume 3 of the book affectionately known as CFWACK. I have posted links to all three volumes in the right hand menu bar.

With so much new stuff in CF8, Ben has had to split the book into three volumes. The pricing is also interesting since Volume 1 is way less than the other two. Maybe Adobe are getting the point that there needs to be a better path into CF for beginners.

On publicising CF. I see that Kay Smoljak is going to be blogging about ColdFusion at SitePoint. They regularly feature interesting articles about web site development and I often read with interest the articles on Javascript, AJAX, Search Engine Optimisation and CSS issues.

Can Adobe make ColdFusion hot (again) or not?

I just read an interesting article on ColdFusion in Computerworld. It highlights the recent improvements in CF8 and its positioning for Web 2.0.

Offline CF Applications Demo At MAX 2007 in Chicago

Rob Brooks-Bilson has blogged about the sneak peek of a possible new tag in CF which allows the creation of an AIR application from the CF Page. The application has ability to work offline in disconnected mode and upload the data when next connected.

Fantastic! Will it be released soon or do we have to wait for Centaur?

What is Scaffolding and how do I use it? - Part 1

You need scaffolding!

So you read something somewhere that said you should be using scaffolding and want to know how? Let me tell you a story.

ColdFusion has been developed to make creating applications easier right?

[More]

TVCFUG - CF8 on the 8th of the 8th

ColdFusion 8 has now started shipping. Come along to discover and discuss the new features that make this new release a must have upgrade. We will be showing an exclusive Video specially prepared by Ben Forta for user groups.

* Where: Phones International Network House Globe Park Marlow SL7 1LY
* When: Wednesday 8 Aug 2007
* Meeting starts: 19:00
* Meeting ends: 21:00

Some of CF8s new features include:

* Performance increases
* Server Monitor
* PDF features
* Ajax features
* .NET integration
* Microsoft Exchange Server integration
* Interactive debugger
* Adobe Flex integration
* Per-application settings
* Multi-threading
* Image manipulation
* Presentations on demand
* Atom and RSS feeds
* ZIP and JAR file features
* User-based Administrator and RDS access
* Improved file manipulation functions
* JavaScript operators in CFML
* CFC improvements
* Strong encryption libraries
* Reporting enhancements
* Database interaction improvements
* Argument collections
* Array and structure creation improvements
* Expanded platform, OS, and database support

Come along and see why you just have to have this new release. More details on the UKCFUG web site.

Thames Valley CFUG - Object Oriented ColdFusion

At the last TVCFUG meeting there was a request for a meeting to cover Objected Oriented development in ColdFusion. At CFUnited, in Washington last month, I saw three presentations on OO Programming.

Nick Tunney did an Introduction to OO Session, then Hal Helms told us all about using CFCs with OO while Matt Woodward took us through the subject from Back to Front.

If you are intested to know more please come along to our meeting on 25th July where we will be reviewing the material they presented and discussing the best way to use OO techniques in your ColdFusion code.

If you are interested please register on the TVCFUG web site.

CFUnited - Advanced AJAX Development - Rakshith N

I went to another CF8 session with Rakshith N who was covering some of the new AJAX features.

CF8 now has an easy way to handle JSON. JSON is Javascript Object Notation and represents the data in Javascript. Based on array and object literals. It is less heavy than XML.

{ books:[
{isbn:'00230', title:'xyz'}
{isbn:'00231', title:'abc'}
}

CF8 has new functions to deal with JSON

  • SerializeJSON()
  • DeserializeJSON()
  • IsJSON()

When CF8 creates the JS data types, simple types remain as simple types, Arrays and Structs get converted to JS arrays and JS Structs.

There are two different formats of Query, Row format and Column format.

AJAX Plumbing

Essentially when we use AJAX some area of the page will be updated by a call to the server from a Javascript program. There is some HTML markup for the area of the page we want to update. We can now define an AJAX region with a cfdiv tag. cfdiv uses the bind parameter to link to a cfc or cfm page that will be called to create the content for that area of the page.

<cfdiv bind ="url:foo.cfm">
OR
<cfdiv bind ="cfc:bookData.getBookDetails({bookForm.isbn.value@change})">

There are four types of bind

  • CFC
  • Javascript
  • URL
  • Plain

A new cfajaxproxy tag will create a JS proxy for a cfc method, allowing you to call the cfc from within javascript.

A ColdFusion object in the client JS code can be used to get information from ColdFusion. For example you can use "ColdFusion.navigate" on a link to make it download a JSON object from the server.

Other examples:

ColdFusion.Ajax.submitForm(fomnId, url, callBasckHandler, errorHandler, httpMethod, asynch)

ColdFusion.log.dump(message.component)

In addition there are now AJAX versions of the tree and grid controls which can replace the Java versions in earlier CF.

<cftree name="mail" format="html" completepath="true">

There are tags to do layout like the flash form layout tags.

<cflayout type="border">

<cflayoutarea >

CFUnited Day 2 - CFML Enhancements - Rupesh Kumar

Yesterday there were a few problems with the network connections here at the conference. It seems thay have 4 lines this year versus the one they had last year but its still overloaded.

The first session I attended was a session on CFML enhancements by Rupesh Kumar one of the Adobe CF Developers.

[More]

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.