You must Sign In to post a response.
  • Category: WCF

    When to use restful web service

    Hi,

    This is an interview question.

    When to use restful web service(In which scenario). Why do we need to choose restful web service.

    Regards,

    RAJAN CRP
  • #759248
    Hi

    Representational State Transfer (REST) is an architectural style having the following features.
    Representations
    Messages
    URIs
    Uniform interface
    Stateless
    Links between resources
    Caching

    In the REST architectural style, resources are accessed using Uniform Resource Identifiers (URIs) like MVC style.
    Designed to use a stateless communication
    protocol(HTTP).

    Regards

    Sridhar.
    DNS Member.
    "Hope for the best.. Prepare for the worst.."

    Sridhar Thota.
    Editor: DNS Forum.

  • #759255
    REST is easier than SOAP, REST is more of a convention for structuring all of your methods, REST works more like you'd expect browser URLs
    - When you want to return output in XML and JSON format
    basically, it is depend upon What is your service abstracting from the client? What is the level of security required? Is your service a long running asynchronous process? And many other requirements will increase the level of complexity. Testability.
    In all above scenario, apparently it easier to test RESTFul web services than their SOAP counter parts
    REST is useful when to concentrate on Caching, HTTP Verb Binding, Security etc

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #759263
    Hello CRPRAJAN,

    Representational state transfer (REST) is a stateless software architecture that reads webpages containing XML. REST, which some architects view as a simpler alternative to Simple Object Access Protocol (SOAP) and Web Services Description Language Web services, has become a popular Web application program interface (API) model over the years. A RESTful API, or RESTful Web service, uses both HTTP and REST.

    REST should be used if it is very important for you to minimize the coupling between client and server components in a distributed application.

    This may be the case if your server is going to be used by many different clients that you do not have control over. It may also be the case if you want to be able to update the server regularly without needing to update the client software.

    Hope this will help you.

    Regards,
    Nirav Lalan
    DNS Gold Member
    "If you can dream it, you can do it."


  • Sign In to post your comments