| By Keith Douglas | Article Rating: |
|
| September 23, 2003 12:00 AM EDT | Reads: |
2,508 |
tagFusion is a soon-to-be open source Java servlet that runs on all J2EE compliant application servers — and uses CFML tags into the bargain. n-ary's Keith Douglas explains.
A Servlet For All Applications
Imagine working on any J2EE application server but at the same time being able to use your favorite ColdFusion tags! Currently, if you're using a J2EE Application Server such as Silverstream, iPlanet or WebSphere, you simply can't use the familiar CFML language. If you want to use CFML, you're tied to buying ColdFusion Server from Allaire, soon to be merged with Macromedia.
Now there's an inexpensive, or free, choice: tagFusion.
tagFusion is a Java solution that supports CFML. The tagFusion system is a pure Java 2.0 Servlet that runs on top of any Java Servlet enabled platform or application server. This includes any J2EE enabled environment, which many application server vendors support or are moving to support.
tagFusion was developed by n-ary (consultancy) Ltd. in Scotland to give us a quick and easy way to deliver Java solutions. Originally named TagServlet, we had considered open-sourcing it so others could use it but decided that the world didn't need yet another tag system thrust upon it and that it would be an uphill struggle to persuade developers to utilize our system and learn a whole new set of proprietary tags.
We had a think.
We considered supporting other tags and looked at what was already available in the market. There were a number to choose from, but the one that fitted the closest with our existing tag system was ColdFusion's CFML. Added to this, the ColdFusion interface is one of the best and most intuitive systems — relatively easy to learn and powerful in its functionality.
Outperforms ColdFusion
Over the past 6 months we've built a completely new engine that supports CFML files, yet outperforms ColdFusion.
tagFusion gives us the freedom to be able to employ ColdFusion developers as well as Java developers — a godsend in this climate of skill, especially Java, shortages. (For the hardcore Java developer we provided an extendable API. This allows developers to write their own bespoke tags that utilize the power and efficiency of the tagFusion system. The API allows developers to tie-in their custom Java classes to a custom tag for processing within a page.)

