Non-jQuery version of DataTables. Is this gonna happen?

Non-jQuery version of DataTables. Is this gonna happen?

daytonoutardaytonoutar Posts: 25Questions: 7Answers: 1

Is there any initiative to have DataTables operate without jQuery as a dependency?

This question has an accepted answers - jump to answer


  • allanallan Posts: 52,724Questions: 1Answers: 8,070 Site admin
    Answer ✓

    Its something I keep considering - but then I keep coming back to the fact that it would be a very significant amount of work to re-implement the parts of jQuery we do use. For example event namespaces, events (keeping in mind that DT supports IE8+ - actually the current version is IE6+, but that will change soon) and various other things.

    Perhaps I might be wrong, but I feel my time working on DataTables would be better spent improving its core and features, rather than effectively rewriting parts jQuery and increasing the size and testing of the library. I'm not even certain how much space it would save once that has been done.

    That said, another option is to effectively abstract jQuery out, so it can be used if available, and if not then some compatibility layer that uses querySelectorAll will be used and that would support only evergreen browsers. Again, there is a good bit of work involved in that, and I've not yet made my mind up about if it is worth the trade off and size increase. It is probably the way I will go as I'm thinking about that as I'm writing the stuff for DataTables 2, but it does need to be noted the amount of value there is in using jQuery.


  • daytonoutardaytonoutar Posts: 25Questions: 7Answers: 1

    I've been looking through the source code. It is respectable work.

    I've seen an attempt to abstract jQuery out through this project,

    It's not complete though and no where near the maturity that jQuery DataTables have. I may make an attempt at contributing to that project while making reference and going through your source code.

    I do understand your goals and the focus you have on improving the core and features of jQuery DataTables.

    I may be just one of the few developers that prefer to use DataTables in any framework including Angular, which discourages the use of jQuery.

    I'll make an attempt at abstracting away jQuery but time will tell. It's not a priority, since I am mostly focused now on learning Angular while building an app that delivers value to users/customers.

  • BusterenBusteren Posts: 50Questions: 17Answers: 4

    Not to bump the thread, but I have also been looking a bit at it. But it is significant work and not sure it will be worth it as Allan mentioned for various reasons.

    @daytonoutar if you do plan on having a look, let me know. I am going to have a look at that github repository. If I do decide to do it, I will probably drop support for any unofficially supported browsers.

    @allan is there a roadmap for DataTables 2?

  • allanallan Posts: 52,724Questions: 1Answers: 8,070 Site admin

    Its somewhat out of date I'm afraid, but this is the roadmap. I need to update it!


  • harmenzonharmenzon Posts: 17Questions: 7Answers: 0

    Hi @allan. I've been using DataTables for a long time now. Still my preferred data table on the web. But since the years have passed, I have been moving away from jQuery and am now coding everything in Vanilla JS. So my question, are there any plans for DataTables without jQuery?

  • colincolin Posts: 9,856Questions: 0Answers: 1,635
    edited September 4

    There is a loose plan - we have briefly looked at alternatives, and that is still on the backburner, but it's not the main priority for us right now, I'm afraid.


  • suhailkcsuhailkc Posts: 1Questions: 0Answers: 0
  • danielribas1984danielribas1984 Posts: 2Questions: 0Answers: 0

    Hey Alan,
    Any plans to support this?
    Everyone is moving into front-end frameworks and Jquery doesn't work with vue or react properly. Bootstrap 5 is jquery free now.

  • tangerinetangerine Posts: 2,775Questions: 22Answers: 325

    Everyone is moving into front-end frameworks

    Everyone? Really?

  • allanallan Posts: 52,724Questions: 1Answers: 8,070 Site admin
    edited September 4

    Currently no - we have no immediate plans to move away from jQuery.

    I mean we could spend the next month or so rewriting major parts of of what jQuery does for us (the hardest part would be the eventing probably) which is more or less what the Bootstrap team have done for Bootstrap 5, but honestly, why bother for a team of our size?

    Will it save some KB on download? Possibly - but then we'd be better just levelling up with Cash (which I plan to do). Beyond that - I'm not clear what the benefit would be other than to say we don't require jQuery. It would also massively increase our support surface if we needed to write a bunch of utility code.

    In terms of the frameworks - we'll probably provide wrappers around DataTables as it is - we won't be rewriting DataTables with just Vue for example though (since then Vue would be the dependency rather than jQuery!).

    On the Vue point - I use DataTables extensively with Vue and it works really well (just not with Vue's reactive data - a wrapper might be able to resolve that).

    I'm happy to be convinced that there is a good technical reason for why we should drop our requirement on jQuery, balancing the increased development and maintenance, but I personally don't have one yet. If you do, I'd be very happy to discuss further!


Sign In or Register to comment.