05 August 2004

CV Crap

I heard this term from a friend who worked as a recruitment agent. The term is referring to those people put in all buzz words in their CV, such like C/C++/C#/JAVA/VB, UNIX/WINDOWS etc.
Unfortunately, I am sliding to the edge of a CV crap. Our employer decided to abandon .NET technology for some period and asked all engineers to pick up a second skill set from existing system – which sound to me like pre-emptive notice of another round of ‘reorganisation’- anyway, I am doing Java J2EE migration now.
That would not stop me on the journey to .NET though. I still plan to take the other four MCSD exams before end of the year- maybe right time when we will find out what our employer wants.
I now read in the morning journey to office, then spend a little time on exercises before crack into Java work. Occasionally I advise people on middleware development which is on C/C++. I do some ASP .NET application in the evening at the moment.

Til the end it is how you think not languages mattered.

03 August 2004

Asynchronous call for Web Forms

Call back function is useful in catch asynchronous result arrival event. It works fine on those known sockets/connection such like WIN FORM, Web Services. However, it is not applicable for Web form. There is simply no easy, reliable way for server to notify client browser.

WaitOne, WaitAny and WaitAll provides a mechanism allowing a Web form to multi-task background processes and collect result after they have completed. Read this Optimizing Web service calls from Web Forms

This pattern is not that helpful when comes to UI, however.
Image there is a long run process, I want to display a progress bar one the call has been made. Then a few ten seconds later, I want to collect the result and update the UI accordingly- just show the progress bar if the result is not ready. You have to use script to refresh browser.

(5/03/2005)Just found this discussion that suggests implementing System.Web.IHttpAsyncHandler interface in the page behind class which sloves the problem.

27 July 2004

Remoting Basic

MarshalByRef executes remote method calls on the server side. Only ObjRef-networked object pointer is passed around. Client doesn't have the complied object, but the interface or base class to the object.

ByValue - class need to be serializable. Object is serialized to binary or string(xml) and transport between server/client. It then restored to a copy of the original object at the other end. Which means client and server both need the complied class prototype. State info is preserved.

Basic Architecture
At least three three assemblies are needed for a .net remoting project:
1. Shared Assembly: Client and server both need to have access to the same interface definition (MarshalByRef), serializable objects(ByValue)
2. Server
3. Client

Implement remoting project: Life Cycle
1. Implement SharedAssembly
1.1 Define the remote interface
1.2 Define data class that will be passed around in the shared

2. Implement Server
2.1 Implement the interface by Server.
2.2 Create a new channel and register it to the remoting service.
2.3 Register the server service as "RegisterWellKnownServiceType"

3. Implement client
3.1 Registering client channel
3.2 create local proxt object to forward calls to server