Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. 1. Read about IndexedDB:
  2. https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB
  3. https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB
  4.  
  5. 2. Implement an application that uses IndexedDB, following the requirements:
  6.  
  7. - your subject area is "Crime reports"; each entry in your table will represent such report, with following fields describing it: date/time, address, district, beat, grid, crime description, UCR NCIC code, latitude, longitude;
  8. example dataset may be found here:
  9. https://drive.google.com/file/d/1uXeWHwbev_9ah0MVX-g373CfBLTbsU4D/view?usp=sharing
  10. - immediately after start, application should check: if there is no database with corresponding name and version stored in browser, it should be created (using 'onupgradeneeded' callback);
  11. - application should allow to add data to DB: either via form, or by uploading CSV file (interim transform to JSON may be required); when adding via file upload, set of fields should be validated first;
  12. - application should allow to view data from DB;
  13. in brief, table should be similar to this: https://i.imgur.com/jwjO67P.png
  14. table should be paginated - each page should contain up to 20 entries;
  15. clicking on column header should cause sorting by that column (ascending);
  16. - application should allow to drop distinct entries or the whole table at once;
  17. - application should allow to perform text search by 'crime description' field (note: out of the box, IDB only allows to look for full matches; what you are going to implement is rather 'like' operator: match any text occurances, case-insensitive).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement