03 - Web CRUD and REST

 1. In computer programming, create, read, update, and ________ (CRUD) are the four basic functions of any database or content management system

  do not




 2. There can be additional specific operations in a module, but the CRUD operations are considered the __________ basic operations on any generic module

  easy to implement



  non essential

 3. REST in IT terminology stands for ___________________________ - a standard for HTTP based Application Programming Interfaces (APIs)

  Relational State Tense

  Recretaional Enterprising Stopping Table

  Representational State Transfer

  Relational Entity State Transport

 4. Representational State Transfer (REST) refers to a group of software architecture design constraints that bring about efficient, reliable, and scalable distributed systems



 5. A system is called________________when it adheres to those constraints.





 6. For your reference, here are the guiding principles of REST. The term REST was introduced in 2000 by Roy Fielding in a famous doctoral dissertation
Guiding Principles of REST

1 - Client–server – By separating the user interface concerns from the 
data storage concerns, we improve the portability of the user interface
 across multiple platforms and improve scalability by simplifying the 
server components.

2 - Stateless – Each request from client to server must contain all of the 
information necessary to understand the request, and cannot take advantage 
of any stored context on the server. Session state is therefore kept entirely
on the client.

3 - Cacheable – Cache constraints require that the data within a response to
 a request be implicitly or explicitly labeled as cacheable or non-cacheable.
 If a response is cacheable, then a client cache is given the right to reuse 
that response data for later, equivalent requests.

4 - Uniform interface – By applying the software engineering principle of generality 
to the component interface, the overall system architecture is simplified and
 the visibility of interactions is improved. In order to obtain a uniform interface, 
multiple architectural constraints are needed to guide the behavior of components.

5 - REST is defined by four interface constraints: identification of resources; 
manipulation of resources through representations; self-descriptive messages; 
and, hypermedia as the engine of application state.

6 - Layered system – The layered system style allows an architecture to be composed 
of hierarchical layers by constraining component behavior such that each component 
cannot “see” beyond the immediate layer with which they are interacting.
Code on demand (optional) – REST allows client functionality to be extended by 
downloading and executing code in the form of applets or scripts. This simplifies 
clients by reducing the number of features required to be pre-implemented.



 7. One of the main reasons for CRUD is because the world now uses online access to databases like never before.



 8. Relational databases use four primary SQL statements that can be mapped directly to CRUD. Create and Retrieve ((CRUD) relate to _______ and ______ in SQL.

  select / update

  update / delete

  insert / delete

  insert / select

 9. UPDATE (U) and (D) Delete in CRUD relate to _________ and _______________ HTTP request methods.





 10. HTTP uses a common standard of verbs or actions such as GET, POST, PUT and DELETE when working with _______________________-

  RESTful IP addresses

  CRUD servers

  physical cables

  online database servers

 11. Another way of defining REST is a style of systems design that prescribes the use of _______________ to interact with online databases via a web server.

  HTTP request methods

  DELETE statements

  IP address methods

  SQL statements

 12. In REST, the client computer requires no knowledge of how the server is likely to fulfil the request, how the data is stored or where it will gather the data.



 13. In REST, it is the '_______________' (of client and server operations) that allows any client or server to be updated and developed independently of each other without any loss of function.





 14. There are steps involved in connecting a database to a browser with HTTP request methods. Read the following excerpt and fill in the blanks for step 3.
Connecting a database to a browser with HTTP request methods
1. A browser will make a client server request from a web server to load a standard
web page and all associated resources

2. The web page HTML file will contain Javascript (this is executed on the client side)

3. The browser JavaScript __________________________________________________________________
4. The database server responds to the client's HTTP requests with the data in JSON or XML

5. The browser renders the JSON or XML data in its own user interface

  calls the CRUD methods using only HTTPS

  calls the RESTful API which enables communication with the server-side database using HTTP requests

  calls the RESTful method (e.g. POST or GET) and this blocks all unauthorised communication

  renders the JSON or XML data on the server-side before copying it into the database

 15. AJAX and REST are often confused. Some of the features of AJAX include:

  In Ajax, the requests are sent to the server by using XLHttpRequest objects.

  All the options listed here are valid features of REST.

  Ajax is a technique of dynamically updating parts of UI without having to reload the page

  Ajax eliminates the interaction between the customer and server asynchronously