What is the 3-tier architecture?
Presentation - Business - Persistence
Client - web server - database
What is a web service?
A web service is a software system designed to support interoperable machine-to-machine interaction over a network.
— extra details —
It has an interface described in a machine-processable format (WSDL). Other systems interact with the web service in a manner prescribed by its description using SOAP or RESTful messages, typically conveyed using HTTP with an XML or JSON serialization in conjunction with other web-related standards.
Give some benefits of a web service.
What benefits do we gain with a loose coupled design in a web service?
What are some characteristics of the ‘ease of integration’ benefit when using a web service?
Describe the ‘service reuse’ benefit of web services.
What is REST and what is it short for?
REpresentational State Transfer.
Rest in an architectural style.
What is the difference between URI, URL and URN
URI is a Uniform Resource Identifier and can be a URL, URN or both.
URL is a Uniform Resource Locator and is the location where you can find the resource
URN is a Uniform Resource Name and defines an item identity
How are REST resources described?
What is a RESTful API? What does it have?
= web service API that adheres to the REST style
Describe JSON in keywords.
What are the 6 REST architectural constraints?
1) Interface uniformity between components
2) Client-server model (separation of concerns)
3) Stateless client-server communication
4) caching
5) Layering
6) Code on demand (optional)
What is the “Interface uniformity between components” constraint in REST?
Components need to speak the same language and know what to expect in order to understand each other
What is the “client-server model (separation of concerns)” constraint in REST?
Client and server are fully decoupled and can be developed independently
What is the “stateless client-server communication” constraint in REST?
Each request from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored session state on the server.
What is the “caching” constraint in REST?
Clients can cache responses to requests, improving scalability and performance. The fact that responses are not cacheable should be implicitly or explicitly defined.
What is the “layering” constraint in REST?
A client cannot tell if it is directly connected to a server or to some intermediary. This allows for load-balancing, fail-over and data transformation.
What is the “code-on-demand” constraint in REST?
Client functionality can be dynamically extended through the transfer of executable code.
Compare REST and RPC.
RPC:
- many operations, few URI
- address software components
- procedure name and parameters are transferred
Compare REST and RPC.
RPC:
- many operations, few URI
- address software components
- procedure name and parameters are transferred
REST:
- Few operations, many URI
- Address resources
- Resource representations are transferred
What are advantages of REST?
What are some disadvantages of REST?
What is SOAP short for?
Simple Object Access Protocol
How do you add credentials to a SOAP message?
1) Add it in the SOAP body - credentials need to be encoded in every parameter
2) Use the optional SOAP header.
–> use the mustUnderstand attribute so that the receiving body is able to interpret this header