XRX (web application architecture)
Encyclopedia
In software development
Software development
Software development is the development of a software product...

 XRX is a web application architecture based on XForms
XForms
XForms is an XML format for the specification of a data processing model for XML data and user interface for the XML data, such as web forms...

, REST
Rest
Rest may refer to:* Leisure* Human relaxation* SleepRest may also refer to:* Rest , a pause in a piece of music* Rest , the relation between two observers* Rest , a 2008 album by Gregor Samsa...

 and XQuery
XQuery
- Features :XQuery provides the means to extract and manipulate data from XML documents or any data source that can be viewed as XML, such as relational databases or office documents....

. XRX applications store data on both the web client and on the web server
Web server
Web server can refer to either the hardware or the software that helps to deliver content that can be accessed through the Internet....

 in XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 format and do not require a translation between data formats. XRX is considered a simple and elegant application architecture due to the minimal number of translations needed to transport data between client and server systems. The XRX architecture is also tightly coupled to W3C standards (CSS
CSS
-Computing:*Cascading Style Sheets, a language used to describe the style of document presentations in web development*Central Structure Store in the PHIGS 3D API*Closed source software, software that is not distributed with source code...

, XHTML 2.0, XPath
XPath
XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document...

, XML Schema) to ensure XRX applications will be robust in the future. Because XRX applications leverage modern declarative languages
Declarative programming
In computer science, declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. Many languages applying this style attempt to minimize or eliminate side effects by describing what the program should accomplish, rather than...

 on the client and functional languages on the server they are designed to empower non-developers who are not familiar with traditional procedural languages such as JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

, Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 or .Net.
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...


Overview of XRX

XRX is a zero translation application architecture that uses XML to store data in the client web browser, on the application server and in the database server. It is because each of these layers use XML as the same structural data model that XRX applications do not have to translate data structures to and from both object and relational data structures. Because of the lack of need for translation, XRX is considered to have a clean and elegant design. The XRX web application architecture allows developers to focus on the business problem and not the translation problem. XRX benefits from several advances in software technology:

Client Architectural Features

  • A Model-View-Controller
    Model-view-controller
    Model–view–controller is a software architecture, currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" from the user interface , permitting independent development, testing and maintenance of each .Model View Controller...

     architecture that separates the data from its' presentation and business logic.
  • A single element (xf:submission) for all server submissions. This replaces much of the JavaScript code required in most AJAX applications.
  • An advanced event model (XML Events
    XML Events
    In computer science and web development, XML Events is a W3C standard for handling events that occur in an XML document. These events are typically caused by users interacting with the web page using a device such as a web browser on a personal computer or mobile phone.- Formal Definition :An XML...

    ) consistent with W3C standards that frees applications from having to deal with vendor-specific and browser-specific event handling.
  • A Dependency graph
    Dependency graph
    In mathematics, computer science and digital electronics, a dependency graph is a directed graph representing dependencies of several objects towards each other...

     that is used to store the dependency structure of the client controllers. This frees the developer from having to manually update either the model or the views when data changes in an application. This allows spreadsheet-like applications to be created on the client with very little effort.
  • A Declarative (programming) style that allows most client XForms applications to be created using a small set of approximately 20 elements. This allows rich client applications to be created without knowledge of JavaScript or other procedural scripting languages.
  • An easy-to-extend system for creating new user interface controls using the EXtensible Bindings Language. This allows developers to add new controls at any time without fear of incompatibilities with W3C standards.

Server Architecture Features

  • Many native XML databases have built-in REST interfaces making each XQuery inherently a RESTful web service.
  • A functional programming
    Functional programming
    In computer science, functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state...

     model that promotes side-effect
    Side effect (computer science)
    In computer science, a function or expression is said to have a side effect if, in addition to returning a value, it also modifies some state or has an observable interaction with calling functions or the outside world...

     free systems that are easier to debug and easier to run on multiple processors.
  • An easy-to-extend system using XQuery function and modules.

