On Jun 29, 8:45 pm, Andrés Maneiro <[email protected]> wrote: > Hello, > > I'm starting to develop a simple webpage intensive in data. Let me explain a > bit what I need: > > - The front-end will be a simple webpage with several tables and one > combobox. The values in the tables will change depending on the value > selected in the combobox. > - The data is in a database, which I plan to process previously to generate > a JSON file with all data I'm interested in. That file will contain all the > values of the tables (for each variable in the combobox) and will be given > along the HTML. My initial though is to tie the JSON data-model to the > design of the tables. > - Finally, I would glue together the HTML and the JSON with javascript. I > suppose this have to be simple as the data-model will reflect the structure > of the tables.
The problem with getting all the data via AJAX is that the back button becomes useless and users may find it tiresome trying to compare different sets of data. If users are likely to only view a couple of different data sets out of many, then AJAX may be OK. Otherwise, you may find it much more efficient to use real URLs so that users can use the back button and cache to view previous data sets rather than downloading them every time they switch views. Building tables from data is slow, regardless of the mechanism used. With DOM you can replace parts of the table, with innerHTML it's all or nothing. There are mixed innerHTML and DOM approaches. Replacing values in an existing table tends to be much faster than building a new one. -- Rob -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
