SlickGrid 与 JQGrid [英] SlickGrid Vs JQGrid

查看:18
本文介绍了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.

Edit1: @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 TABLE 或将前端添加到一个简单的列表上,那就太好了,但对于其他任何事情都太不灵活了.数据很复杂.它有商业规则.它具有非内在属性.编辑元素的一个属性可能会导致修改其他属性甚至其他元素的级联更改.它有依赖关系.我的意思是,处理数据最好留给使用网格控件的开发人员.试图将所有这些都融入网格实现和 API 只会限制其适用性并增加相当大的膨胀.SlickGrid 采用了不同的方法.在最简单的场景中,它通过数组接口访问数据(即使用dataitem"获取给定位置的项目,使用data.length"确定项目数量),但 API 的结构是这样的很容易让网格对底层数据的任何可能变化做出反应."

编辑 2: 来自 Datatables 论坛帖子 : "*DataTables 正在 试图修饰 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天全站免登陆