Book Image

Knockout.JS Essentials

Book Image

Knockout.JS Essentials

Overview of this book

Table of Contents (16 chapters)
KnockoutJS Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

REST services


In this chapter, you are going to learn how to make the frontend layer communicate with the backend layer.

You are not building a simple web page. You are building a web application. This means that your project does not only contain data to display to the user, along with some anchors to click on and navigate. This web page also has a logic and model layer behind, and this makes it more complex than a simple web page.

To communicate with the server the frontend uses web services. The W3C (short for World Wide Web Consortium) defines a web service as a software system designed to support interoperable machine-to-machine interaction over a network. There are many protocols you can use to perform this interaction: SOAP, POX, REST, RPC, and so on.

Nowadays in web development, RESTful services are most used. This is because the REST (short for Representational State Transfer) protocol has some characteristics that make it easy to use in such apps:

  • They are based on URI

  • Communication...