Friday, August 26, 2005
Tuesday, August 09, 2005
Two methods are created by default one is to start the webmethod asynchronously and other is to end the asynchronous call.
Sample Web Service:
public class AddService
{
[webmethod]
public int Add (int a,int b)
{
return a+b;
}
}
Sample Client:
public Class AddClient
{
private AddService serviceObject = null;
public AsyncCallback wsCallBack = null;
public void DisplayResults()
{
if ( wsCallBack == null )
{
wsCallBack = new AsyncCallback (AddResults);
}
serviceObject.BeginAdd(5,6,wsCallBack, new ReturnValue());
//Continue to do whatever you want to do
}
//This function is called when the Add webmethod returns
public void AddResults(IAsyncResult asyn)
{
ReturnValue rValue = (ReturnValue)asyn.AsyncState ;
int result = rValue.result; //this gives you the result
serviceObject.EndAdd(asyn);
}
}
//This call is used to represent the return value from the webmethod
Public Class ReturnValue
{
public int result;
}
Friday, August 05, 2005
What is the most furustrating thing in web applications, as compared to the dektop applications. It is the server trip, which most of the web application takes even if you change the seletion of a dropdownlist , it goes to the server to poulate another dropdownlist depending on the seletion we made.
With google introducting their new technologies like Gmail , Google Suggest and now Google Maps. It now seems poosible to have rich user experience on the web too. The google have used AJAX.
What is AJAX. In simple Asyncronus Javascript + XML. AJAX is a set of different technologies, that togater facilitates you to develop web application that offers rich user experience. I am working on a presentation on AJAX, i will soon upload it on my blog.
Some good reference on AJAX
- http://ajaxpattern.org
- Life Without Refresh by Dmitri Khanine and Phil Carrillo, July 2005.
- Ajax: A New Approach to Web Applications by Jesse James Garrett February 18, 2005 of Adaptive Path
- AJAX.NET webblog http://weblogs.asp.net/mschwarz/
Wednesday, August 03, 2005
http://csharp-source.net/
http://java-source.net/