When .Net originally launched it came with first rate support for Simple Object Access Protocol (SOAP) and at the time I was seriously impressed. Creating a SOAP client-server connection was amazingly easy - little more than adding a .asmx file and decorating your methods with the [WebMethod] attribute, and then point your client project at it and Visual Studio does the rest.

What Visual Studio actually does in this case is create a large auto-generated code file from the WSDL. The WSDL is also auto-generated for you and is a detailed description of your service.

All great, except that it leaves you writing a complex API as part of your web project and requiring an awful lot of auto-generated code to consume it.

Enter Windows Communication Foundation (WCF). With WCF it became possible to specify a service contract – an interface that both the client and server could have that described the API. WCF also moved all description of the actual transport into configuration files – technically it became possible to write one set of code for your client and server, and then decide at run time whether to use HTTP, secure sockets, named pipes or whatever to connect.

The problem is that when I say technically I mean really, really technically: even an expert WCF programmer could end up struggling for hours to get both the server and client config to match. In addition there were only ever a few of the amazing array of options ever used: HTTP or HTTPS? GZIP compressed or not? Get any even slightly wrong would result in hard to investigate errors.

Our client software was intended to be installed and set up by users that weren’t WCF gurus. With a little help from stackoverflow.com I got an auto-config script that worked, but it was still far too much of a coding mess.

However that isn’t the biggest problem with WCF and SOAP – the whole point of SOAP is that it’s universal, an open standard based on XML that anyone can support, right?

Well, no. SOAP is vastly over complicated and the only provider with even remotely complete support for it is Microsoft. Try consuming a complex WCF (or even worse a high-security) service across SOAP from a Java client and your problems are likely to be myriad and involve many dirty workaround hacks. We had Flash components built in Flex and ActionScript that consumed WCF SOAP and found ActionScript’s support to be weak at best. Forget about anything with Javascript.

Basically, SOAP might be this powerful open standard with built in API auto-discovery, but no-one really supports it except Microsoft.

Why?

Well, it turns out that while Microsoft was getting behind SOAP everyone else was getting into Representational State Transfer (REST). The REST model is far simpler: use what HTTP already does. The HTTP protocol already has functionality to get content, upload content and make changes to it; it already includes security (in SSL) and compression (in GZIP). Why re-invent the wheel?

The downside of REST? We lose the WSDL descriptions, so no more auto-discovery and relying on Visual Studio to create everything for you. However all REST APIs are structured in the same way, so it’s usually easy to figure out how everything works.

The great thing about REST? My service can be reached by .Net, Java, Javascript, ActionScript and even spoofed with browser tools like FireBug and Fiddler.

So Microsoft backed the wrong horse. However they’ve realised this (they normally do, eventually) and have started to add first rate support for REST into both ASP.Net MVC and WCF. I'm going to investigate these new approaches, but either way I think it's time to give up on SOAP.

0

Add a comment

And I'll tell you why...

The allegory constantly used by governments and the media is on of a household, and the recession is like the breadwinners losing their jobs. Obviously anyone sensible would cut back, yeah?

But, countries are nothing like households, and that allegory just doesn't work.

I'm not arguing that they shouldn't cut back at all, but I think a healthy government should be running some degree of deficit during a recession.

Here are my assumptions:

1. There will ALWAYS be boom and bust

We can't stop the cycle of boom and bust, it's been going for hundreds of years and will continue for hundreds more. Maybe one day, but no financial theory to date has come close to a way around them.

With that assumption we should plan for them: busts will happen.

The UK will vote on May 5th on whether to switch to the Alternative Vote system (AV) rather than the current First Past The Post (FPTP). I'm a supporter of AV, but FPTP has huge support from both the major parties and from Rupert Murdoch, which means that it both doesn't have a chance and must be the right way on principal.

Fact is anything legal that Murdoch's against I'm for on principal.

There is a problem in UK banking that's stalling our recovery and it goes something like this:

Banks have two main components: high street lending & saving, and investment banking. The investment banking side took far too many risks in dodgy sub prime investments and lost all the money. However if the high street lending & saving side of a big bank fails it does huge damage to the economy, so the government steps in to fill the gap.

British Airways have the best paid flight staff in the world. Their pay is sky high (sorry) – cabin crew can earn up to £56k a year! To put it in context that's more than junior and mid-level doctors – I really don’t see how any cabin crew job can be worth more than even the most junior doctor's role.

BA also run one of the biggest teams per flight – they have 14 on each long-haul plane.

The problem is that flights on BA are expensive.

Recently at TechEd Berlin I attended an optimising Javascript presentation that I described as having "lost focus".

I think this one (from Google) is far more the sort of level and detail that I expected:

This presentation is excellent - in fact I think every developer who ever does any Javascript should view it.

I think the current situation with bankers' bonuses shows a complete failure to understand risk and how markets actually work.

There's a TV show in the UK called Property Ladder. Every week through the property boom it followed someone buying and renovating a house with a view to selling it for profit. They found some proper idiots on that show.

There's a great deal of fuss at the moment about RBS's investment division's planned bonuses. They've made some money (great!) but want to pay over a billion in bonuses, which is over a quarter of the profit.

When .Net originally launched it came with first rate support for Simple Object Access Protocol (SOAP) and at the time I was seriously impressed. Creating a SOAP client-server connection was amazingly easy - little more than adding a .asmx file and decorating your methods with the [WebMethod] attribute, and then point your client project at it and Visual Studio does the rest.

What Visual Studio actually does in this case is create a large auto-generated code file from the WSDL.

Sightseeing

By this point we were starting to feel the tech-fatigue. We took the opportunity to see a little of Berlin, before heading back to hit the labs and the convention stalls

DEV301r Microsoft Visual Studio Tips and Tricks

Scott Cate Nice session to finish on - most of these I knew already but a couple were new. They're all on Scott's blog.

Finally all the stands that had prize draws held their raffles.
Label Cloud
Blog Archive
About Me
About Me
Blogroll
Blogroll
Loading