Web service proxies for asmx web services are quite annoying. They are supposed to represent the contract between the service and the client and without any doubt there should be such a contract. But in reality they represent not only the contract between the service and the client but also the tool that generates them. And they make you vulnerable to any inefficiencies of that tool. Do you like to be dependant in such a way?

Well, fortunately WCF offers much better approach. The contract between the service and the client is represented by an interface decorated with the right attributes. That is all you need for the contract between the client and the server. There is no third party involved and everything is clear. I like that.

Here is an example of a wrapper around the WCF client.

Continued...

Let’s say you have a group of settings in your database. There are some settings that are specific for each client. But those settings can also be generic and be used for all the clients. So if ClientID column contains the key of your client you use that value but if there is no such value specified the value defaults to the value specified in the column with ClientID set to NULL. So in a way your client specific value inherits from the default value and if there is no specific value the default is used.

Now the things get more complicated if you can have some setting with a client specific value and no default value and some with a default value and no client specific value.

Let’s set up a test table and test data first.

Continued...

This is a simple tool for testing Flash Remoting Calls I want to share. You can use the tool from here: http://bodurov.com/TestFlashRemoting/ or download the source from here http://bodurov.com/TestFlashRemoting/TestFlashRemoting.zip This is a simple and light weight tool to test your services.

I have set up a test service with this source:

Continued...