Difference between revisions of "WebFund 2013F Lecture 19"

From Soma-notes
Jump to navigation Jump to search
(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...")
 
Line 3: Line 3:
* Shouldn’t need to use prototypes at all in assignment
* Shouldn’t need to use prototypes at all in assignment
# Before insert, do a lookup
# Before insert, do a lookup
** If there, you have the document and edit that
## If there, you have the document and edit that
# Search for a special room called “start”
# Search for a special room called “start”
** Start is not a room, it’s a room pointer
## Start is not a room, it’s a room pointer
** Can put description of a room in there
## Can put description of a room in there
** Could have everything linked to the start room
## Could have everything linked to the start room
*** Have all rooms exit to start
### Have all rooms exit to start
*** Title won’t be start
### Title won’t be start
# JavaScript string replace
# JavaScript string replace
** Don’t use a for-loop
## Don’t use a for-loop
*** There are nice string manipulation routines in JavaScript  
### There are nice string manipulation routines in JavaScript  
# TA’s will be using their own custom database to test code
# TA’s will be using their own custom database to test code
# Look up how to do file uploads
# Look up how to do file uploads
** Might do this in tutorial
## 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
## 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?   
## Do all the exits refer to a room that actually exists?   
*** Not super important to do
### Not super important to do
** Each room has name, title, description exits, has a start room  
## Each room has name, title, description exits, has a start room  
*** Can say valid
### Can say valid
# Have to validate the data structure
# Have to validate the data structure
** Have to make sure you don’t import garbage
## Have to make sure you don’t import garbage
# Don’t have to do this with AJAX
# Don’t have to do this with AJAX
==non assignment stuff==
** To get style points, probably going to have to do something nice
** To get style points, probably going to have to do something nice
*** Probably don’t want to have to press submit a million times
*** Probably don’t want to have to press submit a million times

Revision as of 19:53, 25 November 2013

Notes

==Assignment 4 remarks

  • Shouldn’t need to use prototypes at all in assignment
  1. Before insert, do a lookup
    1. If there, you have the document and edit that
  2. Search for a special room called “start”
    1. Start is not a room, it’s a room pointer
    2. Can put description of a room in there
    3. Could have everything linked to the start room
      1. Have all rooms exit to start
      2. Title won’t be start
  3. JavaScript string replace
    1. Don’t use a for-loop
      1. There are nice string manipulation routines in JavaScript
  4. TA’s will be using their own custom database to test code
  5. Look up how to do file uploads
    1. Might do this in tutorial
    2. Don’t have to do string checking, just have to check objects to make sure all fields are there and they aren’t undefined
    3. Do all the exits refer to a room that actually exists?
      1. Not super important to do
    4. Each room has name, title, description exits, has a start room
      1. Can say valid
  6. Have to validate the data structure
    1. Have to make sure you don’t import garbage
  7. Don’t have to do this with AJAX

non assignment stuff

    • 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