XRX/Background Technologies
From Wikibooks, the open-content textbooks collection
Contents |
[edit] Standing on the Shoulders of Giants
The XRX architecture did not appear overnight. It was only made possible by the diligent work of many standards organizations over many years. Clearly the XML standard is one that enabled most of the key technologies. But the role of HTML, HTTP, CSS, XPath, XML Schema, XSLT, XForms, REST, Schematron and XQuery and other standards created by the W3C need really must be appreciated to understand the true scope of the standardization efforts. Here is a brief overview of these technologies and a rough order that they were created and could be learned.
[edit] XML Syntax
The syntax of using less than and greater than characters to bracket data elements embedded in a text document goes back to early markup languages such as SGML. SGML was the language that the HTML standard was modeled on. SGML was a complex standard that required the user to be familiar with many technologies so in 1997 an effort was made to simply the standard and the XML standard was first published by the W4C.
[edit] XPath
The XPath language is a smaller data-selection language that is used extensively within other XML standards. Both our client technology (XForms) and our server technology (XQuery) heavily depend on using XPath to surgically remove the elements we want from much larger XML tree structures. If you are familiar with UNIX or web file system paths you may already have a good mental model for how XPath expressions work. For the purposes of this book we will be using mostly very simple XPath expressions that simply narrow XML data sets using "child" paths and "where" paths called predicates.
[edit] XForms
Although this wikibook is not intended to be a book on XForms, the use of XForms makes client application development very consistent with the rest of the material in this book. We will cover just enough background to help you understand the key architectural features of XForms and how it leverages REST interfaces to get and submit data to the server. Technically you can still benefit from the XRX architecture without using any XForms applications on the client but you may find you duplicate most of the components that are already in XForms when you do this. Central to the concepts in XForms are the MVC architecture, Binding, the dependency graph and declarative submission elements. If you are a fan of JavaScript and AJAX you can implement much of the functionality of XForms using these tools. But this topic is not covered in this wikibook. In fact many people use XRX architecture specifically to avoid having to learn JavaScript and the myriad of JavaScript frameworks that are popular today.
[edit] XQuery
Anyone that is familiar with the SQL language understand the role of the SELECT statement in selecting the appropriate tables, columns and rows from a relational database. XQuery on the surface may seem only like a version of SQL for XML databases. What we have learned is that because XQuery can be easily extended, it has taken on a much larger role then just a reporting language for XML databases. For us, XQuery promises to be the only server language that we will ever need. Because it can be easily extended it has already been extended in hundreds of useful ways.
The first major extension has been the ability of XQuery to update XML data. Not that this was not considered important to the original XQuery authors, just that they had to focus on data selection first and updates second.
[edit] CSS
One of the most elegant aspects of the XForms model is that it was designed from the ground up to work with the W3Cs Cascading Style Sheet (CSS) standard. That means that almost every aspect of how web application controls are arranged on the screen can be managed by a single site-wide CSS file. The consequence is that if you decide to make a site-wide change only a single file needs to be changed. The downside is that the level of CSS support varies dramatically in many browsers. Since XForms is implemented as a separate namespace and CSS is designed to be namespace aware, most modern style sheets for XForms leverage this basic feature. The challenge is that not all browsers have implemented the CSS namespace functions. This issue is complex and any XRX architecture that is building applications to support older browsers must take these things into consideration.