The Google Web Tookit (GWT) has become a very popular way to develop
Ajax applications. It allows Java developers to rapidly create Ajax
applications by leveraging their knowledge of Java technology without
requiring any knowledge of JavaScript. XForms represents an evolution
in the HTML standard, and allows for simple constructs to create
complex, dynamic behavior. Both GWT and XForms are powerful enough
to provide complete solutions to many problems. This four-part series
demonstrates how to use the Google Web Toolkit (GWT) and XForms
together to create a dynamic Web application. Part 1 looked at the
two technologies and how both had JavaScript underpinnings. Part 2
shows how to create a small application with two pages. One page uses
GWT to show a list of artists managed by a record company. The second
page uses XForms to display the albums recorded by a particular artist.
Part 3 uses GWT and XForms on the same page. It shows how to take
advantage of each technology's bindings to JavaScript by using
JavaScript to achieve interactivity between GWT and XForms. In this
installment, Part 3, we refactor the rock star application built in
Part 2. That application allows for record executives to manage
artists and their albums. We don't change any of the functionality
from Part 2; instead we change the implementation of that functionality
by mixing GWT and XForms together. You'll see how GWT can be easily
introduced to any existing Web page. We use a GWT-style Ajax call to
load the data dynamically and then use GWT's JSNI to dynamically
create the XForms model. This will allow you to simplify your page,
and you'll simplify it even more by using GWT JSNI to dynamically
create your XForms controls. Mixing GWT elements will not only
simplify the server-side code, it will create smaller initial pages,
with faster downloads and rendering. More Information
No comments:
Post a Comment