suwebdev / spring-ghost

Spring Ghost repository for WATS 4020 18SQ
MIT License
1 stars 2 forks source link

browse by author name #14

Open rosahughes opened 6 years ago

rosahughes commented 6 years ago

Issue https://github.com/suwebdev/spring-ghost/issues/8 Not sure what to do with this one.

This issue stumped me. I can't figure out what to do with the alphabet sorting. I just copied the index.html format and added a heading with the full alphabet, but didn't know what to do next. Researching other websites that sort in this way made me realize how complicated it is.

ttully00 commented 6 years ago

This part could be complicated. Could search for a poetry API possibly. Or maybe even an api for writers, authors or books. If you find one you may be able to set the parameters and values to get the results.

laura-reeve commented 6 years ago

I just found this example, and it does look complicated: Children's Hospital Richmond. It looks like every letter needs to be a link to a search result for that letter (not sure how that function would work) and then the result list could very well come from some sort of API with data binding providing the content with each result iteration. I can see that the photos and information for each of these doctors is held within the website, so they're not calling to an outside API, but perhaps they are using some sort of JSON file or something to hold that data. I say we can merge this shell to master for now and then open up another branch when we want to try this again?

bbarrows89 commented 6 years ago

I think that's a good call... I'm not sure how we'd want to hold/handle this data... If it were an array of authors, it'd be easy to "sort" using the built-in .sort() method.

https://www.sitepoint.com/sort-an-array-of-objects-in-javascript/

This page shows a few methods for sorting... I'm just not sure how we'll build our database of authors, poems, etc. I think Laura is onto something, JSON would probably be a good way to go as that's a common architecture used with REST APIs if we were to eventually build one out.