Open colindavey opened 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.
@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.
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.
Table-of-contents (the homepage, index.html) Needs a list of all the category/subcategory pairs (where subcategory can be empty) in English and Spanish. If a city is specified, the list will only include pairs where there the city has provider(s) in the cat/subcat.
Category page (what appears when someone clicks on a Category name, for example: Basic Needs, Care, and the rest)—this page lists all of the subcategories and the providers of each subcategory. In Basic Needs, for example, it lists Bathrooms and all of the providers with bathrooms, either in a list view or map view (the map view on this page hasn't been started yet.)
Subcategory page (what appears when someone clicks on an item listed under a Category, for example Bathrooms)—this page lists the name, address, phone, website, description, hours, and icons for ADA and language spoken if the ADA or language support is available at that location. This is the all content from a service provider's listing in the print version of the Little Help Book. The subcategory page lists that information for all the providers in a subcategory—the location can also be shown in a map view.
Provider page (what appears when someone clicks on a service provider listed under a Subcategory, for example: G-Street Oasis)—this page appears when someone clicks on an individual provider, it includes all the information in the provider tiles from their listing on a subcategory page, as well as any additional information supplied by the service provider. (This is the feature that allows the digital version to include something a bit more than what can be printed.) The map for this prototype page has been added by Daniel.
Add other pages here