Please enable Javascript for better experience...
WEB API Tutorial C# - An Introduction to Web API
By Rahul Kumar Jha | Jan 2, 2020 | In Tutorials | Total Views [ 7820 ]
Taged In
(2 Like)
Rate

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.

Introduction

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.

What is MVC?

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.

mvc architecture

The most popular Asp.Net MVC which is a light weight Microsoft Open Source framework also follow MVC pattern.

What is API

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.

What is Web 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 architecture

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.

Web API Tutorial C# - Part 2: Creating MVC with Web API Application >>

Share this

About the Author

Rahul Kumar Jha
Rahul Kumar Jha
Founder, Developer dotnet-concept.com

Public profile: user/profile/99900001


Has working experience in different phases of Software Development Life Cycle (SDLC) in CMS, Gaming, Health Care and Financial Services domain using Agile pattern. Working experience in Design patterns, ASP.NET, MVC, ANGULAR, ANGULAR JS, Windows application, WCF, ADO.NET, SQL Server and Test Driven Development (TDD) environment with JQuery, JavaScript, N-Unit, Entity Frameworks, LINQ, Code Refactoring and Business Objects Models.

User's Comments


 
Please SignUp/Login to comment...

Or comment as anonymous...
* Name
* Email ID
Comment
 
 
 
 
 
 
Sponsors