Wednesday, March 2, 2005
Benefits of Using XML Technologies for Web Applications
Reason 1: XML is the standard for exchanging data Increasingly data that a Web application needs is available in XML format. Increasingly business logic is not mixed with the presentation layer to form an application, but is made available to the presentation layer as a reusable service and web services are typically used for this purpose. Consequently web apps have to deal more and more with data in XML format. Reason 2: XML is very appropriate format to describe systems The algorithmic parts of an application are in the business logic, and as noted earlier, increasingly business logic is not mixed anymore with the presentation layer. This means that the presentation layer instead of being programmed, can be described, using a set of specific higher level and standard languages. The different aspects of the presentation layer can be described in XML files. For instance, page templates can be written in XSLT that generates XHTML, web forms described with XForms and the data entered by the user validated with W3C XML Schema or Relax NG. Combining XML technologies, the presentation layer can be written entirely in XML files, that can be easily modified to adapt to end-users requirements. Conclusion Because of those two reasons, XML documents quickly become a centerpiece of web applications, both as a data exchange format and to describe applications. It makes sense to use XML technologies built to deal with those XML documents, rather than going through the process of transforming XML into objects. Java provides a wonderful platform but it creates a tunnel vision amongst certain architects who have come to think of everything in term of objects. To some people equipped with a hammer, everything looks like a nail, but everyone else will want to use XML tools to work on XML documents. Don't you?