> > 3) For the same reason, it will save bandwidth. The XML data will > > probably take less space than the fully-formatted stuff I'd have to > > spit out with "regular" HTML, and the XSL stylesheet can probably be > > cached by the user's browser.
This is a common misperception that should have been corrected by now. XML won;t save you any bandwidth over traditional HTML, in fact it will require significantly more - 50-100% in practice. The reason for this is that you still need to send the formatting info along with the data but now it will be done as two, usually three, separate http GET messages: one for the XML, one for the XSL stytle sheet, (or two for the HTML/XHTML plus CSS style sheet) due to the duplication of tagging between the files plus the http overheads this will invariably result in extra bandwidth over a single HTML file with data embeded. On subsequent updates of the same page it might seem like a bandwidth saving is possible, and thats true compared to a complete page refresh, but best practice today refreshes web pages by using JavaScript to update the fields in life via a binary message, so copmpared to best practive XML will again increase bandwidth - typically by 5-10 times in this case. > > 4) In the same line of reasoning, it'll also save CPU time: XML data, > > being smaller, is generated faster than the equivalent HTML. Its not much smaller and requires more tagging information, plus you need to run a validation check for "well formedness" so the CPU gain is minimal at the server and the extra cost of parsing at the browser is significant... Your users could expect to see a 1-2 second slowdown in response time. <RANT> This is something of a hot button for me just now -= I see XML being pushed because it makes life easier for developers but it incurs extra costs almost everywhere else. Given that in a typical project, development costs are only 20-30% of the total the net effect is to increase project costs and reduce performance. IMHO far too few software engineers have been trained to properly engineer their solutions taking account of whole-life costs, they only see the programming effort. </RANT> Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor