Showing posts with label MVC4. Show all posts
Showing posts with label MVC4. Show all posts

Wednesday, July 10, 2013

MVC +WEBAPI +KendoUI Sample project

Download the application form following location


https://drive.google.com/folderview?id=0B1N7j4r5VvcrakZ5dEFOVTlUUms&usp=sharing

Here i have demonstrated how we can use kendo UI with MVC and WEB API. There are various ways to do this, this is one of the way.

What is HttpPatch?



Several applications extending the Hypertext Transfer Protocol (HTTP)
require a feature to do partial resource modification. The existing
HTTP PUT method only allows a complete replacement of a document.
This proposal adds a new HTTP method, PATCH, to modify an existing
HTTP resource.

To read more you go to the link below.

https://tools.ietf.org/html/rfc5789#page-2

Saturday, February 16, 2013

Difference between MVC application and MVC WEB API Application


•Web API does not share the Model-View-Controller design of MVC

•Web API directly renders the resulting model object as the response

•Base Class is ApiController where as in MVC we have Controller

•Methods in the controller return raw objects rather than views (or other action helper objects)

•Web API controllers by default dispatch to actions by HTTP verb where as MVC controllers always dispatch to actions by name.

•ApiController is defined in the namespace System.Web.Http and MVC controller is defined in System.Web.Mvc

• Web API controllers are asynchronous by design.

• Different Execution Pipeline because rather than having access to a Response object, API controllers are expected to return a response object of type HttpResponseMessage

•Only a single value can come from the body, and that value must represent the entirety of the body

•Incoming parameters which are not part of the body are handled by a model binding system that similar to the one included in MVC. Incoming and outgoing bodies, on the other hand, are handled by a brand new concept called formatters.

•In MVC When an action returns a raw object, Web API will automatically convert it into a structured response in the desired format (like JSON or XML) using a feature of Web API called Content Negotiation.