#native_company# #native_desc#

PHP, XML, XSL, XPATH and Web Services Page 7

By Mashooq Badar
on May 6, 2004

A XSL based Presentation Layer
Now that we are getting all our data in XML, all our PHP pages have to do is use the Content Engine to get the relevant data in XML and supply the link to XSL that represents the presentation logic for that page. The XML is sent to the browser with a link to the XSL that transforms it into HTML. Most good web-browsers come with a built in engine to do the transformation at the client side. However if the browser does not support XSL transformation, this could be determined at the server side the server can do the transformation and send the result for those browsers. Note: for those occasions when the layout of the page itself needs to change dynamically we can embed PHP in the XSL that gets executed when the browser requests the XSL for a particular XML.
The proposed architecture provides the following set of benefits:
  • A uniform and easy to use interface to the underlying data store(s) without having to delve into the depths of SQL /File IO and the exact locations of these data sources.
  • Abstraction from database vendor specific operations.
  • A separation of the presentation from the underlying business rules and data access.
  • While allowing for the separation of the presentation, flexibility to use a powerful scripting to allow for the presentation to dynamically change depending on the result of business rules.
  • Scalability to support heavy traffic of voluminous data.
  • Simplicity to allow for development in relatively small timescales.
PHP??s comprehensive support for XML-based technologies make??s it an ideal platform for developing rapid Web Service Based N-Tier applications. Using XML as the standard data format within an N-tier application greatly simplifies the separation of concerns that is the corner stone of such architectures.
It would be interesting to see how well this proposed architecture performs in a real-world application given the real-world security and performance concerns.
This article was developed as a direct result of a team exercise for the e-Commerce Technologies Module as part of MSc in Advanced Comp Science at the University of Manchester. The other team members are:
  • Ashwin Appadoo
  • Gary Carroll
  • Sanket Gupta
  • Nitin Kathuria
  • Alvin Ragaven
  • Sunil Rao
  • Robin Zarine