This section provides an introduction to the various technologies and designs
on which IT Mill Toolkit is based: AJAX-based web applications in general,
Google Web Toolkit, and JSON data interchange format. This knowledge is not
necessary for using IT Mill Toolkit, but provides some background if you need
to make low-level extensions to IT Mill Toolkit.
AJAX (Asynchronous JavaScript and XML) is a technique for developing web
applications with responsive user interaction, similar to traditional
desktop applications. Communications between the browser and the server
can be done without needing to reload the page, but only small parts of
the data can be loaded, as necessary. This goal is archieved by the use of
a certain set of technologies: XHTML, CSS, DOM, JavaScript, XMLHttpRequest,
and XML.
AJAX requests can be made by using the
XMLHttpRequest API in JavaScript. The API is
available in all major browsers and, as of 2006, the API is under way to
become a W3C standard.
Communications between the browser and the server usually require some
sort of serialization (or
marshalling) of data objects. AJAX suggests the use
of XML for data representation in communications between the browser and
the server. While IT Mill Toolkit Release 4 used XML for data interchange,
Release 5 uses the more efficient JSON. For more important about JSON and
its use in IT Mill Toolkit, see the section called “JSON” below.
the section called “Special Characteristics of AJAX Applications” discusses
the history and motivations for AJAX-based web applications, as well as
some special characteristics that differ from both traditional web
applications and desktop applications.
Google Web Toolkit is a software development kit for developing
client-side web applications easily, without having to use JavaScript or
other browser technologies directly. Applications using GWT are developed
with Java and compiled into JavaScript with the GWT Compiler.
GWT is essentially a client-side technology, normally used to develop user
interface logic in the web browser. GWT applications still need to
communicate with a server using RPC calls and by serializing any data. IT
Mill Toolkit effectively hides all client-server communications, allows
handling user interaction logic in a server application, and allows
software development in a single server-side application. This makes the
architecture of an AJAX-based web application much simpler.
IT Mill Toolkit uses GWT to render user interfaces in the web browser and
handle the low-level tasks of user interaction in the browser. Use of GWT is
largely invisible in IT Mill Toolkit for applications that do not need any
custom GWT components.
See the section called “Client-Side Engine” for a description of
how GWT is used in the Client-Side Engine of IT Mill Toolkit. Chapter 8, Developing Custom Components provides information about the integration of
GWT-based user interface components with IT Mill Toolkit.
JSON is a lightweight data-interchange format that is easy and fast to
generate and parse. JSON messages are said to be possibly a hundred times
faster to parse than XML with current browser technology. The format is a
subset of the JavaScript language, which makes it possible to evaluate
JSON messages directly as JavaScript expressions. This makes JSON very
easy to use in JavaScript applications and therefore also for AJAX
applications.
The Client-Side Engine of IT Mill Toolkit uses JSON through Google Web
Toolkit, which supports JSON communications in the
com.google.gwt.json.client package. Together with
advanced update optimization and caching, IT Mill Toolkit is able to
update changes in the user interface to the browser in an extremely
efficient way.
The use of JSON is completely invisible to a developer using IT Mill
Toolkit. Implementation of client-server serialization in custom widgets
uses abstract interfaces that may be implemented as any low-level
interchange format, such as XML or JSON. Details on JSON communications
are given in the section called “JSON Rendering”.