Creating the web service
Now that the data collection and storage has been re-factored, it is time to build a web service. In some ways, this is similar to the blog server we created previously. However, we want to be ambitious, and so will plan for future development by starting to build a web API for our data.
The REST architecture style is very popular as it is well suited to JSON and being consumed by client web applications.
Note
REST is an architecture style for web services that has gained acceptance as a less complex alternative to WSDL and SOAP.
REST builds on HTTP and uses the verbs GET
, POST
, PUT,
and DELETE
. It can use any Internet format as a data type (XML, images, and so on), but usually uses JSON.
There is no agreed standard for RESTful ...
Get Dart: Scalable Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.