RomanLaw db: early planning
Posted by mholmes on 13 Aug 2008 in Activity log
I've more or less settled on using prototype.js as the basis for GR's RomanLaw database system partly because of the sophisticated AJAX Request object it has. It can automatically evaluate JavaScript code which the server returns in response to a request, so the application can more easily handle the addition of new items to existing tables on the fly, while editing or creating a new record in another table. This is the sort of sequence that will be required:
- User creates a new Inscription item (destined for the
inscriptions
table). - User wants to tag this with a new keyword, because the required keyword is not in the listbox built from the
keywords
table. User has already control-clicked several keywords in the list (there's no limit to keyword tags for a given inscription). - User clicks on Add Keyword, and gets a little sub-dialog.
- User completes sub-dialog and submits; AJAX sends request to server, including both the new proposed keyword, and the list of any ids of existing keywords which have already been selected by the user (in a listbox).
- Server stores this information, then creates a new keyword item in the table. It responds with a new list of keywords for the listbox (ids, strings, and selected status), in alphabetical order including with the new item and its id. This list is in the form of some JavaScript which clears the existing listbox items and replaces them with a new set. Previous selections are preserved, and a the new item is selected; it's also scrolled into view (assuming that's possible).
This all looks feasible using prototype.js right now. I'm currently reading all the docs to get a good handle on how best to use it.