|Oracle9i XML Developer's Kits Guide - XDK
Release 2 (9.2)
Part Number A96621-01
This chapter contains the following sections:
UIX (User Interface XML) is a set of technologies that constitute a framework for building web applications. The main focus of UIX is the user presentation layer of an application, with additional functionality for managing events and for managing the state of the application flow. UIX is designed to create applications with page-based navigation, such as an online human resources application, rather than full-featured applications requiring advanced interaction, such as an integrated development environment (IDE).
An application can interact with UIX in predefined places called decision points, where a decision is made by the operator or a certain action routine is automatically triggered. Execution of an action terminates in a new decision point. The application's structure is provided to UIX in configuration files, which can be ASCII files, databases, or resource files.
The main focus of UIX is the user presentation layer of an application, with additional functionality for managing events and for managing the state of the application flow. UIX is designed to create applications with page-based navigation, such as an online human resources application, rather than full-featured applications requiring advanced interaction, such as an integrated development environment (IDE).
UIX includes Java class libraries, APIs, XML languages, and other technologies for developing different aspects of web-based applications. You can use some or all of these technologies, depending on what aspects of a web application you are developing. It is worthwhile to familiarize yourself with all the UIX technologies to make sure you take full advantage of what they provide.
Here are the features of using UIX that make for more rapid development:
These are some cases where it is inappropriate to use UIX:
The UIX technologies can be used to implement the entire presentation layer of a web application. However, you can use only a subset of UIX if you only need some of its features. UIX is modularized into "subproducts" that target different aspects of a web application development project. Each is described briefly next.
UIX Components comprise a class library for generating the content of pages, in particular, pages used as the front end (user interface) to a web application. This technology does not manage the navigation between pages or the data supplied to those pages; that functionality is deferred to other sources (such as other UIX technologies). Instead, the UIX Components technology focuses on the rendering of a page itself. This rendering can be HTML for a browser page, or another technology such as WML for a mobile device.
The UIX Components technology does this by including a collection of web beans (or "nodes") for creating page layouts and standard user interface objects, such as tables, tabs, and buttons. It also includes a set of rendering classes (Renderers) that generate output using these Beans for a particular device, such as a browser.
UIX Components have a pluggable rendering architecture that enables rendering the same page with alternative visual styles (that is, the "look and feel"). The default renderers output HTML that conforms to the Oracle Browser Look and Feel (BLAF), but other renderers are available for mobile devices, and additional renderers can be created and added to the framework as needed.
The Java code and classes supporting UIX Components are all located in the
oracle.cabo.ui package and its subpackages.
UIX Controller is a framework for developing web application flow. UIX Controller is based on the Java Servlet technology, a standard part of the Java 2 Enterprise Edition. Where UIX Components focus on rendering a given page, UIX Controller is designed to manage the navigation among all pages in an application. UIX Controller defers the rendering of those pages to other technologies (such as UIX Components).
UIX Controller standardizes the way applications deal with HTML events and provides built-in services such as error page loops, login support, and file uploading. While it operates independently of the technology used to render individual pages -- such as UIX Components, JSPs, or Extensible Stylesheet Transformations (XSLT) -- it has built-in support to ease development when technologies like UIX Components are used.
The Java code and classes supporting UIX Controller are all located in the
oracle.cabo.servlet package and its subpackages.
The UIX language is a declarative alternative to creating web applications programmatically with Java-based UIX Components Beans and/or UIX Controller Java code. The UIX language builds on top of UIX Components and UIX Controller, providing an XML language for specifying UIX Components page layouts and UIX Controller server-side events. Essentially, the UIX language lets you create UIX Components pages and UIX Controller events with an XML document, rather than through Java programming.
While the UIX language provides an alternative way for you to create pages and page flows, it is transformed into UIX Components and UIX Controller objects behind the scenes and is thus treated equally by UIX.
The Java code and classes supporting the UIX language are all located in the
oracle.cabo.servlet.xml packages and their subpackages.
UIX Dynamic Images describes a utility for generating images that contain text, including built-in support for buttons and tabs. UIX Dynamic Images can colorize the images of an application to support color schemes, as well as provide localization and accessibility support and provide caching support for improved performance. UIX Dynamic Images generate images and, for those who need them, image maps.
Because text is processed separately from images, localization with UIX Dynamic Images is easier and more efficient. Translators work only with text and do not have to edit images. The translated text can be stored separately (for example, in resource files) and extracted when needed, to be combined with the image. Separating text and image processing in this way also makes it possible to use different text styles and sizes for special purposes, such as increasing the size of the text for complex characters such as Kanji, or to adjust visual attributes for people with some visual impairment, for example color blindness.
The Java code and classes supporting UIX Dynamic Images are all located in the
oracle.cabo.image package and its subpackages. UIX Components depend on UIX Dynamic Images for their own rendered images.
UIX Styles provide an architecture for defining and customizing stylesheets for different end user environments (for example, locales, browsers, or platforms). Stylesheets provide a centralized mechanism for defining and altering the appearance of pages separate from the content they contain.
UIX Styles include a new XML Style Sheet Language (XSS) for defining environment-specific stylesheets. XSS is based on Cascading Style Sheets (CSS). UIX Styles also feature server-side APIs for managing style information, including a facility to generate CSS stylesheets dynamically at runtime.
The Java code and classes supporting UIX Styles are all located in the
oracle.cabo.style package and its subpackages. UIX Components and UIX Dynamic Images depend on UIX Styles for their own style information.
All UIX projects depend on common utility classes provided by UIX Share.
The UIX Share classes include functionality that is useful to all UIX web applications, such as configuration support and localization. The Java code and classes supporting UIX Share are all located in the
oracle.cabo.share package and its subpackages.
The UIX technology stack is open and flexible; you have the choice of using as many of its subproducts as you need. Keep in mind, however, that using some UIX subproducts requires the use of others. For instance, UIX Components use UIX Dynamic Images and UIX Styles to render the images and stylesheets for its pages, respectively, and thus it requires their presence. However, there is no requirement that you use those subproducts in any way beyond UIX Components' own internal usage of them.
It is important to note that the various UIX technologies have been designed to work together. This means that sometimes one UIX project can make it easier to use another. As an example, the UIX Controller will automatically create and cache the pages specified in the UIX language because it has built-in support for this. If you use UIX without UIX Components, you will need to write some code to load in your UIX language document and display it. Conversely, if you use UIX Components without the UIX language, you may have to write some code telling the UIX Framework how to display your own pages. In other words, the whole UIX technology stack is definitely worth more than the sum of its parts!
Here are some recommendations for which technologies to use:
We recommend you use UIX Controller to manage your application flow and that you use UIX Components and the UIX Language to specify your page layouts and events. This enables you to get the most functionality from UIX with the least work on your part.
We recommend you use UIX Components and the UIX language to create and render your pages. This enables you to get the advantages of UIX Components (agent-based rendering architecture, high level page beans, localization, and so on) even if you can't use the entire UIX stack. Keep in mind, however, that some of the UIX Controller code might still be useful to your server-side flow management, even if you do not adopt UIX Controller entirely. For example, UIX Controller includes utility code for handling file uploads that is generally useful for Java servlet-based applications.
Consider using the UIX Controller servlet to manage logons, handle errors, and provide other utilities that are missing from the basic servlet architecture. This will also make it easier to include additional pages based on UIX Components later on.
We ask that you consider using UIX Components and the UIX language for all your pages. This is possible because UIX Components and the UIX language provide easy ways to intersperse other content such as existing JSPs and HTML on the same page using its passthrough capability. Doing so gives you the opportunity to consolidate your pages on one technology later on and transition as you go.
You can still use UIX Components beans on a page through the Java web bean classes. The generated output can be merged into your existing Java-generated page output. The decision to also use UIX Controller for page management is independent of this choice.
Consider using UIX Dynamic Images to generate images including text that are localized.
Consider using UIX Styles to generate and cache individual stylesheets based on variants.
Here are sources of more information about UIX:
For sample JDeveloper Demonstration code for UIX: