Tuesday, May 9th, 2006

Apache XAP Proposal

Category: JavaScript, Library

Coach Wei, CTO of Nexaweb, has proposed an open Apache project for declarative XML named XAP (eXtensible Ajax Platform):

XAP is to provide an XML-based declarative framework for building, deploying and maintaining rich, interactive, Ajax-powered web applications. A basic principal of XAP is to leverage existing Ajax projects such as Apache Kabuki and Dojo, as well as other community efforts such as Eclipse openAjax. It aims to be pluggable with various Ajax toolkits, reduce the need of scripting and solve the development challenge as well as application maintenance challenges associated with Ajax programming.

This work is based on Nexaweb’s XAP platform.

Example: Get RSS feed from Yahoo!

  1. <xap xmlns="http://www.openxap.org/xap">
  2.   <window title="New Window">
  3.   <boxlayout orientation="vertical" pack="start" align="stretch"/>
  4.     <tree>
  5.       <column />
  6.         <row expanded="true">
  7.           <cell text="Tree Item 1"/>
  8.           </row><row>
  9.             <cell text="Sub Tree 1"/>
  10.           </row>
  11.           <row>
  12.             <cell text="Sub Tree 2"/>
  13.           </row>
  15.         <row expanded="true">
  16.           <cell text="Tree Item 2"/>
  17.           </row><row>
  18.             <cell text="Sub Tree 3"/>
  19.           </row>
  21.     </tree>
  22.     <button text="OK"/>
  23.   </window>
  24. </xap>

Posted by Dion Almaer at 1:31 am

3.3 rating from 29 votes


Comments feed TrackBack URI

I think this example is broken. It comes from the Nextaweb examples page. However the XML for Example 1 and 2 are identical whist the output is different. This XML produces the output for Example 1 not Example 2.

Comment by John Wilson — May 9, 2006

Don’t worry. We’ll very probably never hear from this again.

Comment by Lon — May 9, 2006

It sounds great in theory.
The problem, i feel, is that many apache projects get blown up in scope and size so much that they become unusable.
I liked the ideas and some of the approaches but it always felt like trying to swat a fly with a tank. Maybe it’s one of java’s requirements to complicate things. (just kidding, please don’t flame me)
I wish it good luck.

Comment by Diego — May 9, 2006

why don’t they implement xul in javascript instead of creating yet another xml format for user interfaces?

Comment by Dave Ashe — May 9, 2006

I’m with Dave… this technology already exists and it’s called XUL (and, as an added “bonus”, it has nearly the same tag names as the XAP samples). I have successfully used most of the functionality provided by prototype.js in XUL (there are a few DOM differences, but the heavy lifters in prototype, the $ functions and Event object (just be sure to observe for ‘command’ rather than ‘click’) work as advertised (as is to be expected, it’s all javascript)) and XHR libraries/self-rolled-RPC-functionality works the same in both. In fact, while XUL seems to be all about RDF and XML formatted data, other technologies that have traction in AJAX, like JSON, make alot of sense in XUL too.

Comment by Andy — May 9, 2006

I don’t think this has a lot of benefit, but I could be wrong. It seems like creating top-heavy, feature filled frameworks is the flavor of the year. I’ve seen a lot of websites lately that have so much extraneous javascript and AJAX calls that I think my eyes are going to bleed. Oh, never mind, they did.

Comment by Dan — May 9, 2006

Looks interesting. Does it work? How well does it work?
Can we see the code for XAP?

Coach Wei wrote a blog on this:
XAP, Declarative Ajax and The next stage of Ajax(
http://www.coachwei.com/blog/_archives/2006/5/7/1938759.html). He positioned an open source ajax stack against Microsoft Atlas. Interesting.

Wish the project good luck.

Comment by Daniel — May 9, 2006

This is simplier.

Comment by Mikael Bergkvist — May 9, 2006

It’s good to see that this area is getting attention.

Designing a declarative markup language for rich client apps (Ajax or otherwise) is non-trivial. Very quickly you get into issues that resemble full-scale programming language design issues (as well as classic UI toolkit API design issues), and it’s hard to get these right while maintaining basic learnability.

Check into OpenLaszlo for LZX, an existing well-developed XML-and-JS language, along with a self-consistent application framwork and GUI toolkit, that’s designed to solve this problem, and run in any browser. It works by compiling LZX to either Flash or (in a pre-release build) to Ajax/DHTML; later we expect it to run with client environments such as JME (mobile Java) or Microsoft’s WPF. OpenLaszlo is open source (CPL), and is pretty widely adopted — 170,000 downloads to date, deployed by large companies at scale, etc. While I don’t think we’ve gotten everything exatly right (yet :-))… it does approach this problem in a sophisticated manner that is independent of the client runtime environment. And it’s a real open source project, with an active community, nightly builds, and all the rest.

Here’s a sophisticated app built using this platform/language, compiled to Flash:

Here’s an LZX example compiled to both Flash and DHTML:

And here’s another OpenLaszlo app that you may already know about:

I’d humbly suggest that rather than creating YAAML (yet another application markup language), that Coach and others who are interested in such a system get involved with the OpenLaszlo effort. We are now working with OpenAjax and Dojo, and expect to announce more open source alliances shortly.

– David Temkin, CTO/Founder, Laszlo Systems
temkin at laszlosystems dot com

Comment by David Temkin — May 10, 2006

Hello – the building of complex, customizable web pages is fundamentally a task for a rules engine. XSLT and XML metadata can be combined to create an extremely powerful AJAX code generation engine, which replaces 10s, even 100s of 1000s of lines of procedural code, either JavaScript or Java, etc. Even better, the “metaengine” can run on either server or client. We’ve already developed this concept into an enterprise framework which we plan to open source. Please see me at Ajax Experience in S.F this week (5.12) for a demo.

Comment by holten norris — May 12, 2006

[…] Interesting comments and mixed reviews at the feasibility at Ajaxian […]

Pingback by Dorai’s LearnLog » Extensible AJAX? — May 14, 2006

I’m amazed by how quickly the Ajax-oriented market is getting bloated with new “technologies”. As someone already pointed out, who needs a new markup language for UI design, when XUL (which is awful, in my humble opinion) is already there?
To me, most of these technologies seem like filler.

Comment by Asbjørn Clemmensen — May 18, 2006

“It sounds great in theory.”

No it doesn’t! And I’m sure it’s even less fun in practice!

Comment by Bob Aman — May 25, 2006

Leave a comment

You must be logged in to post a comment.