The AJAX Framework jQuery is considered one of the easiest to use and most light libraries. Particularly the expandability via plugins has moved multiple developers to develop various Open Source expansion tools. This article deals with the jQuery Taconite plugin in conjunction with Zope.
The claim in the slogan of the jQuery developers "jQuery: The Write Less, Do More, JavaScript Library" is certainly not exaggerated. Rarely was it this easy to create cross-browser Javascripts and still retain a certain overview.
Nonetheless, the developers who are used to generating web applications logic using server technologies are having difficulties to cope with the syntactic challenges.
In this article we want to show that it doesn't require so much as a single Javascript line in order to generate impressive effects on the client side. We want to prove this using an example: a click on the client side is supposed to request the sitemap of the website from the server. The result should then be embedded in a particular part of a document.
One prereqiusite for this example is that the jQuery library and the Taconite plugin are embedded in the website (see Resources). The following HTML code should be placed in the <head> tag of the HTML page.
Clicking on the link triggers a
XMLHTTPRequest to the URL
/tutorials/taconite/sitemap. Here it is necessary to observe that merely this query needs to be triggered via the Javascript code. The rest is processed by the Taconite plugin. You can test this functionality by clicking on the hyperlink in the rendered view below.
The DMTL method sitemap generates a Taconite XML document. This document contains the commands and the source code for the sitemap to be embedded.
This code is intended to trigger the following:
The Taconite plugin is a tool with which one can define very declarative client-based effects. The good readability of the Taconite commands brings a small amount of source code over head when compared to the even more compact jQuery syntax. Nonetheless, the benefits are obvious: