Live data from Hacker News

DataTables – Table plug-in for jQuery

datatables.net

11–20 of 59 posts

Re: DataTables – Table plug-in for jQuery

#11
I'm using it in a project presently, it's a very powerful library. The project started simple.. but the table part quickly grow very complex and that plugin never let me down. The best part of the documentation is the examples IMHO.

There are also very good plugins[1] to use it on the backend..

[1] https://bitbucket.org/pigletto/django-datatables-view

Re: DataTables – Table plug-in for jQuery

#13

While I have found DataTables to be useful in the past, there are (thankfully) many other alternatives available today with a much saner API. DataTables might have the worst API I've ever seen in a Javascript library. Powerful, yes, but it has the most insane naming conventions I've ever seen. To this day I do not understand why so many properties are prefixed with random letters. There was a time when there wasn't a…

Can you name a few of the alternatives you found? The ability to sort on more than one column ruled out a lot of them for us.

I usually specialize and grab a lightweight library that does exactly (or something I can hack on) what I need it to. The closest exact replacement I have found to datatables is ExtJS. ExtJS has a pretty large learning overhead as well, but is probably more flexible in terms of functionality in the end and has a much more sane API in the end (with the tradeoff of it being much less easy to reskin).

On the other hand, a lot of JS frameworks have tackled a lot of the problems that I used datatables for except in a much better way. Things such as data storage and retrieval, dom manipulation, smart dom rendering. A lot of times I don't need to reach for one of these libraries anymore because the problem is already handled elegantly enough at the framework level. AngularJS in particular really shines here.

Re: DataTables – Table plug-in for jQuery

#14

While I have found DataTables to be useful in the past, there are (thankfully) many other alternatives available today with a much saner API. DataTables might have the worst API I've ever seen in a Javascript library. Powerful, yes, but it has the most insane naming conventions I've ever seen. To this day I do not understand why so many properties are prefixed with random letters. There was a time when there wasn't a…

Alternatives such as? They use Hungarian Notation[0]; not random, but dated. [0] http://en.wikipedia.org/wiki/Hungarian_notation

I wrote this:

http://backgridjs.com/

Re: DataTables – Table plug-in for jQuery

#16

While I have found DataTables to be useful in the past, there are (thankfully) many other alternatives available today with a much saner API. DataTables might have the worst API I've ever seen in a Javascript library. Powerful, yes, but it has the most insane naming conventions I've ever seen. To this day I do not understand why so many properties are prefixed with random letters. There was a time when there wasn't a…

Can you name a few of the alternatives you found? The ability to sort on more than one column ruled out a lot of them for us.

I've been using jqGrid for a couple years now, and have been able to make it do everything I've ever needed. It is full of its own quirks, and probably hasn't been updated in a long time, but it definitely got the job done for me on many occasions.

http://www.trirand.com/jqgridwiki/doku.php

Re: DataTables – Table plug-in for jQuery

#17

Earlier quoted context omitted.

Can you name a few of the alternatives you found? The ability to sort on more than one column ruled out a lot of them for us.

https://github.com/Mottie/tablesorter has multiple sorting using the shift key. I alternate between this and DataTables. The hungarian notation threw me off at first too. Far from insane though.

Here's an example of what you have to do in datatables to get the elements displayed around the table itself styled (such as a search bar, pagination, or table meta information)

https://datatables.net/release-datatables/examples/basic_ini...

So, in order to adjust the styling of DOM elements around the datatable, you need to understand a very specialized form of syntax that one particular property that controls all DOM element layouts accepts as a string. And there's only one example.

How is that sane?

Re: DataTables – Table plug-in for jQuery

#18

While I have found DataTables to be useful in the past, there are (thankfully) many other alternatives available today with a much saner API. DataTables might have the worst API I've ever seen in a Javascript library. Powerful, yes, but it has the most insane naming conventions I've ever seen. To this day I do not understand why so many properties are prefixed with random letters. There was a time when there wasn't a…

Alternatives such as? They use Hungarian Notation[0]; not random, but dated. [0] http://en.wikipedia.org/wiki/Hungarian_notation

Ah, you're correct. I don't program in any language that considers hungarian notation to be a common naming convention so I haven't ran into it before. For some reason I had not stumbled on to the page that explains this until I deliberately looked for it now.

As far as alternatives go, I usually specialize based on what my needs are. If I'm using a JS framework I don't have as much of a need for an all-in-one solution like datatables because the framework usually does a good job of handling things like DOM rendering and data storage without the need for a full blown table sorting library.

Re: DataTables – Table plug-in for jQuery

#19
post #14

Earlier quoted context omitted.

Alternatives such as? They use Hungarian Notation[0]; not random, but dated. [0] http://en.wikipedia.org/wiki/Hungarian_notation

I wrote this: http://backgridjs.com/

Looks pretty cool. Any way to fix the header to always be visible?

Re: DataTables – Table plug-in for jQuery

#20
post #8

While I have found DataTables to be useful in the past, there are (thankfully) many other alternatives available today with a much saner API. DataTables might have the worst API I've ever seen in a Javascript library. Powerful, yes, but it has the most insane naming conventions I've ever seen. To this day I do not understand why so many properties are prefixed with random letters. There was a time when there wasn't a…

What alternatives have you found to be better? I'd be interested in checking them out.

I'm not the parent, but we switched from Datatables to SlickGrid: https://github.com/mleibman/SlickGrid

Much nicer API and it's fast for large amounts of data. Unfortunately like many things it's lacking a lot of docs so you have to dig through the source of the examples.

Post reply on HN