Wednesday, 15 February 2012

c# - REST services in a ASP.NET MVC application -



c# - REST services in a ASP.NET MVC application -

i come rubyonrails background sorry if looks silly question:

let's creating our app in asp.net mvc , need develop restful web services give json can utilize in our app.

how create services? wcf ? in ruby used java-jersey service side in current work place .net shop strong experience in silverlight , ria services. net approach of web services asp.net mvc ?

wcf super powerful incredibly complex communication framework allows systems talk on multiple protocols. sounded cool during microsoft's initial pitch, there incredible amount of overhead to, say, force scalar across wire. wcf still has place, it's beast of framework.

given how much effort there in integrating solution, mvc developers noticed that, hey! can homecoming jsonresult mvc controller , have ajax scripts consume that. quick , dirty!

microsoft refined experience web api, focused solely on developing http services. it's architected quite mvc, makes pretty darned easy pick up. typically restful, doesn't need be. design works really, http - remember, http application protocol transport protocol.

there neat stuff how takes care of serialization - if client wants xml, web api gives xml. if client wants json, web api gives json. little work, can come custom serialization formats!

so, before go off on 1 of many tangents how awesome sauce web api is, allow me if looking simple, powerful framework can deliver restful services on http, web api solution.

http://www.asp.net/web-api

c# asp.net-mvc

No comments:

Post a Comment