I’m searching for input on how one would go ahead with building a website, using XML.
I see that there are several areas where XML can fit into the architecture, but I’d like some feedback on this, preferably from real life projects.
1. Presentation done with XSLT on top of XML. - Benefits: - Easy to add new interfaces. - Separation of functionality & data
- Drawbacks: - Need to learn XSLT - Takes more work than hacking it up in ASP/PERL
2. Creating a website as a “thin” client using Javascript & DHTML to communication with XML services, and dynamically generate the presentation on the client. - Benefits: - All the benefits of Java applets without the heavy download - - Drawbacks: - At the moment very few XML enabled browsers - Back in the “write for every individual browser” paradigm
Anyway, I’d appreciate some feedback on these early ideas of how XML will fit into real life projects and architechtures.
The Software AG webshop http://www.webshop.softwareag.com/ uses XML as the underlying data layer (the catalog,orders ,user profiles,…) are stored in a Tamino in XML.
The technique we used is the following : - Presentation layer 1 : JSP pages calling Java Beans. These JavaBeans speak HTML (They deliver the data as HTML Tables, ect). So the web pages can be composed by the JSP people
- Presentation layer 2 : the XSLT layer. This is the JavaBeans layer that translate XML to HTML using the stylesheets. Of course the stylesheets have a big influence on the look and feel of the presentation1. This is where a problem can appear if your web designer doesn’t know about XSL. There are multiple solutions : * based on a graphical prototype, let a XSL specialist write the XSL * Use standardized XSL → HTML outputs on wich you can apply a CSS = combination of CSS and XSL. * Use a tool that can help to create the XSL.
- Business Logic layer : these are Java components that speak XML. The Java Layer can integrate all functional systems.
- Data layer : a XML Information Server, integrating all Data Sources.
Indeed writing XSL is still a programmer task. But by using this technique your system will gain in flexibility. You should be able to revamp your website by just exchanging the XSL. This is certainly the case for portals like jetspeed http://java.apache.org/jetspeed/
sunShine is our e:integration product built on top of Cocoon and offering portal,user authentication,a simple CMS and connectors to XML sources such as Tamino. All done with XML and XSL.