* http://www.w3.org/MarkUp/Forms/ * http://www.w3.org/TR/xforms/ * http://xformsinstitute.com/ '''What are XForms?''' XForms are an MVC-based declarative client-based technology for capture, validation, calculation and assessment of user data. In application they're a cross between a spreadsheet and XSLT. XForms are defined by an open W3C standard that will become standard in XHTML 2.0, but their implementation is already available for all browsers via a tiny (77KB) GPLed javascript or tinier (60KB) Flash module. '''Purpose''' Thin client XForms can * bind data to an xml file * auto-generate from XML schemas * validate against schema data types * respond to user input in real time (versus submission time) * enforce relations amongst entries * prefill, save and restore values to and from a file * modify the style of each control depending on the device they are displayed on (browser versus mobile versus voice, etc.) * require specific user interactions and inputs * disable input controls depending on circumstances and work states * change sections of a form depending on circumstances and work states * input variable length arrays of data * output entries and quantities derived from entries * submit the same form to different servers * integrate directly with Web services using SOAP * send validated result data directly to a server in XML format. For all these application behaviours XForms require no client or server-side procedural code or scripts - they are pure declarative XML. '''Architecture''' XForms architecture is based on a spreadsheet-like declarative calculation model that keeps track of computational dependencies so chained calculations properly resolve themselves in unison with changing input data. Calculation resolutions can include CRUD operations on the underlying XML model as well as all the usual arithmetic and logical calculations on all the usual datatypes. XForms use XML to define model data, XPath to bind to XHTML user interface views, and XML Events to adorn this binding with GUI and programmatic controllers. This creates the classic '''MVC''' application pattern - any GUI gesture can be mapped to recalculation, revalidation, refresh, scrolling, filtering, or other behaviours of repeating line item tables, and to declare and execute embedded Editors, Unit Tests, and User Acceptance Tests for these mappings - directly in the XML without any procedural scripting. Pub-sub logic is also fully realizable with XML Events, removing the need for a client-side procedural application backbone. This is not to say XForms is intended to replace all scripting - there will likely still be scripts for GUI special effects and exotic validations. But economical replacement of about 80% of procedural scripting is plausible. And this is just scratching the surface. '''Interoperation''' As a standard XForms are platform and device independent. As part of XHTML 2.0 they automatically integrate with * WML - mobile phones & handhelds - free Oracle player * VoiceXML - spoken, automated call-center web data - free IBM player * SVG - Scalable Vector Graphics for display of histograms and other graphs - about a dozen players * XML Signatures - digital signatures for XML * Braille devices, and other new output modalities. Likewise XForms input is not restricted to keyboard and mouse but can take input from * scanners and digital cameras * microphones * pens and digitizers * video sources * 3D input devices * biometric input devices ---- See also: XformsApplications