A key AJAX design choice is how we are going to handle client-server data transfers and client-side content rendering.
The two most obvious choices are:
- Data exchanges are in XML and content is rendered client-side via XSLT.
- Data exchanges are in JSON and content is rendered client-side via templates.
Each has its relative merits, and each will require some development on our part to implement. It might make sense to make a community decision around which of these options to pursue, as then we could pool efforts. For some SoC projects, e.g., the Form Builder, the data and content rendering model is a key early decision that will shape much of how the project is developed.
So here's an attempt to capture these options in a nutshell.
|Explained||A good article at Ajaxpatterns Browser-Side XSLT. See also http://www.xml.com/pub/a/2005/02/23/sarissa.html||A good article at Ajaxpatterns Browser-Side Templating.|
|Examples||This is the model used in Google Maps, GMail, etc.||?|
|Standards||XML and XSLT are W3C standards||JSON is a widely supported language construct. Templating is non-standard and requires custom implementations.|
|Drupal practice||Little XML/XSLT work to date in Drupal. However, XSLT could fairly readily be adapted from existing theme_ templates.||JSON has existing profile and support. Client-side templates could fairly readily be adapted from existing theme_ templates.|
Comments please! Merits or issues in either of these? What's our best approach?