Sunday, November 16, 2008

Some Facts About Timer

There are two timers available in .Net with different type of behavior. Please consider these things when you are using the timer.
1. System.Windows.Forms.Timer :
This timer depends on windows messaging and it posts WM_TIMER message to the parent windows message queue. Windows message pump then picks it up and calls the corresponding event handler. This method is not suitable where accurate timing is required. If some other message handler not freeing the processor (thread) for a while can cause delay in calling the timer event handler. Since this is executed in main thread and message pump there is chance of a re-entrancy to the same timer routine before completing the handler. Thus we don’t need to bother about thread syncronization stuff. Another adavnatge is that it is executed in the main GUI thread context and hence we can access GUI elements with out worrying about thread sync problems (ie with out using Invoke(..))
· Not suitable for time taking calculation as it can freeze the GUI
· Not suitable for tasks those needed network operation, any error or delay in connection can cause GUI freezing
This timer routine is having a completely different behavior and system creates a thread to execute the handler. Implementation must be thread safe. If the first call to the timer routine is not finished before the timer expire will case the system to create another thread to execute the new instance of the Timer call back routine. This will definitely create a reentrancy problem. Accessing GUI elements from this timer routine must be done in a thread safe manner. (use Invoke(..))
· Good for long calculations
· Good for handling network calls
· Make sure all precautions took for a multithreaded environment.

Some points stated here especially about usage of invoke need to be tested.

SMS Classified Advertisements

SMS Classified Advertisements

It is a well known truth that mobile phones are the device which everybody keeps with them always. Mobile phones can be a strong media for advertisement. Here I am sharing idea where it can be used a demand based advertisement distribution media for classified advertisements. Advertisers can also give an option to pay for the hits only.
Manorama(A Malayalam daily) is currently publishing a classified which allows home users to sell their used goods. Such things can be further expanded using this technology. In addition to that it can be applied to other classifieds like real estate , Automobiles, Rentals, Jobs, matrimony etc.

How it works:
It allows users to register by sending a simple SMS with their needs. System then registers the mobile number with the requirements in its database. When there is a new advertisement comes that meats the requirement of the customer, system immediately sends the details to the user.
For example if one wants a used Maruti Omni. He just sends an SMS like this
“Maruti Omni Price 60,000/- with gas”. The intelligence embedded in the system recognizes the need by analyzing the text and register it in the system. When ever there is an advertisement comes that matches these criteria’s will send it to subscriber.
In addition to this users can also register their requirements online through the web site. All these registered needs can be viewed online with out contact information. This will encourage users to post their advertisements.

Land near pangappara 1 lakh per cent
Bride Nurse US
House for rent lessthan 4000 near bustand trivandrum
Used computer 7000

Revenue Model:
In addition to the normal classified advertisement revenue, subscribers can be charged for sending advertisements to their mobiles.

System must be intelligent enough to parse the text send by the users and categorize it to send them correct advertisements.

Value added services:
In addition to the above service it can also used for local SMS search. Mobile is a handy device which is always with you. If you need some information while you are on move it can be SMS to local search engine which will give you that information immediately. For example if you want to locate an ATM, Hotel, room availability, etc can be collected conveniently with this service. Telephone based directory enquiry services force you to remember the information, while here you will get an SMS with the details.

Thursday, July 10, 2008

HTML A Technology that need to be retired

HTML is a technology which is around for over 20+ years. After its introduction there came lot of patches to improve it(improvements). It was not originaly designed with co-ordinates. This is then patched up with style sheets. When ever I tried to design a page in VStudio it always gave me lot of annoyance. It is never wysiwg, it appears perfect in the design but if you took that in browser ..oh god it never looks like what you see in Visual Studio. (Yes you can blame my ignorance about placing panels,tables etc). For me the current HTML and ASP is a patchup on a technology which is originally designed for just static presentation.
  • Style sheet patched it up with more visual effects and co-ordinate controls.
  • ASP ,PHP etc patched statefullness to an originally stateless protocol.
  • Microsoft with ASP.Net further added statefullness through viewstate. Still you cannot tie a presentation screen directly to a live object unless you are not playing tricks with session variables.

Finally my question is why big corporation hesitates to bring up a new technology to completely replace HTML with the use of XML or any other technology. It is not a big thing to add a new plugin to browser to support a completely new protocol and at the same time support HTML sites.

A new technology which can inject objects to browser and isolate programers from bothering about protocols and just bother about their objects.