Formatters And Content Negotiation In ASP.NET Web API 2


Introduction

As the title suggests, this article will focus on the practical aspects of the formatters and the content negotiation in ASP.NET Web API. This article will explain what content negotiation is and why it is necessary, and how to achieve and get it working in ASP.NET Web API. The article will focus more on the implementation part of the content negotiation in Web API. The first part of the article will focus on the formatters, where it is described, how to support XML or JSON formats in Web API and how to format the result of the API. We’ll take a sample Web API project, that caters simple CRUD operations on the database, using the Entity Framework. We’ll not go into the details of underlying project architecture and the standard way of architecture of the same, but will focus on the content negotiation part in Web API projects. For creating a standard enterprise level Application with Web API, you can follow this series. You can find all the downloads related to this article at the end of the post.

Continue reading “Formatters And Content Negotiation In ASP.NET Web API 2”

How to Setup Angular Project using Yeoman


Problem Statement

As per my experience with people, it always has been a challenge to decide the right folder structure for your front-end applications which can be globally accepted. Especially, if I talk about AngularJS project, people are confused between two structures:

Continue reading “How to Setup Angular Project using Yeoman”

Getting Started with Grunt Task Runner


About Task Runner

There are certain tasks which front-end developers are often asked to do. Tasks like:

  • CSS file compression
  • JS minification or obfuscation
  • HTML/JSON file minification
  • Image optimisation
  • Compile SASS or LESS files to generate CSS files
  • Unit testing
  • SVN commit
  • Build deployment etc

To do the above tasks we need so many different reliable tools and it is a tedious task to find such types of reliable tools online. And I don’t think any such tool is available which can do all the above tasks in one click.

What if these tasks can be automated and can be done in one key press? To do this, we would need to write few tasks in JS file and run Grunt.

Continue reading “Getting Started with Grunt Task Runner”

CRUD operations using RESTful ASP.Net WebAPI and MongoDB


MongoDB-Logo-5c3a7405a85675366beb3a5ec4c032348c390b3f142f5e6dddf1d78e2df5cb5c

macbook-624707_640

Introduction

In my previous article, we did CRUD operations using MongoDB shell commands. As promised, here I am with this article sharing how to create RESTful Web API for CRUD operations in MongoDB using .NET drivers.

As you already know, MongoDB is the future of modern web applications and it is very important for .NET developers to get their hands on MongoDB drivers, so this article is my little effort in this direction. I hope you would like it and appreciate my work.

In this article, we are to going to create Web APIs for manipulating and performing CRUD operations on student resource of our project. Continue reading “CRUD operations using RESTful ASP.Net WebAPI and MongoDB”

Getting started with Web Components And PolymerJS


Introduction

You must have tried a lot of ways to develop reusable components or widgets. But what about the components like “video”, “audio” or “select” components (tags) of HTML(5)? Did you ever investigate how these components work without exposing its style, script or local DOM structure? Web applications are being developed in various ways depending on the requirements but hardly fulfil the reusability aspect across projects or modules.

This article would help up to a certain extent to create and reuse such type of web components which can be instantiated and reused in a similar way how we are instantiating and using other HTML elements.

Continue reading “Getting started with Web Components And PolymerJS”

MongoDb: A brief introduction


MongoDB-Logo-5c3a7405a85675366beb3a5ec4c032348c390b3f142f5e6dddf1d78e2df5cb5c

Introduction

I read somewhere that MongoDB is the database for the modern web which induced a thought in me that what’s so special about this new database that everybody is talking about it and believe me when I started digging into this I really got impressed. So this article is dedicated to great MongoDB. In this article we will learn basics about MongoDB. I have tried to make things easier and clear to understand. I hope in the end of this article you will have enough understanding about MongoDB.

Continue reading “MongoDb: A brief introduction”

Understanding Recursion in C# : A Practical Approach


Introduction

In our programming life there are situations where we have to write code to perform some repetitive tasks and in those situations recursion can become our best friend, but the problem with recursion is that it is sometimes complicated to understand.

Recursion is one of the topics that we all are taught in our student life but at that time we do not give much attention to this guy, and when we start our life as a programmer this same guy comes again in our life to irritate us and laugh at us.

So this is my little effort to introduce you to recursion so that you can use it in your code without any doubt and hesitation.

Though many of the problems can be easily solved using iteration and loops, there are some problems like graphs and tree where recursion can come in handy.

In this article I’ll be focusing more on algorithms rather than on programming language —  you can choose programming language of you to own choice. For demonstration purposes, I’ll be using JavaScript & C# because most of the programmers are familiar with the same.
Continue reading “Understanding Recursion in C# : A Practical Approach”