Tuesday, November 1st, 2005

Taconite 1.0 Released

Category: Toolkit

Ryan Asleson and Nate Schutta have released Taconite 1.0.

What is Taconite?

Taconite is an Apache-licensed open source framework that is based on concepts from the W3C DOM Level 3 Load and Save specification. Taconite aids in the development of Ajax-enabled applications by allowing the developer to specify new or updated content as XHTML.

Taconite automatically updates the current Web page’s DOM based on the XHTML supplied by the developer. As such, Taconite eliminates the need to write document.createElement and document.appendChild statements to update the DOM following an Ajax request.

Better yet, Taconite takes care of the quirks that exist among modern browsers. Have you ever tried to dynamically create a radio button in Internet Explorer? It can be done, but only if you know the correct work arounds. Taconite shields this and other browser quirks from the developer.

Taconite includes a client-side library that encapsulates the details of creating the XMLHttpRequest object, building the query string that is sent to the server as part of the request, and the handling of the server response. Using Taconite, an Ajax request can be created and sent with as little as 4 lines of JavaScript code!

Unlike other frameworks, Taconite can be used with any server side technology, be it Java EE, .Net, PHP, and others. As long as the server can generate some XML, it can be used with Taconite.

Client Side Example JavaScript

<script type="text/javascript" src="/js/taconite-client.js"></script>
<script type="text/javascript" src="/js/taconite-parser.js"></script>

<script type="text/javascript">
function doEcho(url) {
	var ajaxRequest = new AjaxRequest(url);
	ajaxRequest.addFormElementsById("name", "age");
	ajaxRequest.addNamedFormElements("gender", "tools");
	ajaxRequest.sendRequest();  //Send the request

Server Side XML Return

The client side world understands specified XML return types. This means that your server side code just needs to return something like this:

<taconite-root xml:space="preserve">
  <taconite-replace-children contextNodeID="echoResponse" parseInBrowser="true">
	Your name is: [insert name]
        <br/>Your gender is: [insert gender]
        <br/>Your age bracket is: [insert age]
        <br/>The tools you use is/are: [insert tools]


Posted by Dion Almaer at 4:46 pm

3 rating from 5 votes


Comments feed

This one kewl. I’m waiting for something like this.

Comment by hairiemx — November 2, 2005

Nice, but should server side script/servlet know UI (taconite-replace-children contextNodeID=”echoResponse”)???

Comment by Lukasz — November 2, 2005

Yes, the server side script does need to know about the UI, at least as far as to tell it what should be done with the content. In most cases a server script is needed for each Web page, so it’s not a stretch to require one for updating a specific portion of the Web page.

One advantage of this approach is that multiple areas of the Web page can be updated at once by simply using multiple actions.

Comment by Ryan Asleson — November 2, 2005

Sounds like HTML Overlays ( http://disruptive-innovations.com/zoo/20040830/HTMLoverlays.html ).

Does it hook up events automatically?

Even better would be to hook up behaviors automatically, so that you could define custom HTML widgets with javascript bindings.

Comment by Julien Couvreur — November 2, 2005

Taconite does not hook up events automatically. The developer needs to hook up to some sort of event.

Taconite is very flexible, since the developer can specify any XHTML to be created or updated. Thus, it would be easy to create custom HTML widgets from Taconite.

Comment by Ryan Asleson — November 2, 2005

In conjunction with the behavior library (http://www.ccs.neu.edu/home/dherman/javascript/behavior/), you could easily hook up Taconite to events using clean, rules-based selection, and get the benefit of separating your logic from the presentation.

Comment by LTrain — November 3, 2005

I can not suff http://taconite.sourceforge.net/, it ask me password :-(

Comment by t800t8 — November 3, 2005

“Behavior” is a great library. But I think it’s better for hooking up behaviors at initialization time than on newly injected elements.
I’m not sure what happens to the elements that are already hooked, when you call Behavior.register(rules) a second time.

Comment by Julien Couvreur — November 4, 2005

You would call Behavior.apply() to register any dynamically added or removed elements.

Comment by LTrain — November 4, 2005

I have created new taconite parser. It does the same job as original taconite parser but faster.
Please visit http://www.hairiemx.com/index.php?q=node/30 for more info.

Comment by hairiemx — November 23, 2005

Leave a comment

You must be logged in to post a comment.