Upgrade to Pro — share decks privately, control downloads, hide ads and more …

cs373-housedowning

 cs373-housedowning

Presentation for team House Downing on Game of Thrones IDB

Avatar for Charlina

Charlina

May 04, 2015

Other Decks in Programming

Transcript

  1. Overview & Use Cases ❖ Database of Game of Thrones

    lore ❖ Difficult to keep track of ➢ Characters ➢ Locations ➢ Events ➢ Organizations ➢ Episodes
  2. Front End ❖ No javascript frameworks ❖ Originally loaded blank

    template page and populated data content by using javascript to call our API ❖ The javascript meant our pages loaded slowly; switched to rendering templates
  3. Front End ❖ Visual representation with toggle for more detailed

    option ❖ Bootstrap ❖ Hover-over effects ❖ Outsourcing to Hodor ❖ Twitter widget
  4. API - Pillars, Basic Form ❖ /api/<pillar> ➢ grabs a

    json list of all the items in the pillar ❖ /api/<pillar>/<id> ➢ grabs a single item Getting a single item yields more information about that one item than getting all the items in the pillar
  5. API - Pillars, Example ❖ /api/character [ {"last_name": "Baratheon", "gender":

    "Male", "religion": "Faith of the Seven", "char_id": 1, "first_name": "Robert", "status": "Deceased"}, ..... ] ❖ /api/character/1 { "affiliations": [... ], "alias": "Usurper", "char_id": 1, "description": ".....", "events": [ ... ], "first_name": "Robert", "gender": "Male", "last_name": "Baratheon", "religion": "Faith of the Seven", "status": "Deceased", "visited": [.... ] }
  6. API - Search ❖ Single endpoint with request argument ➢

    /api/search?query=<query terms> ❖ Returns a JSON object with ➢ Number of matches ➢ Search term ➢ a list of results
  7. Back End - Search How we did it ❖ Tokenized

    search string and built multiple queries for each pillar ❖ Convert results into generic JSON and merge results between pillars ❖ Allows matching on names before descriptions
  8. Back End - Testing ❖ Used SQLite for testing models

    ➢ Orders of magnitude faster using an in-memory only database ➢ Very important when running 70+ tests ❖ Difficulties in running the tests on the live site ➢ Flask-SQLAlchemy doesn’t support sharing models between databases ❖ Used the subprocess module to run the tests in their own process and capture results ❖ In the process of switching to a JSON based test result page
  9. Site Critique What did we do well? ❖ Site is

    consistent and responsive ❖ API is uniform and clean ❖ API is thoroughly tested
  10. Site Critique What did we learn? ❖ Javascript (we should

    have used Angular!) ❖ Rackspace sign-up ➢ Accidentally signed up for the wrong flavor ❖ Javascript is slow, rendering the template and sending a static page is much faster ➢ (since fixed)
  11. Site Critique What could we have done better? ❖ API

    calls include redundant information ❖ Pagination of pillars and search results ❖ Use junction tables in the searches ❖ Search changes: blacklist grammatical articles, expose more data ❖ Nicer URLs for site pages ➢ ‘/characters/Robert Baratheon’ instead of ‘/characters/1’ ❖ We used javascript to pull data instead of rendering templates ➢ Site was slow and not indexable by external search engines ➢ This was fixed since turn in by using template rendering
  12. Site Critique What puzzles us? ❖ Flask-SQLAlchemy not allowing sharing

    of models between databases ➢ Made testing difficult and non-intuitive ❖ Some features don’t work on some browsers
  13. Pythian Critique What did they do well? ❖ Navbar looks

    nice ❖ Plenty of data ❖ Integration with Google Maps is well-done ❖ Very nice transitions when sorting their pillars ❖ “Featured” items from pillars is a nice way of encouraging exploration of their site. What did we learn from their site? ❖ Random sorting with animation looks impressive
  14. Pythian Critique What can they do better? ❖ The font

    is a bit too small in several places ❖ The athlete names don’t stand out in the athlete list ❖ Page goes mobile too fast ❖ API doesn’t expose a way to get individual elements from the pillars ❖ Pagination would have really helped because they have so much information
  15. Pythian Critique What puzzles us about their site? ❖ Inconsistency

    across pages ❖ Some text doesn’t seem centered in their corresponding elements ❖ Empty spaces in lists depending on sorting