Friday, March 21, 2014

Piracy and Unconventional Wisdom

This is something i came across today. It was a real informer.

"As software developers, piracy is something that affects us all. You might not see it directly if you work for a large company but you still have an interest in who is using your company's software. If you work for a small company or are a solo developer, piracy hits a lot closer to home. 
Both large and small companies usually offer "knee jerk" reactions. Such reactions are despite conventional wisdom and are generally incorrect. "

This article is a little one year old. But it has a lot to offer for the knowledge workers. Read the complete article here :

Thursday, March 20, 2014

Display buzy icon during windows client web service call .Net 4.5

Think of a situation where you encounter delay when performing remote service calls from your thick client. For example a windows forms application calling a long running process. Your user might have no clue of what is going on with their application. So it is very important at-least to let the user know something is going behind the scenes. One option is to use a busy cursor when performing a service call and hide when the service call is done. As a developer this can be achieved in several ways. But we need to look into the best possible option to fulfill this requirement in a generalized way.

Since this requirement is common and we will have to duplicate code in each place where the application calls a service, there is an elegant common solution to this. 

Whenever we need to intercept service calls to and from client and the server, .Net framework has provided necessary tools with extension points to tap into the service call and perform actions.


Take a look at Message Inspectors at MSDN


http://msdn.microsoft.com/en-us/library/aa717047(v=vs.110).aspx


We can use the BeforeSendRequest method to display the buzy cursor and AfterReceiveReply to hide the wait cursor