Section A.7. Multilanguage Ajax Frameworks


A.7. Multilanguage Ajax Frameworks

Each library here integrates browser-side JavaScript with several server-side languages. Usually, an individual project will only need to integrate with one server-side language, but the library includes several to make it applicable to a broader market. JSON has had a big impact, because it is as much a popular data format as it is a collection of open source libraries for remoting. SAJAX has also received considerable attention in this area, in part because it supports so many languages. CPAINT is popular as well.

A.7.1. Cross-Platform Asynchronous INterface Toolkit (CPAINT) (from May 2005)

CPAINT (http://cpaint.sourceforge.net/) is a true Ajax implementation and a JSRS (JavaScript Remote Scripting) implementation that supports both PHP and ASP/VBScript. CPAINT provides you the code required to implement Ajax and JSRS on the backend, while the returned data is manipulated, formatted, and displayed on the frontend in JavaScript. This allows you to build web applications that can provide near real-time feedback to the user. See Ajax Stub (Chapter 9).

  • Supports both PHP and ASP

  • Unified JavaScript file for all functions

  • Supports both remote scripting and XML

  • Supports both local and remote functions

  • Single or multiple XMLHTTP objects

  • Returns backend data as text or as a JavaScript XML/DOM document object

  • Can support both POST and GET requests

  • Backend proxy functions for accessing remote functions and data

  • Tested with all major browsers

  • Open source license (GNU, GPL, and LGPL) by various contributors

A.7.2. JavaScript Object Notation (JSON) and JSON-RPC

JSON (http://www.crockford.com/JSON/index.html) is a "fat-free XML alternative" and JSON-RPC (http://www.json-rpc.org/) is a remote procedure protocol, akin to XML-RPC, with strong support for JavaScript clients. See JSON Message (Chapter 9).

  • Implementations (http://www.json-rpc.org/impl.xhtml) exist for several server-side platforms such as Java, Python, Ruby, or Perl.

  • Individual packages and licenses for each platform. Original concept and JavaScript implementation by Douglas Crockford.

A.7.3. JavaScript Remote Scripting (JSRS) (from 2000)

JSRS (http://www.ashleyit.com/rs/jsrs/test.htm) routes calls directly from JavaScript into your server-side language and back out again.

  • Initially developed back in 2000

  • Known browsers: IE4+, NS4.x, NS6.x, Mozilla, Opera7, and Galeon

  • Server-side support for ASP, ColdFusion, PerlCGI, PHP, Python, and JSP (servlet)

  • Open source license (very flexible custom license) by Brent Ashley (http://www.ashleyit.com/)

A.7.4. Rialto: Rich Internet AppLication TOolkit

Rialto (http://rialto.application-servers.com/) is a cross browser JavaScript widgets library.

  • Because it is technology agnostic, it can be encapsulated in Java/JSP/JSF, .NET, or PHP-graphic components.

  • The widgets library includes forms, drag-and-drop, tree, data list with fix header and resizable columns, pop up, and splitter.

  • Enables single-page interface-application development.

  • Demo available (http://rialto.application-servers.com/demoRialto.jsp).

  • Open source license (Apache) by multiple contributors.

A.7.5. SAJAX (from March 2005)

SAJAX (http://www.modernmethod.com/sajax/) routes calls directly from JavaScript into your server-side language and back out again. So, for example, calling a JavaScript method "x_calculateBudget( )" will go the server and call an ASP/ColdFusion/Io/Lua/Perl/PHP/Python/Ruby calculateBudget( ) method, and then return the value in JavaScript to x_calculateBudget_cb( ).

  • As described in Ajax Stub (Chapter 9), facilitates mapping from the JavaScript stub function to a backend operation.

  • See a demo walkthrough in the "Real-World Examples" of Ajax Stub.

  • Capable of stubbing calls to numerous server-side platforms: ASP, ColdFusion, Io, Lua, Perl, PHP, Python, or Ruby.

  • Open source license (BSD) by various contributors.

A.7.6. ZKAjax/XUL Web Framework

ZK (http://zk1.sourceforge.net/) is an Ajax-based, event-driven, XUL-based, all Java framework designed to enable Web applications to have both rich user experiences and a simple programming model.

  • With ZK, represent and manipulate RIA in XUL/HTML components that are all running at the server, as has been done for years in desktop applications.

  • No JavaScript. No replication of business logic at the clients. No proprietary components. No compilation. ZK works with existent frameworks and technologies, such as JSF and portals. The pace of adapting ZK is all under your control.

  • XUL-based components.

  • Event-driven model.

  • Server-centric processing.

  • Script in Java and EL expressions.

  • Demo available (http://www.potix.com/zkdemo/userguide).

  • Open source license (GPL) by Potix Corporation.




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