Solved

When creating new web services, should I being using RESTful or SOAP or both?  JSON, XML, or both?

Posted on 2011-09-07
4
571 Views
Last Modified: 2013-11-18
I am creating and updating some web services for use by others and many of our other applications.  I've head RESTful is the way to do things now.  I need to use C# for these applications, so I figured on using Visual Studio 2010.  For the sake of appealing and being useful to a large user base potentially, should I make it work for both REST and SOAP?  Should objects be sent and returned using JSON, XML, or let the user decide and provide all combinations.  Will Visual Studio or other tools allow me to create the combinations without coding the interfaces four times?  Any ideas, links to tutorials, or books to make all this as flexible as possible would be very helpful.
0
Comment
Question by:mvhughes
4 Comments
 
LVL 6

Accepted Solution

by:
Rhino1272 earned 167 total points
ID: 36498102
You definitely want to look at WCF.  You can create your service once and then add endpoints for each one of the scenarios described above.  The data format you pass back and forth depends upon what kind of data you use.  I personally prefer JSON because it is easily parsed by many popular JavaScript libraries.
0
 
LVL 17

Assisted Solution

by:sonawanekiran
sonawanekiran earned 167 total points
ID: 36502345
The ASMX services were pretty Microsofty. Not to say that they didn't try to be compatible with other consumers; but the model wasn't made to fit much besides ASP.NET web pages and some other custom Microsoft consumers. Whereas WCF, because of its architecture, allows your service to have very open-standard--based endpoints, e.g. REST, JSON, etc. in addition to the usual SOAP. Other people will probably have a much easier time consuming your WCF service than your ASMX (web service) one.
0
 
LVL 9

Assisted Solution

by:Grant Spiteri
Grant Spiteri earned 166 total points
ID: 36506782
Depends on the situation but personally my rule of thumb is SOA exposing Common functionality across multiple channels, using WCF with multiple variations of binding: http://msdn.microsoft.com/en-us/magazine/cc163394.aspx depending on the channel consuming.
0
 

Author Closing Comment

by:mvhughes
ID: 36525525
Each of these was very helpful in its own way.  Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question