WebFund 2013F Lecture 19

From Soma-notes
Revision as of 23:52, 25 November 2013 by Sarahmathieson (talk | contribs) (Created page with "==Notes== ==Assignment 4 remarks * Shouldn’t need to use prototypes at all in assignment # Before insert, do a lookup ** If there, you have the document and edit that # Sear...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Notes

==Assignment 4 remarks

  • Shouldn’t need to use prototypes at all in assignment
  1. Before insert, do a lookup
    • If there, you have the document and edit that
  1. Search for a special room called “start”
    • Start is not a room, it’s a room pointer
    • Can put description of a room in there
    • Could have everything linked to the start room
      • Have all rooms exit to start
      • Title won’t be start
  1. JavaScript string replace
    • Don’t use a for-loop
      • There are nice string manipulation routines in JavaScript
  1. TA’s will be using their own custom database to test code
  2. Look up how to do file uploads
    • Might do this in tutorial
    • Don’t have to do string checking, just have to check objects to make sure all fields are there and they aren’t undefined
    • Do all the exits refer to a room that actually exists?
      • Not super important to do
    • Each room has name, title, description exits, has a start room
      • Can say valid
  1. Have to validate the data structure
    • Have to make sure you don’t import garbage
  1. Don’t have to do this with AJAX
    • To get style points, probably going to have to do something nice
      • Probably don’t want to have to press submit a million times
  • Always time costs when you distribute a system
  • How’s it going to fail?
    • Anything from a database is expensive
  • Want a static webserver for front end
    • Incoming requests first go through here, if it can handle it, it will hand it off and respond
    • If it can’t, it will send it back
  • Gets don’t change server state, posts do
  • Gets can be cached
  • CDN
    • Content Distribution Network
    • Some combination between static servers and caching
  • Reading is never a problem
  • Searches are easy
  • Writes are what slow you down
    • Cannot be automatically replicated
    • Changed the state of part of your database, essentially your data structure
    • This is what limits database scalability
  • Fred Brooks