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

Industry Leaders: 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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
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…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
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 …

696 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