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
562 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTTP POST URL 2 101
C# and SQL Server with User Defined table 4 96
website content maintenance 3 100
Import data into excel from web page 10 101
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

840 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