SlickGrid与JQGrid [英] SlickGrid Vs JQGrid

查看:58
本文介绍了SlickGrid与JQGrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在slickgrid和jqgrid之间做出选择.我认为它们都具有丰富的功能. Jqgrid具有出色的文档,因此易于安装和使用.跑步.

I am trying to decide between slickgrid and jqgrid. I think both of them are feature-rich. Jqgrid has great documentation, so its easy to get up & running.

由于我听说平滑的网格要快得多,所以我试图了解它们在实现细节方面有何不同.我只是想知道是否有人做过基准测试/了解每个网格的内部结构以提供一些有用的信息.

I am trying to understand, how different they are, in terms of implementation details since I heard slick grid is lot faster. I was just wondering if anyone did some benchmarking / know the internals of each grid to provide some useful inputs.

编辑1 :@oleg-感谢您的回复.抱歉,我担心我可能没有提供足够的详细信息.尽管我没有所有用例,但是当数据较小时,我将同时使用本地数据,而在数据较大时,我将同时使用服务器端虚拟滚动,过滤,排序等. Json将是主要的数据来源.我试图从可能了解这两个网格内部的人那里获得输入.我对客户端的实现了解不足,无法自己判断.我的一位同事提到,平滑网格可能会更好,因为它是在虚拟渲染和键盘支持下开发的.我的问题是开放式的,但是如果不偏离核心设计来处理任何这些问题,网格的核心实现也可能使其在更复杂的场景中也有效,例如子网格,树木等.

@oleg - Thanks for your response. Sorry, I was afraid that I might not have provided enough details. Although I do not have all the use-cases, but I will be using both the local data when data is small and server-side virtual scrolling, filtering, sorting etc. when data is large. Json will be the primary datasoure. I was trying to get inputs from someone who might understand the internals of both grids. I do not understand the client-side implementation enough to judge those myself. One of my colleague's mentioned that slick grid might be better since it was developed with virtual rendering and key-board support to being with. My question is open ended but the core-implementation of the grid might make it efficient in the more complex scenarios too i.e. sub-grids, trees etc. if there is no departure from the core design to handle any of those.

好吧,基于您在jqgrid的专业知识,您如何对 Slick Grid 的这一片段做出回应?

Ok, based on ur expertise of jqgrid, how would you respond to this snippet from Slick Grid ?

"网格与数据 我见过的SlickGrid和其他网格实现之间的主要区别在于,它们过于注重能够理解和处理数据(搜索,排序,解析,Ajax加载等),而不能成为更好的网格" "(如果是可编辑的网格,则为电子表格).如果您只想整理" HTML表格或将前端打入一个简单列表,那太好了,但是对于其他任何事情都太不灵活了. 数据很复杂.它具有业务规则.它具有非本征特性.编辑元素的一个属性可能导致级联更改,从而修改其他属性甚至其他元素.它具有依赖性.我的意思是,最好使用网格控件将数据处理留给开发人员.试图将所有这些都适合网格实现和API只会限制其适用性并增加相当大的膨胀. SlickGrid采用了不同的方法.在最简单的情况下,它通过数组接口访问数据(即,使用"dataitem"到达给定位置的项目,并使用"data.length"确定项目的数量),但是API的结构方式是使网格对基础数据的任何可能更改做出反应非常容易."

"Grid vs Data The key difference is between SlickGrid and other grid implementation I have seen is that they focus too much on being able to understand and work with data (search, sort, parse, ajax load, etc.) and not enough on being a better "grid" (or, in case of editable grids, a spreadsheet). It’s great if all you want to do is "spruce up" an HTML TABLE or slap a front end onto a simple list, but too inflexible for anything else. Data is complicated. It has business rules. It has non-intrinsic properties. Editing one property of an element can lead to cascading changes modifying other properties or even other elements. It has dependencies. What I’m saying, is that dealing with data is best left to the developer using the grid control. Trying to fit all of that into the grid implementation and API will only limit its applicability and add considerable bloat. SlickGrid takes a different approach. In the simplest scenario, it accesses data through an array interface (i.e. using "dataitem" to get to an item at a given position and "data.length" to determine the number of items), but the API is structured in such a way that it is very easy to make the grid react to any possible changes to the underlying data."

来自 试图整理HTML表.例如,可以通过DataTables使用TABLE标签来查看,而SlickGrid使用DIV元素来创建看起来像表格的显示.因此,有很多技术(例如虚拟渲染)可以与DIV一起使用-而不能与表格一起使用.无法简单地呈现表中的100-110行而不是表中的前100行,但是DIV没问题,因此恐怕目前还不适用.需要做的是转换DataTables使用DIV标签标记,但随后您松开了DataTables的主要目标,即集中于逐步增强和可访问性.*"

Edit 2: Snippet from Datatables forum post : "*DataTables is trying to spruce up an HTML table. This can be seen, for example, by the use of the TABLE tag by DataTables, while SlickGrid uses DIV elements to create a display which looks like a table. As such, there are a number of techniques, like the virtual rendering, which can be used with the DIVs - but not with a table. It's not possible to simply render rows 100-110 and not the first 100 in a table, but it's no problem with DIVs, so I'm afraid that this isn't applicable at the moment. What would need to be done is to convert DataTables to using a DIV tag markup, but then you loose the primary goal of DataTables, which is focus on progressive enhancement and accessibility.*"

谢谢

推荐答案

我查看了jqGrid和SlickGrid,发现SlickGrid的编写更加优雅;在大多数SlickGrid用例中,所需的配置较少;但是,jqGrid需要较少的配置来设置更复杂的情况(例如虚拟滚动);

I looked at jqGrid and SlickGrid and found that SlickGrid is much more elegantly written; less configuration is needed for most use-cases for SlickGrid; jqGrid, however, need less configuration to set up the more complex cases (such as virtual scrolling);

jqGrid可能有更好的文档,但是jqGrid的服务器端连接部分已包含在商业产品中,与客户端相比,此部分的文档更难获得.

jqGrid might have better documentation but the server-side connection part for jqGrid is covered by a commercial offering and documentation on this part is more difficult to obtain than for the client-side.

另一方面,SlickGrid上有一些很棒的例子,涵盖了大多数用例,并且源代码中充满了注释,任何对javascript和jquery有一定了解的人都可以访问.

SlickGrid, on the other hand, have some great examples which covers most use-cases and the source is full of comments and is accessible to anyone with some intermediate knowledge of javascript and jquery.

这篇关于SlickGrid与JQGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