Lesson 2 (REST Backend) Flashcards
What does REST stand for?
Representional state transfer
What is REST?
A style of software architecture. A collection of architecture principles which outline how resources are defined and addressed.
What charactericstics are covered by REST? (3)
URI (uniform resource locator)
HTTP protocol
Make a request and receive a response
What are the HTTP protocol methods that are used by REST?
POST, GET, PUT, DELETE
is REST A standard?
No, but it used various standars from HTTP and other headers like content/mime types.
What formats can a REST representation be and is it constrained?
XML and JSON are most common. Yes this is constrained.
What is an example of an URI and is it constrained?
http://example.com/users/1234. Not standard, free to implement. In URL is possible but also as URL parameter.
Name the 6 characteristics of REST
- Uniform interface to send requests to.
- Decoupled client-server interaction. Same reasons as stateless.
- Stateless (nothing stored in communication. Each request contains all information that is required.) This is less load and easier to replace the backend.
- Cacheable
- Layered (scalability and enforcement of security
- Extensible through code on demand (code modification through backend)
How is a header attribute formatted?
Content-Type: application/json
What is the format of an HTTP request?
METHOD /ur/ HTTP/version
Host: domain
Header fields.
Request body
Example:
POST /test/demo_form.asp HTTP/1.1
Host: w3schools.com
name1=value1&name2=value2
What options do you have to implement REST in a Java based backend?
Plain servlet (java code) External libraries like Jersey. A boilerplate for rest based software.
Where does SOAP stand for and what is it?
Simple Object Access Protocol A protocol like REST but the based on HTTP requests and using XML message format (only XML)
What does WSDL mean and what does it do?
Web Service Description Language. Describes the SOAP functionality on a backend. This is written in XML and can be generated. Can be read by humans but also interpreted by programs.
What is BAAS and MBAAS?
(mobile backend as a service) A very popular solution for out of the box and scalable data storage API for mobile apps.
What are some features that MBAAS solutions can offer?
Database storage File storage User management Social Network integration Push notifications Secure conection Error & performance monitoring Ability to auto generate rest-based interfaces to read and write data