How does XAMJ differ from alternative XML UI language formats?

Gerald Bauer <[email protected]> Tue, 07 Jun 2005 16:30:03 -0700
Newsgroups gmane.comp.lang.xul.general
Message-ID <[email protected]>
Hello,

   The XAMJ working group has posted a document to highlight the 
difference between XAMJ and other alternative XML UI language format.

   The page reads:

   This page contains information for users interested in XAMJ's 
capabilities as a client-side standalone application language. There are 
many such Java-based XML GUI engines out there. All of them provide some 
of the same advantages, such as rapid development. But let's get right 
into what makes XAMJ different to most or all of them:

 o Decoupled.- XAMJ is not an XML serialization of Swing. Instead, the 
GUI framework is adapted to XAMJ. XAMJ has its own DOM which could in 
principle be implemented using alternative GUI frameworks such as SWT or 
even proprietary frameworks in small appliances where Swing is 
unavailable. Warrior is implemented as a layer around Swing, and 
certainly there's influence from Swing (and other sytems) in terms of 
capabilities, but the basic idea is that a web/graphic designer should 
be able to write substantial XAMJ without already being a Swing/Java 
programmer who understands programming concepts such as layout managers, 
JavaBeans and fully-qualified class names. On the surface, XAMJ looks a 
lot like HTML.

 o Compiled.- XAMJ code is converted to a special class called a 
clientlet and compiled (like a servlet, except it's on the client.) You 
can embed Java "scriptlets" in XAMJ code, which allows you to (1) 
Conditionally control how the XAMJ object tree (DOM) is built, (2) 
Process GUI events using Java code, and (3) Assign Java expressions to 
XML attributes either as the object tree is built, or dynamically in 
certain cases. [NOTE: Caching is not implemented as of this writing but 
Eclipse's JDT compiler is fast enough that launch performance is 
acceptable.]

 o Deployment.- In Windows at least, after you run the Warrior (0.91+) 
browser installer (which is called a browser, but in this case you can 
think of it as a thin client platform) you can simply click on any .xamj 
file in order to launch a XAMJ application. It provides the benefits of 
a scripting language, except it's compiled.

 o Web Aware.- XAMJ is being designed to work in a web environment, with 
all the security and functionality implications that has.

 o Text Markup.- In addition to rendering markup, XAMJ can render text 
markup similar to HTML along with widgets. This is at a very early stage 
at this point, but we have plans to improve it beyond the capabilities 
of HTML.

 o Style Sheets.- XAMJ supports a style-sheet concept very similar to 
CSS in structure, but using an XML syntax. This is also at an early stage.

  Deployment Options

You may be wondering how you'd go about deploying a XAMJ application 
after you write it. Here are the options available at present:

 o As a .xamj File.

 We already mentioned that if you install Warrior (in a Windows PC at 
this time) a .xamj file association is created so that if you click on 
the file, it is launched. Depending on the document-disposition element, 
it's launched as a standalone application or in Warrior's frame.

 o As an API

You can use Warrior as an API by simply invoking its 
net.sourceforge.xamj.browser.EntrySplash.main() method passing a URL or 
a file path as a parameter. Note that the URL may be of the form 
res:path_to_resource_in_jar.xamj. There are other ways to use it but 
that's easiest. The JAR files you'll need may be obtained from our 
archive at SourceForge. (ZIP files there contain all the libraries 
needed. The JAR files in the archive are self-extracting installers for 
Warrior.)

 o Use our Source Code
 
 XAMJ project source code is available in CVS and is released under the 
terms of the BSD License. The XAMJ-based section of xamjwg.org has some 
tips on how to set up Eclipse to get started with it. By working with 
XAMJ Project source you could, for example, change the installer to 
package your own files and brand the product according to your needs.

   Source: http://html.xamjwg.org/java-xul.jsp

    Any thoughts? Any comments?

   - Gerald


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20