A solution design using datatables

A solution design using datatables

fiksfiks Posts: 15Questions: 2Answers: 0

I'm working on an enterprise solution that will use DataTables extensively. Many thanks to SpryMedial and you Allan, The reason for this post is to solicit possible inputs for a better design. I've been using DataTables now for just over 2 years so I have a fairly good idea of how DataTables work but still far from being an expert.

Using Flask framework, my solution will be used to collect field spatial data using mobile app like Falcrum and store in PostgreSql db. DataTables will then be used to present the information to the user. There are many different tables to display to the user from different kinds of database tables and views. I don't foresee millions of records so there wont be server side processing,- only client side at least initially.

Because there will be DataTables presenting different kinds of data, I decided it will be best to have one generic function that will used for the presentation of data. For every datatable to display the following steps will happen:
1. Jquery Ajax will be used to point to a flask route that will go collect table config info from the config table.
2. The table config data will then be used to launch another Ajax query to collect the actual table data from the db
3. on success:
3.1. I first use the returned json data to construct columns to be use to initialize the datatable.
3.2. I then use the config data collected on point 2 above to initialize menu buttons that will show on a "div" on top of the table below "thead".
3.3. will also use the returned json data to create an initially hidden map that will be shown on demand via a left slide in/out button

...and now the question. Does anyone out there have any ideas about the best architecture to use for this kind of solution? I have decided that DataTables will be at the core of my solution as all my data will be displayed via DataTables and Spatial data will use "Leaftet" library.

Will appreciate inputs.

The project will be on GIT.

This discussion has been closed.