What is REST API?

REST is REpresentational State Transfer. I consider it more useful than SOAP because SOAP uses only XML for transfer but REST uses both XML, JSON. (since I love JSON) and feel easy to handle JSON.

You should create an API for your application because you should build your application architecture such that only one part can access the databases (eg: Model) you should not allow view or controller to touch the DB (just saying for an example with MVC You can follow with any other custom architecture). So for Model to get data you need to build some API which gives data on request to it. (eg: you may want data in a table so you will write API to get data in that table and when your application will ask for data from this your api will provide the data for you).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s