Does ASP.NE开发者_如何学GoT MVC support RESTful architecture by default?
What I want to know is, if I want to develop a RESTful kind of project, need I to specially work anything on ASP.NET MVC or it will support this feature by default?
If you use Controllers to represent resources and simply implement "actions" that are equal to the HTTP methods, then you can produce a RESTful system very easily with ASP.NET MVC.
MVC has been created with REST in mind. It is REST-friendly but not 100% REST compliant, especially when it comes to content-negotiation - although you can implement it yourself on the top of MVC.
ASP.NET MVC does promote a REST architecture.
See:
- The REST-Like Aspect Of ASP.NET MVC - Phil Haack, Nov 2007
- Rest For ASP.NET MVC SDK and Sample - Phil Haack, Aug 2009
精彩评论