views:

83

answers:

5

Hello, at my workplace we are about to start a big project. My boss (a programmer, this is a startup) wishes to use ASMX webservices for this purpose. I do not want to start off a new program using deprecated technology and would like to show him this. I dislike WCF at this moment because it has such an extreme learning curve, but I'd rather learn it than use an unsupported technology.

The problem I'm having is that I can not find any practical list of cons and downfalls when compared to WCF so that I can convince my boss to not use them. And saying "it's not as powerful" is not an adequate explanation. What exactly can it not do that we may need it to do for a webservice that is not meant to be shared externally? (as in, we don't support third-parties using our webservices unless they are using one of our clients. )

A: 

I have three words for you: WCF. WCF. WCF.

Here are another three about why you should choose WCF: Power. Versatility. Configurability.

ASMX is great if you want to get a quick and dirty web service up and running, although to be honest it only takes maybe a few minutes more to do a WCF one.

slugster
A: 

The WS-* are really hard to implement with asmx: transactions, reliable messaging, security... etc etc.

And later the bindings: you can change the communication just by configuration, the asmx is just http.

WF exposing services and AppFabric works over wcf.

I would not have doubts, today wcf is the best option for starting a project that needs services.

Pablo Castilla
+1  A: 

I've never understood why some people think that WCF is difficult to learn. Try this: create a new WCF Service Project in Visual Studio. Now look at the code. Compare that with the same code you get from creating a new ASMX project. It's not very different.

John Saunders
It's more than a simple `[WebMethod]` attribute away though and the configuration in web.config looks intense.
Earlz
@Earlz: how much of that configuration do you have to change? It's there if you need it. And [OperationContract] isn't any more complicated than [WebMethod], [ServiceContract] no more than [WebService]. And now you can support real faults with [FaultContract].
John Saunders
A: 

The number of advantages of WCF over ASMX is enormous.

Here are two nice comparisons:

http://fuchangmiao.blogspot.com/2008/09/wcf-vs-asmx.html

http://keithelder.net/blog/archive/2008/10/17/WCF-vs-ASMX-WebServices.aspx

Eric Eijkelenboom
+3  A: 

In short:

ASMX is

  • limited to only HTTP as its transport
  • limited to only being hosted in IIS (no other alternative)
  • limited to very simple security
  • limited to SOAP 1.1

WCF is

  • more flexible in transports: you can use HTTP, NetTCP, MSMQ, many more
  • can be hosted in IIS, WAS, or self-hosted in a Windows Service, in a console app, in a Winforms or WPF app
  • has much more security options
  • supports a plethora of WS-* standards
  • can interoperate with SOAP 1.1 and SOAP 1.2

In short: WCF is ASMX done right - much more flexible, much more powerful, much more in every respect.

Here's another quite useful comparison of WCF and ASMX: Comparing ASMX and WCF

and last but not least, WCF is also better in terms of performance, as this quite extensive MSDN article quite nicely shows (including performance numbers and graphs): A Performance Comparison of Windows Communication Foundation (WCF) with Existing Distributed Communication Technologies

marc_s
@marc_s: actually, ASMX does support SOAP 1.2.
John Saunders