Dan Mackey On ColdFusion Development

ColdFusion, Java, .NET, AJAX, DHTML development and general programming. Daniel is owner and Administrator of CFTagStore.com and works for an Application Development Company in Ireland called Digital Crew. His interests cover all areas of programming in multiple languages with a particular interest in Internet Technologies.

All Articles tagged : AJAX
2006-07-29 12:38:00.0

ColdFusion And AJAX Organizational Chart - Beta

About 2 weeks ago before I started my , I worked on a quick proof-of-concept ColdFusion and Ajax enabled Organizational Chart widget.

My main aim was to create a widget that would render in modern browsers and would allow the adding of nodes to the chart using AJAX so the whole page didnt have to be reloaded.

I faced some interesting problems:

  • I wanted to use pure CSS and DIVs but soon found out this was impossible for the moment so had to settle for a mix of CSS and normal TABLE elements.
  • The logic in finding the current parent to append new elements to needed quite a bit of thought to work on all browsers.
  • Deleting nodes a few levels up had to take sub-nodes into consideration.
  • The user-interface had to be very simple and in context with each node.

I decided on the following:

  • I created a custom tag which runs using recursion. This allows the whole chart to be generated using one line of code and you can choose which node to start rendering from.
  • Because the chart is built using a recursive custom tag and I can choose any start node, implementing the AJAX was easy, easy easy.... All I have to do when an add node icon is clicked, the parent node id is passed using AJAX and the custom tag is called with a start ID of the passed parent and the returned HTML is rendered without reloading the page.
  • I used the extremely handy CFSAVECONTENT to render the HTML from the custom tag and simply return the resultant variable. This made the code really easy, flexible and readable.

The main way to use the tag is:

  • To create a node, you click the Add Node icon from the parent node.
  • To edit a node, you double-click an existing node.
  • To delete a node, you click the Delete Node icon on the node to be deleted.

The editing of nodes is not complete. I envisage this to dynamically create a text area in the node and update the TEXT of the node on the fly using . Another option in the future would be to pop-up a menu that allows you to change the TYPE of node.

Things I would like to see added:

  • Panning of a VIEW area for large charts
  • Ability to change each nodes type
  • Add the ability to render each node with rounded corners using the brilliant NiftyCude library.
  • Ability to export the chart in a variety of formats : graphics or PDF

The funny thing is, I developed this 2 weeks ago on one of my 3 hour after-work learning stints where I generally read new things through blogs or try proof-of-concept ideas that may help in future projects. About 2 days ago, I got an email from someone through who had an idea for a CFOrgChart type tag/application with the same ideas I had planned.

Funny how things happen...

Now the fun part...try the demo : demos/cforgchart/index.cfm

PS: Please use with care and dont ruin it for other people by deleting all nodes. This is only a demo and I havent performed any checking or locking of nodes yet.

PPS: Can someone (Karl :-) ) check this on Safari and report back?

Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [12] - Leave a comment
2006-07-06 11:59:00.0

Latest Project : ColdFusion + AJAX = ColdJax

I am just about finished phase one of the latest Digital Crew project.

We were asked to develop an application to manage submissions of timesheets from indivual contract workers which would feed into the existing clients Intranet (also built by Digital Crew - using our Teamwork Intranet engine).

This is the type of project I love getting passed by my desk. - Where you can innovate. I decided for this project I would make it completely AJAX enabled. 90% of the requests to the server are made behind-the-scenes using AJAX. The user interface is very Web 2.0-ish with big text and buttons and also benefits from keyboard short cuts etc

I took our standard application engine and spent the first 2 days re-writing segments of the framework to communicate with the server entirely using AJAX. The next step was to figure out the various modules and UDFs I would need to maximise code re-use.

Every major widget is called using CFMODULE and controlled by simply passing attributes. This gave me enourmous flexibility and in the future if we need to upgrade some functionality or extend a widget, there is only one segment of code to re-write.

Another aspect I wanted to do right from the start was the layout code. Every part of the application re-uses classes in the global style sheet. Before I would have added and added to the CSS as I needed some styles but with a bit of planning from the start, I identified the main style blocks and wrote more modules (custom tags) to encapsulate them all.

For example, the main modules are:

  • A button module with different colouring and ability to accept href or js functions
  • A timesheet widget module
  • A page turning module
  • A timesheet printing module
  • A tooltip module
  • An encapsulated object based AJAX library
  • An invoice capture module

Overall the satisfaction in writing this application out-weighed the total hours I put into it. Although debugging was alot harder than a traditional application, the AJAX portions actually saved me lots of time!

Tags: AJAX | ColdFusion | My Work
Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [1] - Leave a comment
2006-06-12 21:52:00.0

