OpenEugene / little-help-book-web

Human service resource guide powered by White Bird Clinic
MIT License
6 stars 4 forks source link

Specify the data needs of all pages here #37

Open colindavey opened 3 years ago

colindavey commented 3 years ago

Let's list all the pages that use data from the database here. For each page, indicate what columns of what tables are needed, and what parameters the page will specify for filtering the data.

coatsd commented 3 years ago

Category, Subcategory and Provider pages are going to need basically all of the data. Cities, categories, subcategories and places are going to be required to: A: populate the select boxes (using cities, categories and subcategories) B: populate the search results. The search results will require different fields in each page, but all of the pages will return, at some point, places. Places will need cities, categories, and subcategories to narrow down specific available services. Thankfully, we can store cached copies of the data in the browser, so we'll only have to send it out once when someone accesses a page. This would be fairly easy to code, and we can do it a variety of different ways. If we get even more slick with it, we can also have a cached copy on someone's computer whenever they access the domain, and have it check for updates once per session. This method would require a bit more coding and research.

colindavey commented 3 years ago

@coatsd, check out the data_access_layer branch. You can call the function dalGetPlaceTable() to get the places (i.e. providers) table and then have your way with it - filtering and selecting specific fields of interest. Independently, we can rewrite or make different versions of the low-level code under dalGetPlaceTable() to get the places table using different techniques (caching and whatnot).

We could also use some generic routines that filter and select columns from the places table, which seems like should not be tied to the low-level technique for fetching the data.

colindavey commented 3 years ago

See also https://github.com/OpenEugene/little-help-book-web/issues/35.