Web Services Flashcards Preview

COMP333 > Web Services > Flashcards

Flashcards in Web Services Deck (18):
1

What are two ways to use web services?

- Using library APIs
- Server side URL based requests

2

How does using APIs to use web servers work?

via objects and method calls e.g Geocoder

3

How does using URL based requests to use web servers work?

via curl e.g sunrise/sunset and google places

4

What do we need to know to use an API?

- inclusion links or scripts
- available objects
- available methods
- useage requirements

5

What do we need to know to use URL based web services?

- base URL
- request options
- return formats
- returned data structure

6

What are two web service protocols?

SOAP
REST

7

What is the web service protocol SOAP?

XML Based
- messages and responses
WSDL used to publish service information

8

What is the web service protocol REST?

Representational State Transfer
- Based around the concept of verb/noun requests
- relies on standard HTTP messages
- follows the RESTful approach

9

What are CRUD operations?

Create
Read
Update
Delete

10

Which CRUD operations are idempotent and which are safe?

Create - Idempotent
Read - Safe
Update - Idempotent
Delete - Idempotent

11

What is meant by idempotent?

has the same effect however many times it is performed on the same resource

12

What is meant by safe?

leaves the original resource unchanged

13

What is meant by RESTful requests are stateless?

There is no dependence on any previous request

14

What is meant by RESTful URLs?

- URL rewriting
- We provide a RESTful URL to users of our webservice
- we use URL rewriting to convery the incoming URL to the actual url required for the server side script with respective paramters

15

rewrite http://webapp.cms.waikato.ac.nz/333lib/rent al/vehicles/AAA111.json to a RESTful URL

http://webapp.cms.waikato.ac.nz/333lib/rent al/php/vehicleindex.php? operation=getVehicleInfo& id=AAA111

16

How does URL rewriting work?

- We create an .htaccess file to define the rewrite rules
- The rewrite base identifies all urls to be rewritten
- the rules use regular expressions to identify which parts of the url to rewrite
- the rules describe how the maintaining part of the url is to be rewritten
- options such as QSA allow us to handle parameters to requests

17

What is MVC?

Model View Controller
Model - data
View - User interface
Controller - links the model to the view

18

What is MVC Frameworks?

- Provide scaffolding for an application development
- support modularity and reuse
- inbuilt security and testing mechanisms