具有极大数据表的客户端表呈现

时间:2022-08-24 13:08:33

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

问题:客户X要求重新考虑使用MSIE中的XML DataBinding和Databound表的页面以跨浏览器工作。

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

问题:模仿MSIE跨浏览器的MSIE DataBinding功能(即MSIE和Firefox)的最佳实践方法是什么。

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

功能:客户X已在单个网页中使用MSIE DataBinding获取以下内容...

  • a single-url xml dump in its entirety as the datasource (assume no server-side paging and no cross-domain problems)
  • 一个单url xml转储作为数据源(假设没有服务器端分页,没有跨域问题)

  • web page markup that does nothing more than specify the datasource URL (just like MSIE)
  • 网页标记,只指定数据源URL(就像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
  • 能够加载非常大的表(例如最小3k记录)而不会在客户端触发javascript“内存不足”或“延迟”错误

  • 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)
  • 能够在普通的HTML表格元素中执行此操作并且可以进行行条带化(可选但不是必需的,因为MSIE不会这样做)

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.

背景:您可能必须熟悉MSIE DataBinding才能与此特定问题保持同步。 MSIE的这一功能允许您指向单个XML数据源(没有特定模式,只要它在标准“表”中),并且浏览器可视和异步地呈现数据。

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.

错误启动:客户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
  • JQuery:非常适合加载数据和清理可维护的HTML标记,但是大型数据源在呈现客户端时会导致延迟和内存问题

  • 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
  • XSLT:这会吓到客户X,因为它涉及的不仅仅是在

    标签上指定“datasource”属性,因此在他看来似乎不太可维护
  • 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.
  • 服务器端数据分页:这不是一个选项,因为客户X虔诚地想要避免在服务器端分割XML数据或进行任何“数据整理”。

2 个解决方案

#1


1  

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

你真的没有除Javascript / XSLT和服务器端之外的任何其他选项。

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".

我可能会使用XSLT,针对它的论据完全没有实际意义 - “因为它涉及的不仅仅是在

标签上指定”datasource“属性” - *任何*解决方案将变得更加复杂然后简单地指定一个“数据源”。

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

我不确定该页面是否会逐步加载XSLT,蜘蛛感觉不然。任何人?

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.

如果做不到这一点你总是可以使用服务器端选项并且也可以使用任何分页。您仍然可以逐步加载页面。就浏览器而言,它只是常规的html。

#2


1  

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

您最好的选择可能是使用CSS来根据需要格式化输出。

#1


1  

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

你真的没有除Javascript / XSLT和服务器端之外的任何其他选项。

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".

我可能会使用XSLT,针对它的论据完全没有实际意义 - “因为它涉及的不仅仅是在

标签上指定”datasource“属性” - *任何*解决方案将变得更加复杂然后简单地指定一个“数据源”。

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

我不确定该页面是否会逐步加载XSLT,蜘蛛感觉不然。任何人?

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.

如果做不到这一点你总是可以使用服务器端选项并且也可以使用任何分页。您仍然可以逐步加载页面。就浏览器而言,它只是常规的html。

#2


1  

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

您最好的选择可能是使用CSS来根据需要格式化输出。