网页电网,客户端绑定VS.服务器端HTML生成 [英] Web Grid, Client side Binding VS. Server side HTML generation
问题描述
我工作在一个ASP.NET Web应用程序替换现有的网络网格,一个新的实现。现有的电网是强大的,但不够灵活。它也带来各种框架,我们不喜欢对我们的网页。
虽然寻找到我发现我可以打破现有的解决方案分为两个主要的方法存在的选项。旧的方法是重新由ASP.NET GridView的最佳psented $ P $。这是产生所需的HTML服务器上,根据一组给定数据的一个典型的ASP.NET控制。较新的方法取决于客户端呈现,主要使用jQuery。一个很好的例子是 jqGrid的。只有数据被发送到客户端(通常与JSON或XML)
在GridView的情况下,如果我想要一个AJAX的行为,我会的东西,如一个更新面板来实现它。
- 是否有一个明确的选择,我应该使?
- 有殊途同归活泼的行为我的jqGrid(甚至多条记录)得到一个很好的机会,与服务器端渲染控制?
- 有一些结合了这两种方法混合的实现?
-
有是你应该做没有明确的选择,但值得注意的
,改变客户端AJAX控件是pretty大范
转变,会要求你重新思考如何完成几乎所有的
与电网。 -
去中途(通过使用服务器端控件,如
GridView控件
在的UpdatePanel
)将有可能改善用户体验,因为
该网页将仍然是可见和反应,而它的更新。但
在的UpdatePanel
风格仍然是笨重相比,新的客户端只
网格,因为这种技术将所有的页面的表单数据时,它回发
(包括在GridView控件
,如果ViewState是打开所有的ViewState
上)。一个简短的注意事项:GridView控件
不兼容的UpdatePanel
在GridView.EnableSortingAndPagingCallbacks
设置为true。 -
我没有使用任何他们混合动力车实现(如Coolite的外部包装为.NET),但他们是在那里。有至少一个很好的SO讨论这个话题和可用这里不同的网格。
I'm working on replacing an existing web grid in an ASP.NET web application, with a new implementation. The existing grid is powerful, but not flexible enough. It also brings with it all kind of frameworks we don't like to have on our web pages.
While looking into existing options I noticed I can break the available solutions into two main approaches. The older approach is represented best by the ASP.NET GridView. This is a classic ASP.NET control that generates the needed HTML on the server, based on a given set of data. The newer approach is depending on client side rendering, mainly with jQuery. A good example would be jqGrid. Only the data is sent to the client (Usually with JSON or XML)
In the GridView case, if I want an AJAX behavior, I would have to implement it with something like an update panel.
- Is there a definitive choice I should make?
- Is there a good chance of achieving the same snappy behavior I get with jqGrid (even with many records), with server side rendered controls?
- Is there some hybrid implementation incorporating both approaches?
There is no definitive choice you should make, but it's worth noting that changing to client-side AJAX controls is a pretty big paradigm shift that will require you to rethink how you do nearly everything with the grid.
Going half-way (by using a server-side control such as
GridView
in anUpdatePanel
) will likely improve the user experience, since the page will still be visible and responsive while it's updating. But theUpdatePanel
-style is still clunky compared to the new client-only grids, because this technique sends all the page's form data when it posts back (including all that ViewState in theGridView
, if ViewState is turned on). One brief note of caution:GridView
is not compatible withUpdatePanel
whenGridView.EnableSortingAndPagingCallbacks
is set to true.I haven't used any of they hybrid implementations (such as Coolite's Ext wrappers for .NET), but they are out there. There was at least one good SO discussion about this topic and the different grids available here.
这篇关于网页电网,客户端绑定VS.服务器端HTML生成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!