In the CHSS web team we have been building web interfaces that work with large amounts of data harvested from the University’s research database (PURE). The crucial thing about these interfaces is that they are ‘display’ interfaces – there is no interactivity with the underlying database as such, no ‘writing’ of the data. The emphasis on the interfaces is on displaying the data in a tabular format, allowing text to be searched and for the display of data to be filtered and sorted by particular fields (or columns).
Using standard methods of creating a web interface that communicates with a database using something like Perl DBI or PHP PDO to build a simple display-only interface has quite a few unneccessary overheads in terms of performance and complexity – and it turns out there is a technology that can be used to construct this sort of web interface in a much more simple and lightweight way, using DataTables.
It might be thought that one disadvantage of the DataTables approach would be poor performance and slow loading of web pages that use DataTables with a large amount of data (DataTables automatically generates internal indexes dynamically) – but we have used the plug-in effectively for web interfaces that have hundreds of rows of data. At some point presumably the scale of the data would be such that this would become a problem, but for data on the order of hundreds of (and perhaps a few thousand) rows in size, DataTables seems to work well.
There is a middle-ground between the simplicity of client-side DataTables and the complexity of a standard web browser client/RDBMS server model, and that is using a relational database that resides purely on the client-side, such as SQLite.
- 1. University of Edinburgh Child Protection Research Centre (CPRC) website research data: http://www.childprotection.ed.ac.uk/publications/publication-database/
This WordPress interface for the CPRC website was developed by the web team. It uses DataTables and works in conjunction with the PURE WordPress plugin the team have also developed, which is described in two earlier blog postings:
- 2. http://www.eddietest.hss.ed.ac.uk/wordpress/research/ This is a DataTables interface (incorporated into a WordPress theme template) that displays some sample PURE research data. This interface was a prototype developed by the web team for the CPRC website and shows the power of DataTables, combining it with a scrolling area, the jQuery UI Tabs library (for a tabbed interface) and the Column Filter add-on (to collapse and hide data so that it can then be expanded and displayed upon a user request) to make the interface feature-rich but compact.
- 3. http://www.edwardboyle.com/drupal/summit_diary This interface (on my personal website) shows how DataTables works with a (reasonably) large dataset of 400 or so rows consisting of numerical, textual and date data types – displaying all of this data using a standard HTML table would be cumbersome, and DataTables allows the effective visualisation of such a large amount of data (using column sorting and scrolling) fairly easily, without a database.