Xoetrope

 Wiki : XuiDeployment

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Deployment scenarios


XUI provides you with all of the deployment options that come with standard Java applets and applications plus some more. With the same codebase you can deploy the same code as an applet, a standalone application or as a webstartable application. XUI also makes it much easier to use the same page declarations for Swing, AWT or SWT based applications. There are also projects underway to render on HTML and MIDP.

XUI also has builds for versions 1.1.8, 1.4, 1.5 and 1.6 of the JDK allowing the developer to target older versions. The 1.1.8 version is for compatibility with the Microsoft JVM and for limited devices that only use the AWT widget set.


Deploying applets

Applets have continued to lose favour amongst the developer and user communities since they made their first appearance in the mid - late 90's. Some of the issues are


Thankfully, the people at Sun are now beginning to address the concerns that are hindering the adoption of Applets. Their JRE update N version is available for beta download and it's full release is earmarked for Q2 2008. It's unfortunate that it has taken so long and that the announcement of technologies such as SilverLight and Flex have prompted this initiative but it better late than never.

The beta version of this JRE is very impressive and addresses the problems outlined above. The main changes are that it starts with a stripped down version of the JRE and runs outside the browser process meaning that it does not interrupt what the user is doing in the browser. For more on this version of the JRE have a look at this interview with Ken Russell, the lead engineer on the project http://ajaxian.com/archives/ken-russell-on-the-new-java-plugin.

Deploying via WebStart

Java WebStart is a very popular way to deploy Java applications. This technology allows the user click a hyperlink to a JNLP file describing the resources required for the application and it's startup settings and the JRE on the client machine then installs and starts up the application transparently. There are plenty of 'WebStarted' application on the demos page of the XUI zone on the Xoetrope site http://www.xoetrope.com/xui/demos

Applications run via WebStart will automatically take care of looking for updates from the server it was launched from. When updates are found they are installed seamlessy.

It's also possible to distribute a XUI application on CD which installs in the WebStart cache. It can be installed in such a way the it will check a pre-specified server for any updates to the application. Deployment via CD also offers the developer the opportunity to check to see if the JRE is installed on the client machine and to install it if not.

Deploying as standalone applications

Standalone applications can be deployed via the internet or on CD. While they run standalone they can also be configured to communicate with a server for data and updates.

Swapping widget sets

The XUI page XML format is widget set independent meaning that the same page XML can be used to render Swing, AWT or SWT applications. If you examine the following XML you won't find any reference to a particular widget set - just a description of a page.

<XPage class="net.xoetrope.mortgage.Finish"> 
  <Components> 
	<Label x="70" y="60" w="100" h="20" style="prompt" content="Filename:" opaque="true" />
	<Edit name="filename" x="170" y="60" w="200" h="20" style="data" />
	<Button name="saveBtn" x="140" y="100" w="160" h="30" style="Heading" content="Save Application" opaque="true" />
  </Components> 
  <Events>
	<Event method="save" target="saveBtn" type="ActionHandler"/>
  </Events>
  <Data>
	<Bind target="filename" source="/temp/filename" output="/temp/filename"/>
  </Data>
  <Validations>
	<Validation rule="filename" target="filename"/>
  </Validations>
</XPage>


The Finish class which is referenced in the XPage node can also remain widget set independent to an extent. The event declared in the 'Events' node will be created by XUI and triggered in the referenced class as folows.

package net.xoetrope.mortgage;

public class Finish extends XPage
{

  public void save()
  {
  }
  
}


Dependencies begin to creep in where you need to retrieve a reference to a component declared on the page as shown below when a reference to the 'filename' edit component is needed.

package net.xoetrope.mortgage;

import net.xoetrope.swing.XEdit;

public class Finish extends XPage
{

  private XEdit filenameText;

  public void pageCreated()
  {
	filenameText = ( XEdit )findComponent( "filename" );
  }

  public void save()
  {
  }
  
}



Return to the Evaluator's Guide

There are no comments on this page. [Add comment]

Page was generated in 0.1698 seconds