views:

888

answers:

2

Problem: Customer X has requested that pages using XML DataBinding and Databound tables in MSIE be re-factored to work cross-browser.

Question: What is the best-practice way to mimic the MSIE DataBinding feature of MSIE cross-browser (i.e., in both MSIE and Firefox).

Features: Customer X already gets the following using MSIE DataBinding in a single web page ...

  • a single-url xml dump in its entirety as the datasource (assume no server-side paging and no cross-domain problems)
  • web page markup that does nothing more than specify the datasource URL (just like MSIE)
  • the ability to load very large tables (e.g. 3k records minimum) without triggering javascript "out of memory" or "latency" errors on the client side
  • the ability to carry this out in a normal HTML table element with the possibility of row-striping (optional but not required since MSIE does not do this already)

Background: You probably have to be familiar with MSIE DataBinding to get in synch with this particular question. This feature of MSIE allows you to point to a single XML data source (of no particular schema, just as long as its in a standard "table") and the browser renders the data visually and asyncrhonously.

The benefit of this is that the page renders quickly, because the page load does not wait for the entirety of the table to be filled in before showing the user some output. The table rows get filled in progressively.

False Starts: The following have already been attempted and rejected by Customer X.

  • JQuery: works great for loading the data, and clean-maintainable HTML markup, but large data sources cause latency and memory problems when rendering client-side
  • XSLT: this scares Customer X because it involves a lot more than just specifying a "datasource" attribute on a <table> tag, and thus appears to be less maintainable in his opinion
  • Server-side data pagination: this is not an option because Customer X religiously wants to avoid segmenting the XML data or doing any "data munging" on the server side.
+1  A: 

You really don't have any other options other than Javascript/XSLT and server side.

I'd probably go with XSLT, the argument given against it is completely moot - "because it involves a lot more than just specifying a "datasource" attribute on a <table> tag" - _*ANY*_ solution is going to be more complex then simply specifying a "datasource".

I am not sure however if the page would load progressively with XSLT, spider senses suggest otherwise. Anyone?

Failing that you could always go with a server side option and do-away with any pagination as well. You would still get the page progressively loading as well. As far as the browser is concerned it is just regular html.

DaRKoN_
Note, javascript is definitely the only client-side option. The question is more of how to handle large datasets while still avoiding the unfriendly memory and performance restrictions with purely client-side code.
dreftymac
+1  A: 

Your best bet is probably to use CSS to get the output formatted as desired.

Adam Hawkes