Dojo toolkit has pagination widgets that support client side
pagination, where in the complete result set is passed as payload to the
client. However in this example the complete result set is too huge to download
to the client side. Hence a new pagination widget was developed to support
paging through result set on the server.

This article demonstrates how the two components Dojo and
Spring MVC can be used to complete a web based interaction to deliver a Rich
Internet Application(RIA). The dojo widget provided rich User interface and
Spring 3 MVC provided the RESTful service implementation to feed data to the
widget.

Spring framework, an open source
Java EE based application framework has come a long way from just being an
inversion of control (IOC) container. With Spring 3.0 introducing RESTful web
services in its Model-View-Controller (MVC) layer, it has provided a consummate
extension for building Web 2.0 applications. Amalgamated with Dojo widgets,
Rich Internet Application (RIA) can be rapidly build and tested. The
paper demonstrates how a use case such as server side pagination can be
designed and developed using Dojo widgets and RESTful service implementation
using Spring 3.0.

Introduction

Many other articles on Spring framework has already
highlighted the advantages of using Spring as the ideal framework for web
applications. There are also articles that focus on how RESTful services can be
build with Spring 3.0. This articles show cases how the two open source modules
- Dojo toolkit and Spring 3.0, can be employed to supplement each other in
delivering a Rich Internet Application (RIA).

Dojo widgets

Dojo widgets are interactive components that run on a
browser and are build using JavaScript, html templates and Cascading Style
Sheets (CSS) styles.These widgets
provide user interface representing information that is commonly fetched by employing
the JavaScript XMLHTTP request.

The following Dojo Toolkit 1.6 widgets are used in the
example that depicts server side pagination

dijit.layout.ContentPane

dijit.form.Form

dijit.form.TextBox

dijit.Tree

dijit.tree.ForestStoreModel

The following custom widget was build to support server side
pagination

ibm.widget.Paginator

RESTful Services

Representation
State Transfer
(REST)is a client server architecture
that uses HTTP based request ad response to representstate of a resource. It is stateless. The
resources are identified by URIs. The information is represented either in
HTML, XML or JSON.

In the example used in this blog the following REST URI are
illustrated