134 Ajax Frameworks and Counting

I’m here in SF for The Ajax Experience, talking about design principles and patterns for Ajax (big surprise!), and one of the things my presentation will point out is the importance of libraries and frameworks in implementing Ajax patterns. Ahead of the talk, I just did a quick count of frameworks and libraries on the wiki. Turns out there are 58 in pure Javascript and another 76 with back-end support in PHP, Java, or whatever. This includes 13 for .Net, and no less than 22 for each of PHP and Java.

Overall, that’s 134 Ajax frameworks and libraries out there, many of them under a year old! It’s true that a few of the pure Javascript libraries are things like Drag-And-Drop that have been around a few years, but only a few of those. The rest are all-encompassing, like Dojo, or related to remoting, like ACE, or related to XML and DOM manipulation in a manner closely associated with Ajax, like logging and effects libraries.

When I transcribed the frameworks to form an appendix for the book, there were about 90 patterns. That was in December. So roughly 45 new frameworks since then, about one every three days. Nice going! Stuff like this makes life a lot easier for developers, no matter what they’re approach to Ajax architecture. Even if a developer doesn’t want to go near Javascript with a ten-foot pole, they’re still going to reap the benefits from a server-side framework (Rails etc). Furthermore, the server-side framework is going to reap the benefits of all these pure Javascript libraries – a number of server-side frameworks make use of Dojo, Scriptaculous, and Mochikit.

Patterns and frameworks go hand in hand. It’s not that a framework “makes patterns”, as some sales reps like to imply, but frameworks do support particular patterns. Most GUI toolkits, for example, are based closely on the Observer pattern. Java’s IO library is based on Decorator. In the case of Ajax, there are libraries like Scriptaculous which map closely to particular patterns, like One-Second Spotlight. The best reference on this stuff is Ralph Johnson’s visionary 1997 paper, Frameworks = Components + Patterns (Comms of the ACM, October, 1997).

An Ajax Framework a Day!

Today’s Ajax framework is JsRia. Yesterday’s was ZK, with the Backbase entries updated too. In the past week, there were Smartclient, Ajax JSP Taglib, Ajax JSF Framework, Cajax. Here’s the diff. The week prior to that saw introduction of XOAD, Rialto, and Lotus Notes info.

Have the Ajax frameworks entered the enlightened age of singularity? (I’ve been listening to a lot of Ray Kurzweil podcasts lately, forgive me.) To some extent, yes, there is some pretty explosive growth here, because several of these frameworks really have been released in the past couple of weeks, as far as I can tell. In addition, many of the project owners and users have presumably become aware of the page, and seek to add their project or update my original description.

So I’m thinking the frameworks page needs to be split before it bursts at the seams, what do you reckon? I wish there was a way to keep them all on the same page, with a bit more Ajaxy dynamism, to let you manage and personalise things better. As I alluded to yesterday on Ajaxian, of all the Ajax projects being announced – wikis are somewhat lacking. Surprising to me, since it was one of the most obvious Ajax examples to me – one I mentioned in the original Ajax Podcast, and one of the first proof-of-concept demos I created for the patterns. One thing I’d like to see is wikis take more of a web service approach – let a thousand Ajax/Flash/Desktop wikipedia clients bloom. Sure, there are mashups now, but they’re mostly read-only, and require manual scraping. The idea I had with the Ajax Patterns Reader was to eventually let people leave feedback. There’s another demo – the portal, which grabs content from ajaxpatterns.org, and there will be a further demo coming soon. To do all that properly, I’ll likely create a web service to expose the wiki content as an RESTful API.

In closing off this tangent, here’s a question: How would it be creating a wiki from the ground up, with no UI? Just a collection of web services for managing content. I’ve found MoinMoin is more configurable and pluggable than most, but it still starts with the unnecessary premise that the UI lives in the same process as the content.

An Ajax Framework a Day!

Today’s Ajax framework is JsRia. Yesterday’s was ZK, with the Backbase entries updated too. In the past week, there were Smartclient, Ajax JSP Taglib, Ajax JSF Framework, Cajax. Here’s the diff. The week prior to that saw introduction of XOAD, Rialto, and Lotus Notes info.

Have the Ajax frameworks entered the enlightened age of singularity? (I’ve been listening to a lot of Ray Kurzweil podcasts lately, forgive me.) To some extent, yes, there is some pretty explosive growth here, because several of these frameworks really have been released in the past couple of weeks, as far as I can tell. In addition, many of the project owners and users have presumably become aware of the page, and seek to add their project or update my original description.

So I’m thinking the frameworks page needs to be split before it bursts at the seams, what do you reckon? I wish there was a way to keep them all on the same page, with a bit more Ajaxy dynamism, to let you manage and personalise things better. As I alluded to yesterday on Ajaxian, of all the Ajax projects being announced – wikis are somewhat lacking. Surprising to me, since it was one of the most obvious Ajax examples to me – one I mentioned in the original Ajax Podcast, and one of the first proof-of-concept demos I created for the patterns. One thing I’d like to see is wikis take more of a web service approach – let a thousand Ajax/Flash/Desktop wikipedia clients bloom. Sure, there are mashups now, but they’re mostly read-only, and require manual scraping. The idea I had with the Ajax Patterns Reader was to eventually let people leave feedback. There’s another demo – the portal, which grabs content from ajaxpatterns.org, and there will be a further demo coming soon. To do all that properly, I’ll likely create a web service to expose the wiki content as an RESTful API.

