A Data-Driven Approach using XForms for Building a Web Forms Generation Framework
In a project to build a web-based auto-generated forms framework, we needed to decide whether to use XForms for the 'designer' user interface as well as for the generated forms. In trying to make this decision it became apparent that, at a fundamental level, there are two distinctly different means to develop web-based interfaces. These two means, or approaches, can be described as 'data-driven' or 'behavioural'. We suggest that the Model-View-Controller (MVC) design 'pattern', which is now becoming popular as terminology for describing the basis of several JavaScript web development frameworks, is of limited practical usefulness as it encompasses too many variants. In contrast, the distinction between 'data-driven' and 'behavioural' approaches seems to be a more useful. In particular, it provides clarity in distinguishing the respective benefits of using 'XML technologies' (particularly XPath) versus other object-based alternatives for web application development. This distinction is illustrated using working examples from this on-going project. Some implications, such as the role of schema documents in the data-driven approach, the practicality of writing XML 'as code', and issues encountered with the 'XRX' architecture are also discussed.