CFX_CompareHTML ColdFusion HTML diff custom tag

Following on from my last post I have released Version 1 of my ColdFusion HTML Diff Custom Tag, CFX_CompareHTML.

2009-01-14 14:29:00.0

CFX_CompareHTML ColdFusion HTML diff custom tag

Following on from my last post I have released Version 1 of my ColdFusion HTML Diff Custom Tag, CFX_CompareHTML.

When we wrote Teamwork Project Manager one of my jobs was to compare versions of Notebooks which were marked up using HTML.

I did lots of searching and found Diff.cfc which did a line for line comparison but did not represent the changes in HTML format, it only output the differences line-by-line with all the HTML viewable.

Diff.cfc is perfect for text or source code but we needed something a little bit more user-friendly.

A great start on this was DaisyDiff,  a Java library that diffs (compares) HTML files.

The problem with this was that I had to use CFExecute and some timeouts, writing to the drive etc to get some results. It soon became a nightmare on large files so I decided the best thing to do was to build a CFX tag around the main components of DaisyDiff.

CFX_CompareHTML was born.

You can call the tag using :

<cfx_CompareHTML left="Some HTML content" right="Some more HTML Content">

The tag can be downloaded from here :

DOWNLOAD CFX_COMPAREHTML

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

Comments

Dan Vega said:
Great stuff but I have to say I am not a huge fan of CFX tags. Why not just use Mark Mandel's Java loader so that no tags need to be installed on the server.
Hi Dan,

Cheers for the comment! I will definately make a JAR file that can be loaded using Javaloader, infact that was the first thing I explored.

I have a hard on for CFX tags and find calling them easier ;-) I'll be posting up the source code any way so people can do as they please.

The best thing about Javaloader is the fact there is no installation head aches or restarting the service etc.

I'll try and get something up soon.

Dan.
Brian Klaas said:
This is great! Thanks for posting this (and for agreeing to post the .jar files so we can load them up with JavaLoader). Diff.cfc is a fine start, but when you need to do diffs on HTML-formatted text, it just doesn't cut it.
Your welcome Brian! Thanks for your comment.

Hope you find it useful,

Dan.
Hi All,

As promised, new blog post that includes a link to a JAR implementation and uses JavaLoader.

View it here

Dan.
Great that DaisyDiff is working well for you!
Hi Guy!

DaisyDiff is fantastic! Thanks for all your hard work on it! The more people know about it the better!

Dan.
Omar said:
Hi,
I'm trying to implement a CFX custom tag on a site. I'm having problems so decided to use your CompareHTML using your instructions and getting the same problem.

Everytime I add a jar file in the lib then regiter it through the admin I get the following: java.lang.ClassNotFoundException:CompareHTML

Location of jar file: WEB-INF ailolib
In the Railo Web Administrator
Name: comparehtml (also tried cfx_comparehtml)
Class: CompareHTML

I have also tried it on railo express just for a clean plate but again, I get the same error

Is there anything I'm doing wrong or further setup I dont know needed?

Thanks