In closing off this tangent, here’s a question: How would it be creating a wiki from the ground up, with no UI? Just a collection of web services for managing content. I’ve found MoinMoin is more configurable and pluggable than most, but it still starts with the unnecessary premise that the UI lives in the same process as the content.

Server-Centric versus Browser-Centric

James Strachan: Is Ajax gonna kill the web frameworks?:

So is the web application of the future going to be static HTML & JavaScript, served up by Apache with Ajax interacting with a bunch of XML based web services (maybe using SOAP, maybe just REST etc)? If so, do we really need a web framework thats focussed on HTTP and HTML, or are we just gonna end up developing a bunch of XML based web services and letting Ajax do all the templating, editing and viewing?

While I’ve kept [an open mind](http://ajaxpatterns.org/Ajax_Frameworks an open mind), pure separation is certainly the approach I’ve been using and advocating. Perhaps server-centric approaches can work okay for some intranet apps where the emphasis is on getting up and running, and where many developers want to focus on server-side concepts like messaging, DB, business logic, etc. But the bulk of applications are better off as browser-centric.

With tools like Dojo, Mochikit, Scriptaculous, Ajax Pages, you can quite happily get the whole UI encapsulated in JS. Amid all the Ruby uptake (and for good reason), JS has also come along nicely over the past twelve months. Not just libraries, but techniques for OO design, testing, etc.

In addition, as others have pointed out, the approach goes hand-in-hand with SOA: if you’re going to expose a clean REST API on your server anyway, it’s a no-brainer to proceed with a pure-browser UI. Testing becomes a lot easier too. Separating model and presentation has always been a difficult problem in software … when you have a solution as good as this, you have to put up a very strong argument against it.

So why are people still using server-centric frameworks? The biggest force of resistance seems to be the misplaced notion that JS is a hack and we must avoid working with it at all costs. Or maybe it’s less ideological than that, and because people just haven’t had time to learn it. Fair enough – it’s hard enough to keep up with server-side technologies. But a little time learning the basics of JS would certainly ease the pain of web development.

State of the Ajax Frameworks

The publicly-editable Ajax Frameworks Page got a nice kick along in the past few days, presumably due to a recent link from Ajaxian. If this list is anything to go by, the most common language is pure-Javascript, and Java is, as you might have guessed, highest on the server-side, followed by .Net and PHP. Sections for Python and Perl were opened up during this time. Thanks for your contributions!

1 Pure Javascript: Application Frameworks

  • 1.1 Isomorphic (Commercial RIA Toolkit)
  • 1.2 Bindows (Since 2003)
  • 1.3 BackBase (from 2003)
  • 1.4 DOJO (Under development; from September, 2004)
  • 1.5 Open Rico (Under development; from May, 2005; based on earlier proprietary framework)
  • 1.6 qooxdoo (Under development; from May, 2005)
  • 1.7 Tibet (Under development; from June, 2005)
  • 1.8 AJFORM (Since June 2005)
  • 1.9 ThyAPI (Under development; Since end of 2004)

2 Pure Javascript: Infrastructural Frameworks

  • 2.1 AjaxCaller (Alpha; from May 2005)
  • 2.2 Flash JavaScript Integration Kit ()
  • 2.3 Google AJAXSLT (Released June 2005)
  • 2.4 HTMLHttpRequest (Beta; from 2005)
  • 2.5 Interactive Website Framework (from May 2005)
  • 2.6 LibXMLHttpRequest (Released; June 2003)
  • 2.7 MAJAX (Released; August 2005)
  • 2.8 RSLite (x)
  • 2.9 Sack (In development; from May 2005)
  • 2.10 Sarissa (Released; from February, 2003)
  • 2.11 XHConn (Released; from April, 2005)

3 Server-Side: Multi-Language

  • 3.1 Cross-Platform Asynchronous INterface Toolkit (May 2005)
  • 3.2 SAJAX (Workable but not 1.0; from ?March 2005)
  • 3.3 Javascipt Object Notation (JSON) and JSON-RPC
  • 3.4 Javascript Remote Scripting (JSRS) (from 2000)
  • 3.5 Bitkraft for ASP.NET

4 Server-Side: Python

  • 4.1 CrackAJAX

5 Server-Side: Java

  • 5.1 WebORB for Java (from August 2005)
  • 5.2 Echo 2 (from March 2005)
  • 5.3 WidgetServer (2004)
  • 5.4 Direct Web Remoting (DWR) (2005)
  • 5.5 SWATO (2005)
  • 5.6 AJAX JSP Tag Library
  • 5.7 AJAX Java Server Faces Framework
  • 5.8 ThinkCAP JX: RAD Environment for AJAX, J2EE, and Open Source (Commercial Framework)
  • 5.9 Struts-Layout

6 Server-Side: Lisp

  • 6.1 CL-Ajax

7 Server-Side: .NET

  • 7.1 MonoRail (from May 2005)
  • 7.2 WebORB for .NET (from August 2005)
  • 7.3 Ajax.NET (from March 2005)
  • 7.4 ComfortASP.NET (from August2005)
  • 7.5 AjaxAspects (from August 2005)

8 Server-Side: Perl

  • 8.1 CGI::Ajax – Export perl methods to javascript for AJAX

9 Server-Side: PHP

  • 9.1 AjaxAC (From April, 2005)
  • 9.2 JPSpan
  • 9.3 XAJAX
  • 9.4 PEAR::HTML::Ajax
  • 9.5 CPAINT

10 Server-Side: Ruby

  • 10.1 Ruby On Rails