Section A.11. Java Ajax Frameworks


A.11. Java Ajax Frameworks

Java has always had many wide and varied frameworks. With Ajax, we've seen new ones emerge, and we've also seen add-ons for the earlier projects. Two popular libraries have been the Ajax JSP Tag Library and Direct Web Remoting.

A.11.1. AjaxAnywhere (from September 2005)

AjaxAnywhere (http://ajaxanywhere.sourceforge.net) returns any set of existing JSP, JSF, Struts, Spring, etc., components into Ajax-aware components without JavaScript coding. (see the Quick Start Demo at http://ajaxanywhere.sourceforge.net/quickStart.html).

  • Does not break existing server-side MVC architecture.

  • Less JavaScript to develop and maintain. Absence of commonly accepted naming conventions, formatting rules, and patterns makes JavaScript code messier then Java/JSP. It is extremely difficult to debug and unit-test in multibrowser environments. AjaxAnywhere eliminates all these complexities.

  • Easy to integrate. AjaxAnywhere does not require changing the underlying application code.

  • Graceful degradation. Switch whenever you need to between Ajax and the traditional (refresh-all-page) behavior of your web application. Your application can also support both behaviors.

  • Open source license (Apache 2).

A.11.2. AJAX JSP Tag Library

The AJAX JSP Tag Library (http://ajaxtags.sourceforge.net/) is a set of JSP tags that simplify the use of Asynchronous JavaScript and XML (Ajax) technology in JavaServer Pages. This library eases development by not forcing J2EE developers to write the necessary JavaScript to implement an Ajax-capable web form. The tags are:


Autocomplete

Retrieves a list of values that matches the string entered in a text form field as the user types.


Callout

Displays a callout or pop-up balloon, anchored to an HTML element with an onclick event.


Select

Based on a selection within a drop-down field, a second select field will be populated.


Toggle

Switches a hidden form field between true and false and at the same time switches an image between two sources.


Update Field

Updates one or more form field values based on response to text entered in another field.

Open source license by multiple contributors.

A.11.3. AJAX Java Server Faces Framework

AJAX-JSF (http://smirnov.org.ru/en/ajax-jsf.html) will make any existing Java Server Faces applications use Ajax functionality. Most existing components can be used as is or easily converted to support Ajax.

  • See a worked example called MyFaces JSF Tree, with table scroller and a tabbed pane as Ajax components (http://smirnov.org.ru/myfaces-ajax/ajax.jsf).

  • Minimal differences from JSF specifications. This is proposal to the MyFaces project.

  • Open source license (Apache Software License 2.0) by Alexander Smirnov.

A.11.4. Direct Web Remoting (DWR) (from 2005)

Direct Web Remoting (DWR)(http://www.getahead.ltd.uk/dwr/) is a framework for calling Java methods directly from JavaScript code.

  • Like SAJAX, can pass calls from JavaScript into Java methods and back out to JavaScript callbacks

  • Can be used with any web framework: Struts, Tapestry, etc.

  • Follows Spring-like KISS/POJO/orthogonality philosophy

  • Being incorporated into next WebWork release (http://www.opensymphony.com/webwork/)

  • Open source license (Apache see http://www.apache.org/LICENSE.txt) by Joe Walker (http://www.getahead.ltd.uk/sg/space/joe/)

A.11.5. Echo 2 (from March 2005)

Echo 2 (http://www.nextapp.com/products/echo2/) allows you to code Ajax Apps in pure Java (see the demo at http://demo.nextapp.com/InteractiveTest/ia).

  • Automatically generates HTML and JavaScript

  • Coordinates messages between browser and server. Provides messaging in XML

  • Can hand-write custom JavaScript components if desired

  • Open source license (Mozilla Public License or GNU LGPL) by Next App, Inc. (http://www.nextapp.com/)

A.11.6. Guise

Guise (http://www.guiseframework.com/) provides an elegant server-side component architecture that doesn't require developers to write HTML or JavaScript (see the demo at http://www.guiseframework.com/demonstration).

  • A true application framework, written completely in Java

  • Allows developers to think in terms of component and events instead of HTML generation and DOM programming

  • Provides controls, modal dialogs, flyovers, and more

  • XHTML-compliant

  • Flexible commercial license, with free full-featured development version available for immediate download by Global Mentor Inc.

A.11.7. ICEfaces

ICEfaces (http://www.icesoft.com/products/icefaces.html) is a standards-compliant extension to JavaServer Faces (JSF) for building and deploying rich Ajax applications.

  • Smooth, incremental page updates with in-place editing and no full page refresh

  • User context preservation during page update, including scrollbar positioning and user focus

  • Asynchronous page updates driven from the application in real-time

  • Fine-grained user interaction during form entry that augments the standard submit/response loop

  • Commercial license by IceSoft

A.11.8. JSON-RPC-Java (from April 2004)

JSON-RPC-Java (http://oss.metaparadigm.com/jsonrpc/) is an Ajax RPC middleware that allows JavaScript DHTML web applications to call remote methods in a J2EE Application server.

  • Transparently maps Java objects to and from JavaScript objects using Java reflection

  • Handles marshalling/unmarshalling of arbitrarily complex nested data structures

  • Lightweight protocol similar to XML-RPC

  • Leverages the J2EE security model with session specific exporting of objects

  • Open source license (LGPL) by Michael Clark and others

A.11.9. JSP Controls Tag Library (from December 2005)

JSP Controls Tag Library (http://jspcontrols.sourceforge.net/) provides the lifecycle for portlet-like JSP components. The library does not require a portal engine or other central controller. The components built with the Library can be used in any JSP-based application.

  • Supports dual-mode components (non-Ajax and Ajax). Therefore, it works even with Netscape 4.

  • In non-Ajax mode, components utilize synchronous HTTP request/response cycles via the Redirect-After-Post pattern.

  • In Ajax mode, components are updated in place.

  • Component reload in non-Ajax mode is completely automatic and transparent.

  • Transition between Ajax and non-Ajax mode is undetectable when JavaScript is turned on or off.

  • See the demo at http://www.superinterface.com/jspcontrols/index.html.

  • Open source license (Apache 2.0) by Michael Jouravlev.

A.11.10. jWic

jWic (http://www.jwic.de) is a Java-based development framework for developing dynamic web applications with the convenience and familiarity of rich client-style programming.

  • Component-based, event-driven programming model.

  • Controls are rendered using templates (i.e., Velocity).

  • Dynamically updates a control using Ajax mechanisms.

  • Open source licence (Apache Licence, Version 2.0) by Florian Lippisch and Jens Bornemann.

A.11.11. Struts-Layout

Struts-Layout (http://struts.application-servers.com) is a tag library for Apache Struts that provides easy and fast interface creation. This is achieved by powerful tags that display panels, input fields, tables, treeviews, sortable lists, datagrids, popups, calendars, etc. With those tags customized to your own preference, some of the developers in your team don't have to write or even know HTML.

  • The Struts-Layout tag library now allows to put Suggest fields on your web pages (http://struts.application-servers.com/suggest/index.html).

  • Open source license (Apache 2) by Jean-Noel Ribette and others.

A.11.12. SWATO (from 2005)

SWATO (Shift Web Application TO...)( http://swato.dev.java.net/) is a set of reusable and well-integrated Java/JavaScript libraries that give you an easier way to shift the interaction of your web apps through Ajax.

  • The server-side Java library can be easily deployed in all Servlet 2.3+-compatible containers.

  • The client-side JavaScript library is based on the prototype that can help you code your JavaScript the object-oriented way.

  • Uses JSON to marshal the data of your POJOs (Plain Old Java Objects) on the server side.

  • Provides a simple interface for your JavaScript code to interact with the remote POJOs exposed to the client side such as RPC or cross domain access.

  • Easy and flexible configuration using <servlet> and <filter> in web.xml. Comes with Spring integration.

  • Comes with several reusable components (Auto-suggest Textbox, JS Template, JS Logger, etc.) that help you develop your web apps easier.

  • Online demo available at http://swato.throughworks.com.

  • Open source license (Apache) by Zhijie Chen.

A.11.13. Tacos Tapestry Components (from December 2005)

Tacos (http://tacos.sourceforge.net) is an Ajax engine/component library for Ajax/DHTML-based applications written in Java for the Tapestry web framework (http://jakarta.apache.org/tapestry).

  • Written to be completely integrated with the Dojo JavaScript library (http://dojotoolkit.org), provides an extensive set of widgets and features.

  • Requires little or no JavaScript knowledge to use, though any part of the process can be customized to your liking.

  • Provides development tools such as a logging/debug console window for Ajax/other JavaScript-initiated requests that make writing Ajax applications much easier.

  • Component library hosts extensive set of production quality code, with a built-in functionality that includes dialogs, floating windows, tons of effects, tree, autocompleter, Inline Editor, etc.

  • Extensive form-based Ajax support includes client-side validation, field observers, partial form submissions, etc.

  • Open source license (Apache) by multiple contributors.

A.11.14. ThinkCAP JX

ThinkCAP JX (http://www.clearnova.com) is designed to build industrial strength transactional business applications.

  • Contains Visual Workbench.

  • Based on over 20 open source projects, including Struts, Hibernate, JFreeChart, and many more.

  • Using three-tier client/server development, this minimizes JavaScript by using a server-side generation library of over 150 methods.

  • Handles complex Ajax updates using TransactionSafe. This guarantees no connection leaks and automates complex master-detail updates.

  • Rich data-aware controls include Scrollable Updateable DataView Data Grid, Client Sorting, Outlook Bar, Accordion, Tab Panes, Trees, and Autocomplete.

  • Smart data binding provides declarative binding to HTTP Request or Session Parms.

  • Client and Server Layout Management automatically directs component/Ajax call output to the appropriate default or named areas of a page.

  • Dual license (GPL or commercial) by ClearNova.

A.11.15. WebORB for Java (from August 2005)

WebORB for Java (http://www.themidnightcoders.com/weborb/aboutWeborb.htm) is a platform for developing Ajax and Flash-based rich client applications and connecting them with Java objects and XML web services. (See online examples at http://www.themidnightcoders.com/examples.)

  • See the earlier discussion "WebORB for .NET (from August 2005)" for more details.

  • Dual license (standard edition is free, professional is commercial) by Midnight Coders.

A.11.16. WidgetServer (from 2004)

WidgetServer (https://wiser.dev.java.net) enables you to code Ajax applications in pure Java.

  • Automatically generates HTML and JavaScript

  • Coordinates messages between browser and server

  • Can hand-write custom JavaScript and HTML/CSS components if desired

  • Applications run as web, Swing, and Swing client/server Apps

  • Dual license (higher-performance commercial version and lower-performance open source version) by Dirk von der Weiden




Ajax Design Patterns
Ajax Design Patterns
ISBN: 0596101805
EAN: 2147483647
Year: 2007
Pages: 169

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net