This is Web API tutorial series. In this article, you will see an overview of web API, what is Web API and why we use it.
Web API is very popular and easier way to expose data to different clients. It works on HTTP protocol and this make it easy to configure and easily reachable too. In this turorial we will try to explain almost everything about Web API. You will learn lot of practicle sessions and code walk through youtube videos that will give you better picture of concepts as well as practicle knowledge too. If you are working on a project or about to start a project where you need to implement Web APIs, then this tutorial should be enough for you. In this tutorial, we will demonstrate Web API application with MVC application using C# language. There is another tutorial going on for Angular 8 where in later part you will learn how to consume Web APIs in Angular services. You can read more here Angular 8 tutorial Step-By-Step. In this part of tutorial we will see basic of MVC, API and Web API.
MVC stands for Model-View-Controller. There are many contradictions about its categorization whether MVC is a Design Pattern or is an Architecture Pattern. But as we believe, this should be an Architecture Pattern as it helps in resolving architectural problem. MVC is an architectural pattern and not a design pattern. You can use this pattern in any language like .Net or Java. Below you can see the basic MVC model.
The most popular Asp.Net MVC which is a light weight Microsoft Open Source framework also follow MVC pattern.
API stands for Application Programming Interface. It facilitates two applications establishing communication with each other regardless of platform and languages. You can think API as a set of program code which exchange data between two services and set communication among them. Many popular social network platforms like Facebook, LinkedIn and Twitters expose their services via API.
Web API could be understand as a framework, which is used to build stateless RESTful services that works on HTTP protocol consumed by various clients i.e. Desktop, Mobiles, Tablets and etc. You can use any platform to create Web API like .Net or Java and return response in any of these format - XML or JSON changing setting in configuration file.
Web API structure is same as of Asp.Net MVC and it faciliate features like routing, controllers, return types, filters and etc. It supports all HTTP verbs like GET, POST, PUT, UPDATE and DELETE. You can also secure your Web API using basic authentication or token based authentication using JWT (JSON Web Token).
This article was only meant for providing an overview of few technical terms discussed above. From next sections, you will learn more about Web APIs, we will do practicle sessions and also create a sample application using all the concepts step by step. We are also trying to make video for each part so that you can more clear picture.