XForms Thick Clients
Introduction
All designers and developers face the problems of vague requirements, poorly defined data models, and last minute requirement changes. These sad facts of life drive some developers to embrace a document-driven architecture,but this approach usually breaks down when confronted with an environment that includes non-network attached devices that necessitate a thick-client application. This article describes the components and techniques for building a document-driven, thick-client application using XForms that operates on a non-network attached system. This approach provides for decreased deployment costs, cross-platform operation of a thick client, and increased component reuse within an enterprise. Although web-based applications are usually optimal for enterprise network deployment, there are classes of users that need access to the same types of applications while detached from a network. Using XForms, other XML technologies, and Java, a system can be constructed that provides detached users access to the same application systems as network attached workers and provides the flexibility of document-driven systems. This article covers the components used for a XForms-based thick client, including presentation, business logic, storage logic, and security.
Approach
Using inherently network-based technologies, such as XForms, in a thick client requires an unusual bundling of components. The resulting application consists of a native operating system executable that contains all the application tiers normally spread across multiple systems. Figure 1 illustrates the components and layering of such a thick client.

Figure 1
The outermost Native OS Executable is responsible for bootstrapping the application environment, providing a display context, setting the appropriate class path information and initiating the Java virtual machine (JVM).
The browser component embeds the OS default browser as the display component of the application. The presentation layer produces HTML/CSS that is rendered in the browser component.
The OS Executable bootstraps a JVM for the bulk of the application logic. The initial Java class instantiates an embedded web server component, which contains the traditional three application tiers. Packaging all layers of the application into one executable eliminates the coordination to ensure that the database is running prior to the application starting, since the database is embedded in the executable.
The Eclipse RCP project provides a robust runtime environment that includes an embedded browser component for displaying the output of the presentation layer. RCP wraps the Java programs into executables suitable for multiple target platforms. So one can use RCP to generate standalone programs for Windows, Mac OS X, Linux, and others based on the same Java components.
Presentation Layer
XForms supplies presentation controls suitable for clean interaction with the XML documents managed in a document driven application. XForms provides a modern, XML based approach to collecting user input in a web application. XForms goes further by providing the developer a means to fully control the page presentation by managing the content of the XML documents consumed by the form. For example, one can provide immediate feedback to the user regarding validation failures by using XForms events and actions to record field validation events.
Using XForms in a document-driven system allows developers to control data content and validation rules by specifying content and validation rules in the XForms model. XForms simplifies the expression of presentation logic in the presentation layer, but erects barriers that make coding business logic in this layer difficult.
There are two ways of deploying XForms applications, a browser plugin or extension to support XForms within the browser, or a software translation layer to flatten XForms into HTML and JavaScript prior to being transmitted to the browser. Browser extensions that implement XForms in the browser include the Mozilla XForms extension and formsPlayer (ActiveX control for IE). Software translation tools include Chiba, Orbeon, and IBM Lotus Forms.
Since the application operates with an embedded browser component determined by the OS, the best choice is for a browser-independent software translation component. Orbeon provides an XForms 1.0 implementation with some early enhancements from the XForms 1.1 specification. Orbeon also bundles an XML-centric business layer and an XML database into their standard distribution. Having all three layers bundled into one distribution saves time in bootstrapping the initial development environment. Orbeon also provides a very handy debugging widget that provides runtime visibility into the data model being edited by the form.
Business Layer
Since the presentation layer deals in XML, the business layer must either translate the XML into an object oriented (OO) representation or perform the business logic directly against XML. If the translation to OO can be avoided, the business layer can remain ignorant of changes to the schema unless those changes directly impact the processing logic. If the business layer is largely ignorant of schema changes, then maintainability and flexibility is increased by reducing the number of touch-points that exist for any given change to the system.
XForms is business layer agnostic, as long as the layer accepts XML documents, it can process XForms documents. The more XML-centric the business layer, the less glue code is required. One alternative approach to an XML-centric business layer is a W3C draft standard called XML Pipelines (XPL).
XPL allows a developer to define a series of steps to perform on an XML document. The steps can include XSLT transformations, document generation, filtering, looping, and calls to Java classes. In many cases complex business logic can be performed on a document without resorting to lower-level language code. The XForms model can perform submission actions directly to XPL pipelines eliminating the need for any glue code between the XForms and the business logic. XPL also provides hooks to call Java classes, EJBs, or web services directly, if more complex algorithms are required.
Storage
There are many choices for persisting data in a thick client application, including using embedded relational databases like Derby and HSQLDB, which all require XML-to-relational mapping. If mapping is performed then the XML schema and database schema must be kept in sync.
If the presentation layer and business layer are dealing with XML documents natively, storing the application data as XML rather than converting it into a relational representation removes an entire translation layer. XML databases, such as eXist, XIndice, and Tamino, provide means to store documents as XML and retrieve those documents based on XQuery or XPath queries. With an XML database the schema of the database is completely driven by the documents stored in the database. If elements are added to the presentation layer, nothing needs to change in the database to persist that new data element.
Security
Security in a detached application typically focuses on access security and data security.
Access security, authentication and authorization, is handled either by the application container or surrounding operating system and is not particularly germane to this article, although it is important to most application designs. The most direct way to accomplish authentication is to use JAAS to protect the pages of the application. When combined with the local storage of the XML database, one can securely cache credentials for use when the user is offline.
Data security consists of protecting the data stored on disc to prevent unauthorized access. If the application is using XForms for presentation and an XML database for persistence, the encryption of the data must occur between the business layer and the storage layer. The business layer would emit and consume XML documents containing the encrypted data. The W3C XML Encryption Recommendation specifies a straightforward means of representing encrypted XML in a standard wrapper. A recommended approach is to keep some parent data elements in clear text for document indexing, and isolate all confidential information in a child tree that is encrypted for storage. The application of XML encryption can occur in a pipeline step following any business logic.
Benefits to This Approach
Benefits of this approach include:
-
Greatly reduced touch-points when maintaining the application. In a recent project I constructed an application that allowed TurboTax style workflow over hundreds of data elements within a document. Only three files in the system, the XSD, the model definition, and the page where the data is collected were impacted when fields were added or changed.
-
Using the model bindings within XForms, one can produce very dynamic interfaces without authoring any JavaScript or managing external JavaScript libraries.
-
Increased levels of reuse between thick client applications and online applications
-
The same application can be hosted on a web server for network-based access or bundled into an offline executable for thick client type access.
Problems with This Approach
Some problems with this approach are:
-
The size of the resulting thick client application can be substantial. The aforementioned application with hundreds of elements weighed in with at 70 MB (which included a JRE and installer), but the size of the application does not grow substantially as additional features are added.
-
The XForms programming model is a bit atypical for many developers. Developers may need to do some new mental gymnastics to comprehend a state driven programming model rather than a more sequential or event driven model.
-
Using a Java environment on a Windows system can lead to some headaches when the program needs to access non-standard OS resources.
Conclusion
Using XForms in a standalone application has proven to provide a flexible and maintainable platform for developing both online and offline applications. If your users have difficulty expressing or settling on a set of requirements, then a flexible system like XForms with a document driven infrastructure may be your best bet for success.
| Titles Only | Titles Only | Newest First |
- Re
2010-08-01 13:04:26 tommy2
written essays (http://www.professay.com/) order essay (http://www.easygoessay.com/)
- Latest Hindi Movies and Music
2010-09-09 00:58:55 Demotivators
This is a very informative article. Thanks for sharing.
- Gap Year France Self Catering
2010-09-08 21:03:35 nonamefour
I don't completely agree with everything that has been said here, but it's an interesting point of view.
- Sodium Carboxymethyl Cellulose Sodium Benzoate Suppliers
2010-09-08 22:28:35 kidslong
Good article, Each and every point is good enough.Thanks for sharing with us your wisdom.
- Sodium Carboxymethyl Cellulose Sodium Benzoate Suppliers
- iPhone wallet
2010-09-08 19:59:47 nonamefour
Thanks for sharing guys, some new information here I had not read before.
- replica watch replica rolex watch replica breitling watch
2010-09-08 17:07:24 nonamefour
It's strange there is so little information about this on the web, so thanks for sharing your thoughts.
- Re
2010-08-28 05:39:08 jimmyjamz
Thanks for this, interesting read and quite informative. By the way if you got time, check out my web-site to watch movies online (http://www.watchmovieon.com) . Latest and greatest films there!
- Re
2010-08-24 06:52:09 rockymeet
Thanks a lot for sharing this information. The plan picture has also helped a lot. Look forward to your next post.
business logo (http://www.crea8ivedesign.com/)
custom logo design (http://www.crea8ivedesign.com/)
- Re Xforms
2010-08-23 18:56:25 AliceDrew
I am into web designing and I was looking into various sites to gain some knowledge on Xforms.It is unfortunate that there are hardly any good post on Xforms. I am glad that finally I got what I was searching.Thanks. They should consider using solutions like liquid vitamins (http://www.lifenatural.com/liquidvitamins.htm) to help solve some of the malnutrition problems many developing nations face.
- Re: Badsanierung
2010-09-09 07:24:07 DanMikell
Wow.Pretty interesting. And yes, it sucks to access non-standard OS resources.
- Re: Badsanierung
- Re - xml interaction
2010-08-23 13:06:14 Gee27
This document driven application sounds like it could be perfect for a legal or accounting organization. Setup looks like a breeze. Muscle Cars (http://www.bcautos.com)
- Best Erection Pills
2010-08-23 02:52:49 besterectionpills
http://besterectionpills.net/
Best Erection Pills, Free Erection Pills, Erection Pills Review
Natural Viagra Substitutes and ED Remedies popularity has grown significantly. Billions of
people around the globe use natural remedies now to cure ED related problems. We review them
and find best erection pills.
- Latest Hindi Movies and Music
- Howdy, i read your blog occasionally
2010-07-26 00:12:01 online casino
Howdy, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you prevent it, any plugin or anything you can advise? I get so much lately it's driving me mad so any assistance is very much appreciated.
online casino (http://casinobonuszone.com/casinos/)
Casino online (http://casinobonuszone.com/casinos/)
2010-07-09 07:37:35 injury lawyer
Thanks so much for sharing the information on crowdrise.com.I checked out their site.They do a great job for sure.Moreover the site is also well designed.
injury lawyer (http://theaccidentlawyers.org/injury-lawyer/)
2010-07-02 13:50:00 shinsweera
I am happy to find this post very useful for me, as it contains lot of information. I always prefer to read the quality content and this thing I found in you post. Thanks for sharingFull Color Printing (http://www.printingforu.com/)
2010-07-01 03:13:06 shinsweera
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.bus lines New York (http://www.busnetworkny.com/)
2010-06-30 07:12:19 shinsweera
The post is very nicely written and it contains many useful facts. I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement. Thanks for sharing with us.Dolce Gabbana Sunglasses (http://www.frames4sale.com/)
- My thought
2010-06-29 19:50:38 bloghd86
I think youve made some truly interesting points. Not too many people would actually think about this the way you just did. Im really impressed that theres so much about this subject thats been uncovered and you did it so well, with so much class. Good one you, man! Really great stuff here.
simulation assurance auto (http://simulationassuranceauto.org)
- Italian Recipes Community
2010-08-18 01:03:23 Alba Smith
This post is by far the most simplified Xforms explanation that I have ever come across! I have been trying to make head and tail of it for some time now, searching for videos and stuff and I was literally overjoyed to see the post. The fact and specifications are so simplified that even a novice is sure to grasp it quickly! Thanks for your efforts!
Alba Smith, Italian Recipe Community Center (http://www.ifood.tv/r/italian/recipes)
- Italian Recipes Community
2010-06-08 16:44:33 suduko.com
did we ever get the instructions, a link or what not?
[url=http://sudokusolver.info]online sudoku solver[/url]
2010-05-29 03:44:11 yohan-1991
Great post. I have learned a lot. I am grateful to my friend who told me to visit your blog. Thanks a lot!
-------------------------------------------------------------------------------------------------------
sears scratch and dent (http://www.searsscratchanddent.net) | appliances scratch and dent (http://www.appliancesscratchanddent.com)
- orielly
2010-05-23 18:55:55 venn99
sweet orielly site cash gifting (http://www.cashgiftingcritter.com)
- Carpet Cleaners Burbank - call today 888 612 7993
2009-09-10 09:47:42 herscko
Carpet Cleaners Burbank - call today 888 612 7993
carpet cleaning,rug cleaning,upholstery cleaning,air duct cleaning, water damage
services 24/7.
Deep Cleaning, Shampoo, Steam,Pet Urine Stain,
Odor treatment,organic cleaning
- upholstery cleaning sherman oaks - call today 888 612 7992
2009-09-09 10:55:00 herscko
upholstery cleaning Sherman oaks
Prior to the actual cleaning our technician would first carefully inspect the fabric of your upholstery and recommend the
proper cleaning technique.
- #1 Carpet Rugs Upholstery Cleaning Sherman Oaks call 1-818-386-1022
2009-06-11 15:05:52 whats
#1 Carpet Rugs Upholstery Cleaning Sherman Oaks call 1-818-386-1022
L.A Carpet Care call 1-323-678-2704 Steam or dry Cleaner - Carpet Steam or dry cleaning, Deep Shampoo Carpet Cleaning, Area Rugs cleaning, Mattress Cleaning, Upholstery furniture Cleaning, curtain cleaning, Green Organic Carpets Cleaning.
Los Angeles Carpet Cleaning Company Non-toxic Cleaning, Safeclean organic cleaning Los Angeles, California. Carpet cleaning Los Angeles,CA: We provide rug cleaning, upholstery cleaning, wood floor refinishing & maintenance, flood & water damage restoration, air duct cleaning and much more. LA Carpet Cleaning The Main Los Angeles Local Carpet Cleaners
- installation instructions
2008-06-16 13:33:01 somegeek
I am unclear as to what "XForms Thick Clients" are? Is this a sample application based on Chiba?
Installation instructions would be very helpful.
- installation instructions
2010-08-06 04:48:46 alice.thomas222
professional seo (http://www.seoprofessionalsonline.com) website optimizer (http://www.seoprofessionalsonline.com/website-optimizer.asp) real soft (http://www.realsofttech.com/)
Thanks for sharing
- installation instructions
2010-05-26 02:26:30 hostgator 1 cent
Agreed
- installation instructions
- XPL is not a W3C specification
2008-05-19 14:53:19 Erik Wilde
Just as a clarification: XPL is a three-year-old member submission authored by Orbeon, does not have any endorsement by the W3C, and is very unlikely to be able to compete against XProc.
http://www.w3.org/Submission/xpl/
http://www.w3.org/TR/xproc/
That being said, it may still be very useful in Orebon's products. here is how Orbeon compares them:
http://www.orbeon.com/blog/2007/05/23/xml-pipelines-xpl-and-xproc/
- Example code*
2007-10-19 07:34:13 l0b0
If you want some already working code, you can checkout from CVSROOT :pserver:anonymous@isscvs.cern.ch:/local/reps/moi, or browse the code at <http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/?root=moi>.
* Except for the encryption part
