Last post May 02, 2011 10:58 PM by atconway
Apr 25, 2011 02:12 PM|WayneFulcher|LINK
I am working on a site that will work much like a penny auction site. I need to write a asp.net web page (web application) that once the page is loaded would start a timer ( i guess ) and every second call a webservice or (something???) that would be running
on the webserver that can send data back to the client page. The data sent back would then be used to update the display (content) showing on the web page.
I have read many articles and am not sure what technology I should really be using.
My main concern is I want it to be fast, efficent and "supported" by most every web brower. In addition I don't want the technology to be considered obsolete in the near future (2 years). So I am looking for the best, latest technology that is supported.
(Not asking for much am I?)
My development environment will be using an ASP.Net web application targeting .net 4.0. For the server side I can also use .net to create a web service or even a windows service application that talks tcp/ip if needed.
What I have read about so far is:
Comet: Almost every artical I can find about this seems to indicats this is a much older technology and thus may not be the best performer or easiest for my development environment to implement.
Adobe Flash: I know absolutly nothing about this technology so I am hoping someone could tell me a little about it.
WebSockets: From what I have read this looks to be the way of the future but seems like it may be too new and thus many browsers dont currently support it. If I knew they would all support it by end of year then I might consider this one. (Or maybe they
do already and I just don't know it.)
AJAX: I read something about AJAX, but could not find enough material to understand if this is what I need and would accomplish what I am looking for or not.
Any advice to help me get started on the right foot would be greatly appriciated.
Apr 25, 2011 03:39 PM|ddelella|LINK
and that would load the auction as closed because the current time is past the auction end time. It is a pretty simple page but like you said speed is everything. There are plenty of videos on AJAX but here is the w3cschool page:
Apr 26, 2011 06:07 AM|r_nassabeh|LINK
Nowadays JQuery is used for most client-server communication scenarioes. You can have a look at
http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx for a brief introduction to jQuery and ways in which you can integrate it into ASP .NET
Apr 26, 2011 06:16 AM|amitpatel.it|LINK
you can use silver light.... that is exectuing in clients side for fetching data from server you use web service or wcf service....
Let me know if you feel any problem with silver light application....
May 02, 2011 12:07 PM|WayneFulcher|LINK
I have been researching silverlight and I can't believe I have not converted to silverlight already. From what I have seen so far it appears to be the best thing since sliced bread. However I have seen examples where the client calls a webservice method
and then the webservice ends up making the async event fire on the client when it is done, however what I need is to have the client make 1 call to the webservice and then have the webservice continue making the async event fire on the client over and over
again without the client having to recall the service. It would look something like this:
Step 1. Client sets up event to fire from the webservice.
Step 2. Client calls a webservice method to get changes in a stock prices for a stock. Example: myservice.GetStockPriceUpdates('MSFT');
Step 3. WebService then somehow maintains a list of clients wanting stock quote updates and every 3 seconds it (lets pretend) reads a SQL database with the stock quotes in it. If the price is different from last time it checked then it fires the client side
event for all clients who are subscribed to get updates.
Can you tell me is this possible and if so can you point me to an example of how to accomplish this? The idea here is the client does not need to worry about creating a timer and calling the service over and over again. My thinking is this would cut down
on the amount calls going back and forth, assuming you have 1000 clients, then the server would only need to read the database 1 time every 3 seconds and send it out to 1000 clients. Rather than have to respond to 1000 client incoming calls and read the database
1000 times every 3 seconds with the timer on the client.
May 02, 2011 05:13 PM|abhisheks|LINK
The simple answer to the question is because of the stateless nature of web, it is just not possible. Even If webservice maintaings the list of clients wanting stock quote updates(you are probably referring to maintaining the list in the server), the
client has no clue as to what happened in the server. The client would need to make that call to the server to get the updated data.
May 02, 2011 05:38 PM|Shellymn|LINK
You can use RTMP protocol for realtime updates
Listed below development environments are needed
May 02, 2011 05:40 PM|Shellymn|LINK
Please go through fluorinefx asp.net integration samples
May 02, 2011 10:58 PM|atconway|LINK
@WayneFulcher - Silverlight is the way to go no questions asked. You have to be careful asking about it on this forum because a lot of people have not used it before (which is
OK; this is an ASP.NET forum after all), and will offer (IMO) a much more involved solution using COMET, AJAX polling, jQuery etc,. when Silverlight allows for a push style architecture in a much more streamlined approach. The only downside (and I
use this word lightly becuase to me it is not) to Silverlight is it requires a small download by the client of the Silverlight plug in. To some this is a show stopper, and if that is
truly the case then a pure web solution using a COMET web model might be required. The last conference I was at the stats were like 40% of all Win XP machines had Silverlight installed and something like 60% of Windows 7 machines had it installed and
the numbers were increasing (I don't remember the exact numbers but I believe it was close to that).
What you need to do if using Silverlight is create a WCF Duplex service that allows a WCF service to communicate with the client. The following (2) articles help explain this approach:
How to: Build a Duplex Service for a Silverlight Client:
Pushing Data to a Silverlight Client with a WCF Duplex Service - Part I:
If needed, you can create a Silverlight control and embed it on an existing ASP.NET page using the <object> tags like detailed below:
How to: Add Silverlight to a Web Page by Using HTML:
...and lastly, for really digging into Silverlight and getting granular explanations to your questions, you will need to move over and repost some of this on the Silverlight forums located below:
Hope this helps!