| |
browse.develop.com
Browse.develop.com is a community that was established to collect and
organize valuable web information. Our technical staff have selected and
indexed information and courses that they feel will help you stay
current on best practices across the SDLC.
|
25 Articles match "Resources","Restful"
| Related DevelopMentor Courses | MORE | | Roll Your Own REST-ful WCF Router However, as the MSDN documentation for the WCF Router states, “ The Routing Service does not currently support routing of WCF REST services. The reason is fairly simple: the WCF Routing Service performs routing of messages in a way that is independent of the underlying transport, whereas a REST-based architecture is deeply rooted in the HTTP protocol and relies on the URI for delivery semantics. While the ASP.NET MVC or the new ASP.NET Web API might seems like attractive options, WCF is the way to go if you need to accommodate both Soap-based and Rest-ful clients. Enjoy. DevelopMentor Courses - Tuesday, April 24, 2012 Unit testing a ASP.NET WebAPI controller 'One of he goals of the ASP.NET WebAPI is to make REST style API controllers more testable than more traditional WCF services where in the past. The main reason for this is the HTTP convention to return a 201 Created status code and to include the HTTP Location header with an URI where the new resource can be found. ASP.NET REST WebAPI For the most part that is true but there are cases where an ApiController depends on the actual incoming request and its data and things can become a bit more difficult. 1: public class BooksController : ApiController. 8: 9: }. 11: {. 17: {. The Problem Solver - Sunday, May 12, 2013 Unit testing code depending on the ASP.NET #WebApi HttpClient But with a REST service there is both a client and a service component. In this case the client application contains the following class to load books from the REST WebAPI controller: 1: public class BooksClient. The GetBooks() function gets all books from the REST service. Not a whole lot but the REST convention is to return both an HTTP 201 Created status as well as the location of the new resource in an HTTP header. Of course we still need tests for updating existing resources as well as deleting them but with these examples those should be easy enough :-). The Problem Solver - Monday, May 20, 2013 |
37 Articles match "Resources","Restful"
| The Latest from DevelopMentor | MORE | | Unit testing code depending on the ASP.NET #WebApi HttpClient But with a REST service there is both a client and a service component. In this case the client application contains the following class to load books from the REST WebAPI controller: 1: public class BooksClient. The GetBooks() function gets all books from the REST service. Not a whole lot but the REST convention is to return both an HTTP 201 Created status as well as the location of the new resource in an HTTP header. Of course we still need tests for updating existing resources as well as deleting them but with these examples those should be easy enough :-). The Problem Solver - Monday, May 20, 2013 Unit testing a ASP.NET WebAPI controller 'One of he goals of the ASP.NET WebAPI is to make REST style API controllers more testable than more traditional WCF services where in the past. The main reason for this is the HTTP convention to return a 201 Created status code and to include the HTTP Location header with an URI where the new resource can be found. ASP.NET REST WebAPI For the most part that is true but there are cases where an ApiController depends on the actual incoming request and its data and things can become a bit more difficult. 1: public class BooksController : ApiController. 8: 9: }. 11: {. 17: {. The Problem Solver - Sunday, May 12, 2013 Roll Your Own REST-ful WCF Router However, as the MSDN documentation for the WCF Router states, “ The Routing Service does not currently support routing of WCF REST services. The reason is fairly simple: the WCF Routing Service performs routing of messages in a way that is independent of the underlying transport, whereas a REST-based architecture is deeply rooted in the HTTP protocol and relies on the URI for delivery semantics. While the ASP.NET MVC or the new ASP.NET Web API might seems like attractive options, WCF is the way to go if you need to accommodate both Soap-based and Rest-ful clients. Enjoy. DevelopMentor Courses - Tuesday, April 24, 2012 | -
| The Best from DevelopMentor | MORE | - Using HTTP status codes in a REST service
When we are building REST service we embrace HTTP and as a result we also embrace all the HTTP status codes, not just 200 and 500. 3xx is all about redirection These are all about sending the calling application somewhere else for the actual resource. The 201 Created status is used to indicate that a new resource has been created. This response usually also contains a Location header to indicate the URL of the newly created resource. Another common failure is when the client application asks for some non existent resource. Book GetBook( int id). {. null ). {. The Problem Solver - Wednesday, July 20, 2011 - Digging into WCF REST
Last Thursday evening I presented a talk to the Dallas.NET User Group on support in WCF 4 for building REST-ful services. Here is a summary of the talk: To REST or Not To REST? Building REST-ful Services with the WCF Web Programming Model REST is defined as an architectural style for building services that embrace the principles of the web. Tony will provide concrete examples of where it makes sense to implement REST-ful web services. and Visual Studio 2010, folding in features we first saw in the REST Starter Kit, which is now largely obsolete. Tony and Zuzana's World - Saturday, September 10, 2011 - About logins and searches as resources
A reader posted a question in my blog post about REST services and URL’s about modeling search and login as a resource. About using [link] as a URL in a REST service The URL [link] suggest that there is a resource login while login clearly is an action, not a resource. Another, unrelated to the URL, thing here is that REST services should be stateless in order to promote scalability. would argue that search is another action and not a resource so it should not be part of the URL. routes.IgnoreRoute( "{resource}.axd/{*pathInfo}" The Problem Solver - Monday, July 18, 2011 - Using HTTP methods in a REST service
When REST came along and it embraced the HTTP standard is also embraced the HTTP verbs. And it turns out that makes perfect sense because REST is about resources. And with resources we can do things like create retrieve, update or delete them. However updating data isn’t because that changes the state of the resource. Some actions that change the state of a resource can also be idempotent. For example deleting some data a second time should be fine, the resource was supposed to be removed after the request and it is. And that makes perfect sense. The Problem Solver - Thursday, August 25, 2011 - Using the WCF Web API in an ASP.NET MVC application
Now that works but it is far more likely that you will want to be using IIS and host the REST service as part of a web application. So in this blog post I am going to show how to do the normal thing I Created an ASP.NET MVC 3 app to host the REST service. routes.IgnoreRoute( "{resource}.axd/{*pathInfo}" routes.IgnoreRoute( "{resource}.axd/{*pathInfo}" non browser client application can consume this REST service quite easily using a standard HTTP API available. www.dotnetevents.nl.NET WCF ASP.NET VS2010 Futures NuGet RESTif (_repo != The Problem Solver - Monday, June 13, 2011 - HTML5 and Cross-Origin Resource Sharing call
The new HTML 5 Cross-Origin Resource Sharing , aka as CORS, fixes this problem by allowing our code to call into services on other domains with full security still being enforced by the browser. 2: ViewBag.Title = "Cross-Origin Resource Sharing"; 3: }. 4: 5: Cross-Origin Resource Sharing call. ASP.NET REST dotnetmag HTML5 CORSServices are becoming more important with richer HTML5 style applications. But by default the browser will let you call into a service on the originating domain but not another one. 1: public ActionResult Data(). 3: return Json( new. The Problem Solver - Thursday, November 17, 2011 - Unit testing a ASP.NET WebAPI controller
'One of he goals of the ASP.NET WebAPI is to make REST style API controllers more testable than more traditional WCF services where in the past. The main reason for this is the HTTP convention to return a 201 Created status code and to include the HTTP Location header with an URI where the new resource can be found. ASP.NET REST WebAPI For the most part that is true but there are cases where an ApiController depends on the actual incoming request and its data and things can become a bit more difficult. 1: public class BooksController : ApiController. 8: 9: }. 11: {. 17: {. The Problem Solver - Sunday, May 12, 2013 %>
| | |