Both Client and Server

  • Both XRX client and server components support a wide range of XML related standards such as XPath
    XPath
    XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document...

    , XML Schema and XML Namespaces
  • Consistent use of REST interfaces to exchange data between the client and server for all transfers of data including as-you-type data checking and suggest functions
  • Consistent integration of W3C standards including use of XPath and XML Schema data types
  • A large library of standard of functions used on both the client and server

Overall Benefits of XRX

One of the principal benefits of the XRX architecture is that it avoids the requirement to "shred" complex data structures into relational structures and then reconstitute the data back into structures when a record is edited on the client.

Another benefits of the XRX Web application architecture is that it avoids most of the problems around the object-relational impedance mismatch
Object-Relational impedance mismatch
The object-relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system is being used by a program written in an object-oriented programming language or style; particularly when objects or class definitions...

.

Another advantage is that the client developer does not have to learn JavaScript on the client.

Comparison with Traditional Object/Relational Web Application Architectures

Many traditional web application architectures created in the late 1990 were based on middle object tiers and persistence layers that used tabular data streams and relational database
Relational database
A relational database is a database that conforms to relational model theory. The software used in a relational database is called a relational database management system . Colloquial use of the term "relational database" may refer to the RDBMS software, or the relational database itself...

 systems. Because each of these layers used different structures to store the models the systems required much additional complexity to translate between layers.

History of XRX

Early examples of using a zero-translation architecture in multi-tier systems can be traced back to the rise of object-oriented databases in the 1990s. See OODBMS History

Mark Birbeck suggested that the combination of XForms, XQuery with REST interfaces between the two had many advantages in a meeting to the UK XML User Group in September of 2006
. His presentation was one of the first to specifically suggest that the combination of three technologies: XForms and XQuery with REST interfaces would have surprisingly beneficial effects. Mark termed this process "Skimming" but that term did not seem to be contagious.

Erik Bruchez of Orbeon spoke at the XML 2007 conference on Boston in December 2007.
. His presentation titled: XForms and the eXist XML database: a perfect couple, Erik showed that many people were discovering synergistic benefits of XForms on the client and XQuery on the server.

The label for XRX was suggested by a blog posting by Dan McCreary on December 14 of 2007
. It was in this article that Dan suggested the need for a contagious meme for the ideas behind the XRX architecture.

Generalizations of XRX

Although XRX was originally intended to connote the use of XForms on the client, REST as an interface and XQuery on the server, other proponents of the symmetrical use of XML on the client and server have generalized the term to encompass any XML-centric web client and any server that can store and query XML documents. This use of XRX is generally referred to as "shallow XRX". These generalizations do benefit from a simplified zero-translation architecture but many do not benefit from REST interfaces, XPath for consistent data selection, declarative systems in the client, and functional languages on the server (one of the key aspects of XRX). Use of all three technologies (XForms, REST and XQuery) is referred to as "deep XRX".

Although XRX architecture is centred around XForms and XQuery, it does not preclude the use of other technologies that manipulate XML natively, such as XSLT
XSLT
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...

, XProc
XProc
XProc is a W3C Recommendation to define an XML transformation language to define XML Pipelines.Below is an example abbreviated XProc file: This is a pipeline that consists of two atomic steps, XInclude and Validate...

, and XSL-FO.

Products Built With XRX

Patriot Data Systems Exchange Builder Metadata Registry Management System

See also

  • Web application framework
    Web application framework
    A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development...

  • XForms
    XForms
    XForms is an XML format for the specification of a data processing model for XML data and user interface for the XML data, such as web forms...

  • XProc
    XProc
    XProc is a W3C Recommendation to define an XML transformation language to define XML Pipelines.Below is an example abbreviated XProc file: This is a pipeline that consists of two atomic steps, XInclude and Validate...

  • XQuery
    XQuery
    - Features :XQuery provides the means to extract and manipulate data from XML documents or any data source that can be viewed as XML, such as relational databases or office documents....

  • REST
    Rest
    Rest may refer to:* Leisure* Human relaxation* SleepRest may also refer to:* Rest , a pause in a piece of music* Rest , the relation between two observers* Rest , a 2008 album by Gregor Samsa...

  • XiB - XQuery in browser

Additional Resource

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK