Is DataTables suitable for use as an Advanced Search Form?

Is DataTables suitable for use as an Advanced Search Form?

sm9sm9 Posts: 27Questions: 0Answers: 0
edited July 2012 in General
Hi Allan,

I've got an existing Advanced Search form (screenshot: http://cl.ly/1y2W3p3c1j0y1Q1N450w) that queries a database of around 3,000 entries and outputs the relevant results. The site is likely to get busy though, so I'm a bit concerned about the performance of this as we can't cache this type of dynamic search.

I was wondering if we'd get better performance if we used DataTables instead, as we could then load the entire table of 3,000 results every time and cache it (to avoid the database hit and page loads), and then allowed the results to filter dynamically, client side, using DataTables.

I just wanted your opinion about whether DataTables could be used in such a way with a search form and fields as shown in the screenshot? I've only used it before to do basic sorting of columns and a keyword search filter so wasn't sure if the scenario above would be pushing it too far or even be possible with those sorts of search fields.

Thanks,

Ste

Replies

  • allanallan Posts: 63,540Questions: 1Answers: 10,476 Site admin
    Yes DataTables can do complex filtering. If the fnFilter option for global / column filtering isn't enough for you, you can do some really complex custom filtering: http://datatables.net/development/filtering . With 3'000 records, performance shouldn't be a problem (deferred rendering with an Ajax loaded source would be best).

    Allan
This discussion has been closed.