Web Applications

Card Set Information

Web Applications
2014-02-14 18:37:18
Midterm Web Apps

2014 Web Application Midterm
Show Answers:

  1. 2 types of programming
    • Imperative
    • Declaritive
  2. Imperative
    • statements that change  a program state
    • C++, C#, Javascript
    • lower level abstraction
    • care about each incremental state change
  3. Declarative
    • what needs to be done
    • css, json, html
    • higher level abstraction
    • only care about the final state
  4. DOM
    • Document Object Model
    • is the way javascript sees HTML or XML
  5. MIME
    • Multipurpose Internet Mail Extension
    • The format that HTTP tags each object being transported 
    • Web browser looks at the MIME type to see if it knows how to handle the object
  6. URI
    • Uniform Resource Identifier
    • postal address of the internet
  7. URL
    • Uniform Resource Locator
    • most common
    • describes the specific location of a resource on a server
  8. HTTP Transactions
    consists of a request command and a response result
  9. GET
    Requests a representation of the specified resource
  10. POST
    • submits data to be process to the identified resource
    • data is included in the body of the request
  11. PUT
    uploads a representation of the specified resource
  12. DELETE
    delete the named resource from a server
  13. Status code
    • 3 digit numeric code
    • tells the client if the request succeeded or if other actions are required
  14. HTTP Status codes 200, 302, 404
    • 200 = OK
    • 302 = Redirect
    • 404 = Not found
  15. 3 parts of an HTTP Message
    • Start Line - what to do(request) or what happened(response)
    • Header Fields (optional) - name and value
    • Body(optional) - carry data to and from web server
  16. TCP/IP
    • application layer protocol
    • doesn't worry about details
  17. TCP
    • error free transportation
    • in-order delivery
    • transfer data in any size at any time
  18. Default port for HTTP
  19. Default port for HTTPS
  20. In javacript, how do you convert a number to an integer
  21. What is NaN and how do you detect it?
    • number value that is a result of an operation that cannot produce a normal result
    • detect using isNaN(number)
  22. 4 parts of a function literal
    • 1. reserved word function
    • 2.function name (optional) no name = anonymous
    • 3.parameters
    • 4.set of statements wrapped in curly braces
  23. Invocation
    • invoking a function 
    • suspends the execution of the current function
  24. 4 invocation patterns
    • Method
    • Function
    • Constructor
    • Apply
  25. Method Invocation Patter
    • bound to the object
    • use this to access the object
  26. Function Invocation Pattern
    • when a function is not the property of an object, then it is invoked as a function
    • this  is bound to the global object
  27. Constructor Invocation Pattern
    functions that are intended to be used by the new prefix
  28. Apply Invocation Pattern
    • apply method lets us construct an array of arguments to use to invoke a function
    • 2 parameterss - this and and array of paramas
  29. undefined
    if the value is not specified then undefined is returned
  30. closure
    • functions that have access to variables from another function's scope
    • created when you use a function inside another function
  31. Array literal
    a pair of square brackets surrounding zero or more values separated by commas