SE Engineering - REST

  1. What is the precursor to REST?
    SOAP
  2. What are the features of SOAP systems?
    • Standards-based
    • XML Messages
    • Single function services
    • Overly general and inefficient (heavy)
  3. What are the features of RESTful systems?
    • Representations on server, instead of client
    • JSON Messages
    • Stateless access to resources
    • Simple and efficient (light)
  4. Which REST HTTP method should be used for updating something?
    PUT
  5. Advantages of REST
    • Low overhead
    • Server-side processing
    • Easy implementations with existing websites
    • Good for mobile apps
  6. Disadvantages of REST
    • Endpoint design can be hard for complex interfaces and resources
    • No existing standard
    • Developer responsible for quality and reliability
  7. Four rules for rest services
    • Uniform interface
    • Client-server
    • Stateless
    • Idempotent
  8. What does idempotence mean?
    Accessing the same thing multiple times has the same result each time
  9. Components of a REST request
    • Endpoint
    • Method
    • Header
    • Body
  10. What does a 200 error code mean?
    Success
  11. What does a 300 error code mean?
    Redirected to another URL
  12. What does a 400 error code mean?
    Client error
  13. What does a 500 error mean?
    Server error
  14. Two antipatterns in REST
    • Improper use of query parameters
    • Use of verbs as endpoints (should be nouns only)
  15. What does JSON stand for?
    Javascript Object Notation
  16. What is JSON?
    A self describing text data model
  17. Benefits of (why use) JSON
    • Similarities to Javascript code
    • East to transmit as test only
    • Simple format
  18. Does JSON always need curly braces?
    No, only JSON objects need them
  19. Two methods of accessing data in a JSON object?
    • Square bracket notation (like a map)
    • Dot notation (like a class)
  20. JSON data types
    • String
    • Number
    • JSON Object
    • Array
    • Boolean
    • Null
Author
Ant
ID
360295
Card Set
SE Engineering - REST
Description
Updated