Typically XUI is run by clicking on a link within a web browser or by clicking on a desktop or menu shortcut. When the link is clicked a small Java application stub is launched. The stub creates the main components of the application including the window frame, parsers and so on. The stub then loads the initial configuration files which in turn point to the content.
Much of the content is delivered as XML and the stub processes this, instantiating Java components and hooking these components up to Java classes referenced by the XML. The stub provides much of the infrastructure needed for things like navigations, data loading and input validation. The Java classes provide the application spsecific business logic.
Under the hood
Under the hood a XUI application normally runs as a Java Web Start application or sometimes as an Applet.
When using Java Web Start the launch process will install desktop and menu shortcuts once the required libraries have been downloaded. On subsequent launches Java Web Start will check for updates and new resources, downloading anything new and reusing anything that is up to date.
The application stub loads the startup.properties and configres any of the components referenced in the configuration, including the widget set used by the application. Components such as the data binding can define additional configurations that control the data source and components used for data binding. Therefore by choosing an appropriate set of configuration parameters an application can be targeted at different platforms and devices.
One of the key components is the PageManager, which controls the display of pages within the application. On startup the PageManger consumes a description of the initial page or initial frameset, and in turn the PageManager attempts to load a class to represent the page. If a class is not found the PageManager attempts to use various loaders to load the page and by default this will lead to an XML file being processed.
As the page XML is processed the instructions contained within the XML lead to Java components being created. The XML can also specify event handling by specifying a component to response method pair. The response methods are normally implemented by a class referencec by the XML and because the XUI framework is taking care of the cross referencing the Java code does not need to specify listeners or other low level plumbing. The handler method is invokved via reflection at run time.
The XML can similarly specify the data binding and input validation rules.
The XUI framework provides various navigation methods to allow new pages and new content to be displayed. The content can be delivered together with the application stub as a set of Jar files or additional content can be requested at runtime and this content can be generated on-the-fly just as html is generated by webservers for typical web applications.
Requirements
XUI requires a JVM to be installed before it will run, but this can be anything from a JDK 1.1.8 VM to the very latest VM. XUI will also run on various embedded VMs like Esmertec Jeode or NSI Creme. Not all the components available on the latest JVM will run on early VMs as they simple lack the necessary APIs and as the target devices probably lack the necessary functionality. On the latest JVM XUI can take advantage of the most recent enhancements by checking for the availability of the necessary interfaces and enabling or disabling functioality as appropriate.
There are no comments on this page. [Add comment]