Close

WCF Interoperability – ASMX, WCF or MVC REST SDK - Open Questions

A while ago I did a blog
post
on WCF-ASMX interoperability which came out from an experience I had in service collaboration with a partner. In a recent conversation
with Jeff Bergman, a friend
and co-worker, there was a question of WCF or not to WCF on a project which
requires similar service interop and since I believe in Atwood’s theory of strong opinions
held weekly
, I jumped in with the opinion of using WCF contrary to my
own earlier recommendation
.

Jeff of course disagreed and pointed out the Christian’s Weyer’s
article on flattening. For my excellent
logging and tracing
in WCF argument, he stated that “for asmx, you can add the [SoapLoggerExtensionAttribute]
to get some kind of logging of soap requests”
. Therefore I am quoting his argument below; I am still somewhat unconvinced 'in principle' but pragmatically speaking, he drives a hard bargain!

“At the end of the
day, I think the WCF architecture is powerful but with power comes complexity,
complexity in configuration files and complexity in the wsdl it generates and
complexity in the pipeline architecture and how you can plug into it.

As for Rest, the WCF
team has developed the MVC Rest SDK.

I prefer convention
over configuration and simplicity of code instead of injection as a general
principle.

My preference would to
be to use WCF in situations where you have more control over the client
(internal uses mainly) and want to support different communication
channels.  At the end of the day when dealing with partners,
Interoperability is the biggest challenge and making things as simple to
consume as possible is desirable.

Have you encountered an interop issue with your WCF service and
what has been your approach? Leave a comment or email me.

Happy Coding!

Share

5 thoughts on “WCF Interoperability – ASMX, WCF or MVC REST SDK - Open Questions

  1. I’ll be honest, I’ve never flown a plane but I think I’m smart enough to crank a Cessna 150 if I had to figure it out. The above screen shot is a real Cessna 150 cockpit. There are a few gauges, some knobs, etc. Really not that bad. And I think this explains ASMX really well. ASMX services are easy to crank and jump start. Think about it. We take an existing Asp.Net website and add a file called “asmx”. Any method we attribute with [WebMethod] magically turns into a service. Objects we pass in and pass out that have public getters and setters will be serialized into XML. wcf Think of it like a large plane that can repurposed for hauling passengers, hauling cargo, military use or whatever. We are dealing with a plane but it is all about how that plane is configured. Because things can be configured a lot of ways with the WCF 747 plane there are a lot more buttons in the airplane cockpit as compared to theCessna 150 . The flip side of this is that once you understand how to configure WCF you’ve got one of the most versatile plane in the world! From a developers stand point, the same logic or code written in an ASMX service works in WCF. The code between the curly braces is the same. The bottom line in either case is a method gets called and an object gets passed in (we call this a message when talking about services). The difference in WCF is we program to a specific contract. Here’s the same example above done in WCF.

  2. One question I was often asked last week was: “I have a bunch of ASMX services today, what is the best way for me to prepare for and/or migrate to Indigo”? (also asked as “can you tell me more about this ASMX migration thing?”). There are a number of ways to go about this, but Kirk and I came across a compelling approach that I will elaborate on here. Before we begin, if you need some background on the differences between ASMX 1.0, ASMX 2.0, and WCF

  3. We are engaged in a battle that pits the “old way” of creating web services versus the “new way.” In the video series, two fighters go toe-to-toe, or rather keyboard-to-keyboard to highlight the benefits of using Windows Communication Foundation (WCF) to build robust web services. Take a tour of what WCF has to offer by exploring the pillars.

Comments are closed.