Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Ajax In Action (2006).pdf
Скачиваний:
63
Добавлен:
17.08.2013
Размер:
8.36 Mб
Скачать

Ajax frameworks and libraries

619

620APPENDIX C

Ajax frameworks and libraries

The last year has seen a rapid proliferation of Ajax and JavaScript frameworks, from small cross-browser wrapper utilities to complete end-to-end client and server solutions. In this appendix, we attempt to take a snapshot of the current range of offerings, with apologies to any that we’ve omitted.

We, the authors of this book, haven’t personally used all of these frameworks and toolkits in a production setting, and in many cases we’ve based our descriptions on the author or vendor’s own claims for the toolkit. If you’re reading this a year after publication, many of the descriptions will be wildly inaccurate or out of date, and many of the frameworks may have been abandoned or absorbed into other projects. The current state of play is unstable, in our opinions, and we would expect a few successful frameworks to predominate over the next 12 months.

So here, without any further ado, is our roundup of Ajax frameworks that you might encounter in the wild. We haven’t attempted to categorize them beyond listing them alphabetically. Happy coding!

Accesskey Underlining Library

Open source

www.gerv.net/software/aul/

Adds accesskey underlining to pages without requiring <u> tags in the source. Tag items with the accesskey attribute and JavaScript will create the appropriate underlining tags in the DOM.

ActiveWidgets

Commercial with free download

www.activewidgets.com

Rich client JavaScript widgets; current flagship product is a rich grid widget.

Ajax JavaServer Faces Framework

Open source (Apache)

http://smirnov.org.ru/en/ajax-jsf.html

The Ajax-JSF framework is designed to allow simple conversion of any existing JavaServer Faces application to Ajax functionality. Most of the existing components can be used as is or simply converted to Ajax support. Proposal to MyFaces project. Minimal differences from JSF specifications.

Ajax frameworks and libraries

621

 

 

Ajax JSP Tag Library

Open source

http://ajaxtags.sourceforge.net/

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

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 popup balloon, anchored to an HTML element with an onclick event. Select populates a second select field based on a selection within a drop-down field. 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 the response to text entered in another field.

Ajax.NET

Michael Schwarz (2005)

Unspecified, free to use

http://weblogs.asp.net/mschwarz/

Ajax.NET is a library enabling various kinds of access from JavaScript to serverside .NET. Can pass calls from JavaScript into .NET methods and back out to JavaScript callbacks. Can access session data from JavaScript. Caches results. No source code change needed on server side; mark methods to expose with an attribute. Provides full class support for return values on client-side JavaScript, including DataTable, DataSet, DataView, Arrays, and Collections.

AjaxAC

Open source (Apache 2.0)

http://ajax.zervaas.com.au

AjaxAC encapsulates the entire application in a single PHP class. All application code is self-contained in a single class (plus any additional JavaScript libraries). The calling PHP file/HTML page is very clean. You simply create the application class, then reference the application JavaScript and attach any required HTML elements to the application. No messy JavaScript code clogging up the calling HTML code; all events are dynamically attached. Easy to integrate with templating engine, and to hook into existing PHP classes or MySQL database for returning data from subrequests. Extensible widget structure lets

622APPENDIX C

Ajax frameworks and libraries

you easily create further JavaScript objects (this needs a bit of work, though, according to the author).

AjaxAspects

Free to use with source

http://ajaxaspects.blogspot.com

AjaxAspects is an engine that uses JavaScript proxies to call server-side Web Service methods. Standard SOAP and WSDL is reused for the communication between client and server. Simple types and XML objects are supported as parameters and return values. Supports caching and queuing of actions.

AjaxCaller

Michael Mahemoff (2005)

Open source

http://ajaxify.com/run/testAjaxCaller

AjaxCaller is a basic thread-safe wrapper around XMLHttpRequest mainly for Ajax newcomers; still raw alpha and under development and is only packaged with the AjaxPatterns live search demo for now. Follows REST principles.

AjaxFaces

Open source (ASF)

http://myfaces.apache.org/

Apache’s JavaServer Faces implementation; currently experimenting with Ajax support.

BackBase

Commercial with community edition

http://www.backbase.com

BackBase is a comprehensive browser-side framework with support for rich browser functionality as well as .NET and Java integration. BackBase provides Rich Internet Application (RIA) software that radically improves the usability and effectiveness of online applications, and increases developer productivity. With BackBase you can build web applications with a richer and more responsive user interface. BackBase provides separation of presentation from logic through a custom XHTML namespace.