introduction | background | functional overview
taakServlet
taakScript
raves
 
 
 

Introduction

We needed a framework for developing web applications quickly. Our middle tier is written in Java, so we want tools that integrate well with Java. We also want to be able to make changes to the web application quickly and easily. Recent years have seen an explosion of different web presentation technologies, each with its own strong points and weaknesses. The lessons learned from using these technologies were used in developing our framework. The key design criteria are:

• Integrate well with Java.
• Separate layout from logic and data.
• Allow rapid development.
• Easy to use for both the web designer and programmer.
• Easy to change.

Of the methodologies we examined, XMLC comes closest to a clean separation of HTML and code. The idea behind XMLC is to mark HTML tags with id and class attributes, compile the HTML into a Java class that wrap a DOM object, and write Java code to manipulate the DOM object. This establishes the set of id attributes and what data to populate the ids and which classes to ignore as the contract between the designer and programmer. The designer is free to change the layout without affecting the programmer. The designer can add mockup that is removed automatically when the page is compiled. This means the designer does not have to deliver two set of pages; one with mockup data to get approval for the look and feel, and one without mockup data for the programmer to finish. Since one set of pages is used for both purposes, there is no gap between what is approved and what is seen in the final application.

Using JSP, ASP, PHP and similar technologies, the designer must deliver two sets of pages, one with mockup data to check the look and feel and one set without mockup to the programmer. The programmer then manually cuts up the pages and adds his code to them. This process is error prone and the result sometimes does not match the original.
When changes are made to the layout, the process must be repeated. One of the lessons learned in developing web applications is that layout will change often. Making it easy to change the layout will save enormous amount of time in development.

While the code driving the web pages usually does not change as often as the layout, in a dynamic environment it can change frequently as well. This is where PHP and other scripting languages really shine. A well-designed scripting language allows much faster initial development as well as rapid changes. This is because scripting languages are more concise and target specific problem domains and do not require compilation. This is where XMLC falls short since the code to drive the pages is written in Java. While Java is a good general-purpose language, it is more verbose than scripting, requires compilation, and is not designed to drive web pages.

Taking the best of both worlds, Taak cleanly separates layout from code and allow the page to be scripted. The Taak scripting language is designed specifically to manipulate HTML pages as DOM objects and to seamlessly integrates with Java. A Taak script can instantiate any Java class and invoke any method in a Java class. This allows us to leverage our existing Java code base while enjoying the benefits of rapid development of a scripting language.

While Taak is expressive enough to solve the problems it is designed to solve, it is kept deliberately simple and regular. There are no funny symbols to memorize, no arcane syntax. Its simplicity and regularity make it clear and easy to learn, easy to use, and easy to maintain. In addition, its structure allows Taak to be easily extended.