Web Development with XRX

XRX or XForms/REST/XQuery is a simple and elegant web application architecture that leverages modern declarative and functional programming systems. XRX allows the developer to create rich-client web applications that perform complex functions without the need for middle-tier objects, relational databases or client-side JavaScript.

XRX is based on three standards:

  1. XForms on the client
  2. REST interfaces
  3. XQuery on the server

These three standards have been created by the W3C standards organization and represent their vision of the future of web application development. For discussions on alternate definitions of the XRX web application architecture see What is XRX.

This wikibook is intended as an example that specifically uses all three of these technologies to create small applications that work together.

edit

There are two sibling Wikibooks that this Wikibook is designed to complement.

The XForms Tutorial and Cookbook Wikibook has over 90 sample XForms application to help you become familiar with the XForms model and XForms controls. Although XForms has only 21 elements they can be combined in many different ways to build very complex web clients.

The XQuery Wikibook is focused on using the XQuery language with almost all of the sample programs using the eXist native XML database.

The XForms Wikibook has minimal dependencies on which server you use to host your web forms. Almost all of the XQuery Wikibook does not assume any prior knowledge of XForms. This book, on the other hand, assumes that you will be using both XForms and XQuery to create a complete web application development environment.

Subversion Repository

edit

Many of the example programs in this cookbook are now being stored in a Subversion repository on GoogleCode. The URL for the XRX GoogleCode is here:

http://code.google.com/p/xrx

If you are using an IDE with a Subversion client such as Eclipse or oXygen, the URL for the repository is:

https://xrx.googlecode.com/svn/trunk

If you would like a read-only copy, you can use the non-SSL URL

http://xrx.googlecode.com/svn/trunk

Table of Contents

edit

Introduction

edit
  1. Introduction - an overview of the goals of this Wikibook and the intended audience  
  2. Benefits of XRX - an analysis of the technical benefits of the XRX web application architecture  
  3. XRX Application Server - how XRX has allowed the XQuery language to move from a database language to an application language  
  4. Building your First XRX Application - some suggestions on how to get started building your first XRX application  
  5. Background Technologies - a summary of the background technologies you will use to build XRX applications  
  6. Patching you Browser to Support XForms - how to add functionality to support the W3C XForms standards  
  7. XSLTForms and eXist - getting XSLT forms to work with eXist  

Common Patterns

edit
  1. Application Modularity - XRX applications can be managed and reused if they have modular structure  
  2. Data Encapsulation - XRX applications contain and manage their own data sets and provide XQuery functions as interfaces  
  3. Standard Views - XRX applications contain standardized views of their data  
  4. Searchability - XRX applications provide tools to search their own data and interfaces to allow it to participate in site-wide search functions  
  5. Code Table Management - XRX applications manage code tables (selection lists) and make it easy for non-programmers to maintain these codes  
  6. Server Field Validation - XRX can use server-side XQuery to validate a field  
  7. Breadcrumb Navigation Bar - XRX applications are nested in a hierarchical structure an navigation breadcrumbs are context aware  

Sample Applications

edit
  1. Configuration File Editor - a simple file, single user XML configuration file editor using XForms and eXist  
  2. Dictionary Editor - a simple round-trip create/update edit using XForms and eXist  
  3. Regular Expression Builder - a demonstration of using regular expressions in XQuery  
  4. Autoincrement File ID - save an instance from a form into a collection and have the id automatically created by the server  
  5. Move a Resource - simple resource move utility  
  6. Save File Dialog - saving a file to a collection similar to a save dialog panel  
  7. Login and Session Management - a login panel and methods of authenticating users  
  8. File Locking - strategies to prevent multiple users from overwriting each others updates 
  9. Selection List Generator - a tool to generate selection lists from code tables  
  10. Glossary Term Editor - a tool to manage specialized business vocabularies  
  11. FAQ Manager - a tool to manage frequently asked questions  
  12. Detecting Duplicates - checking for duplicates as you type  
  13. Data Element Editor - a tool to manage ISO/IEC 11179 data elements  
  14. Selection List Management - tools to manage selection list codes in your XForms  
  15. Customizing Selection Lists - customize the selection list based on role or other session variable  
  16. Table Sorting - customization of table sort order  
  17. NIEM Services - tools to create NIEM web services  
  18. Product Ratings - allows users to assign a rating of one to five stars to an item in a collection  
  19. Business Rules Template - a sample of a simple business rules template  
  20. Metadata Shopper - a shopping cart tool for your metadata elements  
  21. Subset Generator - a program that generates a subset of a metadata registry that is imported into an XML Schema  
  22. XForms Generator - convert an XML Schema directly into an XForms application  
  23. XForms Instance Generator - convert an XML Instance directly into an XForms application  
  24. Large XForms Generator - create large XForms using a single REST parameter  
  25. User Manager - track users and manage their login attempts, session timeouts and roles  
  26. Map Navigation - add map navigation to your XRX applications  

XRX Patterns

edit
  1. Content Routing - inspecting the content of an XML document to apply save rules  
  2. URL Rewriting - allow URIs to reflect the logical structure of a service, not the collection structure of the database  
edit
  1. LAMP - Linux, Apache, MySQL and PHP
  2. AJAX - Asynchronous JavaScript and XML
  3. Adobe Flex - Adobe's system for building rich-client interfaces (Now Apache Flex)
  4. Microsoft Silverlight - Microsoft's strategy for putting XML in the browser (Discontinued)

References

edit
  1. Related Wikibooks
    1. XForms
    2. XQuery