-->

14/07/2012

Implementing & Consuming ASP.NET WEB API from JQuery (MVC 4)


In this post we will see how to create a our own WEB API service and will consume it in client using JQuery.
This is the UI i am planning to create, which in-turn talk to a ASP.NET WEB API Service for rendering data. We need to create a API Service and an Application consuming it.
Lets do it step by step.

ASP.NET WEB API Basics (MVC 4)


In earlier post we read about how WEB API evolved and what are the features that made it as one of the best frameworks to build or consume HTTP Services.

While going through the post, keep one thing in mind that WEB API is REST Complaint, so it typically consists of Get(),Put(),Post(),Delete() methods.
           Method                                        URL Structure
             Get()                                            api/Values
             GetItem(int i)                              api/Values/i
             Post (i)                                         api/Values/i with Post method
             Delete(i)                                      api/Values/i with Delete method.

Before writing tons of your custom code, lets see what the default scaffold template has given for a WEB API interface.

13/07/2012

History Behind ASP.NET WEB API

ASP.NET WEB API: 
It is a framework for building and consuming HTTP services that can reach a broad range of clients including browsers and mobile devices. It’s also a great platform for building RESTful services. ASP.NET Web API takes the best features from WCF Web API and merges them with the best features from MVC.
Even before touching code, we need to know why WEB API?

It started with WCF

OData

OData defines an abstract data model and a protocol that let any client access information exposed by any data source. Figure 1 shows some of the most important examples of clients and data sources, illustrating where OData fits in the picture.
 Before going into more details , first look into below videos explaining What and Why.

07/07/2012

Merge in SQL 2008


Many a times we came across situation to merge records between two tables. It will be like incremental update i.e., add new records and update existing records based on a reference column.

We usually accomplish this in two statements.
1. A join statement to update records.
2. A insert statement for new records.

Lets execute and see how this works.

11/06/2012

MVC - DI & Unity with Lifetime Manager


In this post we will see 2 important things.

1. Using Unity Dependency Resolver
2. What is Lifetime manager and its significance.

02/06/2012

Google Page Preview & Google API in MVC Razor


Look at this . . .


Isn't this different from Google home page. Yes it is. This is my custom MVC Razor search page, which i have created with full features of Asynchronous data retrieval, displaying Page Preview . As i cannot write such a powerful search algorithm, i am still using Google API here.

30/05/2012

MVC Razor - In Progress Icon


"In Progress Icon" is the best way of intimating a client about server side action, so that he can wait until it is completed.
In this post we will see how to display one in a MVC Razor application.

27/05/2012

JQuery Switch - Horizontal Animation / Accordion






JQuery: Horizontal Accordion

  • Deck Details
  • Source Details

Nice ! haa... No Plugins used. Simple Sprite Image used with JQuery. Download the code from below link.
JQuerySwitch 

08/05/2012

NuGet Package: Facebook helper in MVC Razor


The era of global connectivity has begun. Social networking being the first step in this process, most of the latest technologies are coming up with different kinds of support for social network sites.
One of the famous of such social networks is Facebook.
Recognized this button. Yes, in this post we will see how to implement this kind of functionality in your MVC Razor application with a single line of code.