?
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
Medium Priority
?
602 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Accepted Solution

by:
Rhino1272 earned 668 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 668 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 664 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

2017 Webroot Threat Report

MSPs: Get the facts you need to protect your clients.
The 2017 Webroot Threat Report provides a uniquely insightful global view into the analysis and discoveries made by the Webroot® Threat Intelligence Platform to provide insights on key trends and risks as seen by our users.

Question has a verified solution.

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

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

765 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