Figure 1 – tagFusion
Exciting Features
Initally, we had our own set of tags, largely for database interfacing, built on top of our main engine. However, we quickly realized it was only a short step to converting our system to use the CF library and, along with this redesign, we added some functionality lacking in the ColdFusion Server.
Three of these features were improved speed, nested queries, and database handling.
Speed
Speed is always the key factor when developing any server side application. Memory usage must be kept to a minimum by holding only the necessary data.
For example, when building a new dynamic page, ColdFusion builds the page completely in memory before it begins to deliver data to the browser. This places a significant load on the server in high transactional environments.
tagFusion does not suffer from this loading problem as it sends data to the browser as soon as it is available, holding only the bare minimum at any one time. This has the added advantage of providing a much quicker perceived response from the end-user's point of view.
This feature has been well utilized by one of our main clients, ShopSmart.com, who use it to great effect when returning shopping comparison results in realtime. Instead of waiting for the entire comparison result set to return, the browser displays each row as it is returned giving the user a much more interesting, and immediate, interactive experience.
Nested queries
One of the most common gripes from developers using our older TagServlet system was the lack of a nested select: it was not possible to create a second result set based on a first result set on the same page. Consequently, when we designed the new tagFusion system, we included support for nested CFQUERY tags.
While ColdFusion does not permit this feature within its CFOUTPUT tags, tagFusion supports as many embedded CFQUERY 's as there are available database connections.
Database handling
With any Website infrastructure, one of the most common tasks is interfacing and extracting data from a database. To this end, we paid particular attention to making this tagFusion function as fast and efficient as possible.
The database layer contained within tagFusion is an accumulation of 3 years research and development. The core database engine is centered on a very clever connection pooling and collation system.
If the Web is to utilize an interface to a database, it must be responsive. Addressing this system responsiveness involved us in a detailed rethink and analysis of how other technologies operate.
The simplest and easiest way to handle database queries is to run them in one block, store them, and then, when the necessary tag is reached, manipulate the data. This allows the server to manipulate the data as a single unit that reduces internal algorithm complexity. However, this approach is troublesome because of the amount of memory it demands to buffer a complete database result set.
While tagFusion's INSERT, UPDATE and DELETE operations work the same as in ColdFusion in that they are executed as soon as they are referenced, tagFusion's benefit is in how it deals with SQL SELECT statements.
When a CFQUERY tag is reached in ColdFusion it is run and the results are buffered in memory. Then, when the CFOUTPUT tag is reached, the data in memory is rendered for output.
In tagFusion a query is not actually run until it is called upon to output to the page. This has the advantage of not requiring the core tag engine to perform any unnecessary database queries — something which has pleased many database administrators at Nortel Networks who have been using tagFusion for the last year.
These are just three of tagFusion's many features that make it an attractive offering.
Reinventing the wheel?
But aren't the Java aspects of tagFusion just what ColdFusion v6 will be doing?
Even with the uncertainties raised by Allaire's merger imminent with Macromendia, the answer is probably, yes. However, a large number of Application servers are now J2EE compliant and tagFusion can be used with any of them, with the added comfort of being able to use familiar ColdFusion tags for rapid development.
tagFusion sidesteps the problem of single vendor lock-in which, before tagFusion, bound developers to the ColdFusion Server: a problem that ColdFusion users outside the USA are particularly sensitive to. tagFusion makes it possible to remain with your existing Java Application server — be it Silverstream, BEA, WebSphere, etc. — yet still have ColdFusion functionality, but without a ColdFusion Server.
And, with the the recent growth in the popularity of Apache and Linux, even large businesses that develop in-house are finding an ever-larger place for open source software.
tagFusion is right here, right now — plus, it'll be free! The plan is to open source tagFusion as soon as possible and n-ary is curently in dialogue with one of the world's largest open source foundations.
Links
ShopSmart
www.shopsmart.com
Published September 23, 2003 Reads 2,508
Copyright © 2003 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Keith Douglas
Keith Douglas, a senior developer at n-ary (consultancy) Ltd., has wide range of skills and interests. With a formal background in marketing, Keith helps develop and bring new n-ary products to market.
- 4th International Cloud Computing Conference & Expo Starts Today
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- Publishing Synergy: Blog, Twitter and Ulitzer
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- IBM Hardware Chief, Intel VC Exec Arrested in Insider Trading Scam
- Roadmap to Create Profitable Cloud Computing Industry
- Oracle-Sun: IBM Reportedly Behind Delay
- Virtualization Journal Opens "Readers' Choice Awards" Nominations
- Citrix Aims To Cripple VMware’s Cloud Designs
- Oracle Trashes HP Relationship for Sun
- Java Kicks Ruby on Rails in the Butt
- Interviewing Java Developers With Tears in My Eyes
- 4th International Cloud Computing Conference & Expo Starts Today
- Deputy CIO of the CIA to Keynote 1st Annual GovIT Expo
- Ruby-on-Rails Apps Get Cloud Lift
- Publishing Synergy: Blog, Twitter and Ulitzer
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Adobe Flex 4 Goes to Public Beta
- SingTel Throws in its Lot with the Cloud
- Adobe ColdFusion 9 and ColdFusion Builder Public Betas Now Available
- After Ubuntu, Windows Looks Increasingly Bad, Increasingly Archaic, Increasingly Unfriendly
- SCO CEO Posts Open Letter to the Open Source Community
- Simula Labs Launches Hosted Delivery Platform To Enable Enterprise Open Source Adoption
- Where Are RIA Technologies Headed in 2008?
- Source Claims SCO Will Sue Google
- How Open Is "Open"? – Industry Luminaries Join the Debate
- Latest SCO News is Plain Weird
- IBM Tells SCO Court It Can't Find AIX-on-Power Code
- SCO Claims Linux Lifted ELF
- Flashback: Investing in 'Professional Open Source' - Exclusive 2004 Interview with David Skok, Matrix Partners





































