13.0: API Intro
This section provides an overview on APIs. Remember, this is different from the API we created to add the starred option.
Terms
MVC: Model View Controller
API: Application Programming Interface
JSON: JavaScript Object Notation -- Something is serializing and de-serializing
XML: Extensible Markup Language
Discussion
Eleven Note is an n-tier data application with an MVC presentation tier
The services tier does not care that it's MVC
The services tier allows us to have more presentation tiers
An API is a set of calls that we'll expose to other programs through endpoints
The API will serve to allow other presentation tiers to gain access to those service methods
This way we can allow as many presentation layers as we want to access our data
Web API uses the same routing engine as MVC
Types of Web Service Communication Protocols
REST: Representational State Transfer
JSON based
Uses verbs that represent the intent (GET, POST, PUT, DELETE)
SOAP: Simple Object Access Protocol
XML based
We will use REST
Postman
Postman is an indispensable tool that helps us with testing
It acts as a fake client for making requests - we can log in, add notes, update notes, and delete notes from the database
It will allow us to:
Test the endpoints of the API
Make a request to an endpoint
Behave as a client (a web or mobile application) without having a user interface
Install Postman
Next, we'll test the login page with Postman.
Last updated