Thoughts On Flash, AJAX and ColdFusion

Peter and myself meet up regularly outside of work for a coffee and wild ramblings on the direction our development should be taking. We discuss upcoming technologies, applications that interest us aswell as arguing the finer points of whether Flash or AJAX should be used when creating online applications. What will happen to ColdFusion, etc etc

We had such a discussion today and debated the pros and cons of each. It went along these lines:


Flash is great but it is not wonderful in all ocassions. It has the potential to beat AJAX to a pulp but the sluggy controls make it painful to use. The sluggy controls I am talking about are things like Scrollbars, Buttons, Grids etc

Flash has also got a big enough learning curve if you come from a pure programming background and seems to be designed more for graphic designers than normal programmers. I know this is a brave statement but look at the Flash Development environment. You cant really start with a blank code page and work away. It is getting there though. BTW, the programming gone into the Flash IDE alone is superb!

Flash is perfect for things like Image manipulation and small widgets used in conjunction with HTML and Javascript. Its cross-platform and has a huge user base. Write once, deploy on different platforms with one code base.  Relatively secure code wise although unfortunately there are SWF decompilers available :-( The only true RIA Flash app I was impressed with was Yahoo Maps Beta


Easy to learn and easy to use. The problem is all the different browsers and platforms need specific implementations. It cant access the local file system and cant do image manipulation particularly well. It is a good light weight tool for quick widgets where Flash would be overkill. I think Googles implementation of AJAX is the best out there. Gmail and Google Groups truely impress me. I often wondered about the pain involved in managing these apps with all the different browsers and platforms and code forks until I read about Google Widgets and realised they wrote everything in Java and their platform converted everything into AJAX enabled HTML code.

I suppose in a way ColdFusion is like that. Write in CFML and its interpretted/compiled into Java servlets. A good way to abstract things.


We love it. But where is it going? Are Adobe going to ruin it? Was Macromedias decision to integrate it more with Flash the right direction to take it?

Will it eventually be stopped and integrated completely into Flex? I hope not.

ColdFusion is a great Application Server and has continued to stay ahead of BlueDragon. CFML is a great language and in my opinion the best choice for web applications. For pure and utter RAD development, ColdFusion is the way to go. If you need something extra you can call in Java using CFOBJECT or write a CFX tag in C++ or Java. I wouldnt pick any other language over it! We have used it for 6 years and recommend it everytime a new project comes in the door! The time saved building a project more than makes up for the license cost!

Forget Ruby On Rails and PHP etc but ASP.net is looking interesting. I kinda like the whole .net idea. Maybe CFML should be developed more as a language rather than trying to trying to put the kitchen sink into the Application Server. One thing that could be improved is its handling of data types... 

I noticed over the last 2 years Ben Forta has started to push Flex more in his blogs (as well as mobile technologies) more so than pure ColdFusion. I feel sad about that. Ben was the main evangalist of ColdFusion and it was nice to have someone like that presiding over the technology. I always found Ben very approachable via email and the few times I met him and liked to think of him as pure  ColdFusion but I realise what areas Adobe is pushing and hence Ben pushing them. I also found this sense of loss when Charlie Arehart left New Atlanta. Charlie was a great guy for helping the community and everytime we had an issue with BlueDragon he literaly got back to us straight-away and followed up until the issue was resolved. I think ColdFusion needs someone like that back in the community.

Which brings me to summing up what I have begun to notice in the last few years. The ColdFusion community is lacking support and resources.The community seems to be revolved around a small few people. EasyCFM used to be full of steam but has almost fallen off the radar. I wish I could help in some way. Maybe in the future I can.

The ColdFusion Exchange used to be HUGE back in the Allaire days but since being turned into a Rich Internet Application (pah..) its a joke. BTW, this is exactly the WRONG way to design an internet application. Sloooowwwww widgets and no right-click-open-in-new-window that piss people off!

Tags: AJAX | ColdFusion | Flash
Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [3] - Leave a comment
2006-05-17 21:04:00.0

Google Web Toolkit Released....

Google have released their Widget Library to help developers make Web 2.0 applications faster and easier.

The toolkit is the standard Google kit used to make GMail, Google Groups etc

Plenty of online demos. First impression is that they look very basic but as you play with them and start thinking how you would do it, you begin to realise the power of them.


May look into this toolkit for an upcoming Web 2.0 app Peter and myself are planning...

The fact that they are cross-browser with no loss of functionality is the best bit. They also have a nice tool that allows you to write your AJAX apps in Java and they have a tool that runs through and converts your code to cross-browser compatible DHTML.

Add to your del.icio.us    DIGG This!    Technorati Cosmos Link    Post to Reddit    Add to your Furl    Add to Blinklist
Comments [0] - Leave a comment