[thelist] .NET 2.0, Events and AJAX

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Mon Jan 23 11:12:08 CST 2006


> Stage 3 (required): ASPX page with no auto refresh. When the XML file on
> the server is modified (and only when), the data displayed within the
> browser page should be updated via the DOM without the page refreshing.

How about adding data about data (i.e. metadata) to your data?
(sounded like a riddle to me)

For instance add a VersionUID to the xml.

<root>
<metadata>
   <versionUID>1.0.1</versionUID>
</metadata>
<rest-of-the-nodes>
</rest-of-the-nodes>
</root>

Store the versionUID and re-load the data to the page if the version
number (or update date time, or whatever identifies the uniqueness of
your data) changes.

If you think there would be a network overhead, you can write another
server-side ajax method and get only the versionUID transforming your
XML through XSLT.

So you will still check the data each 10-15 second but only update the
view when the data really changes.

If you want an just in time update. Whenever someting changes on the
server, it magically reflects to the client: Since HTTP is a stateless
protocol, instantaneous server push is not very possible.

<sidenote>
On the java side there is something called pushlets, where you
continiously push some amount of data to the client to keep HTTP
session open. -- however, this is not a widely-accepted usage and it
has its own problems.

In addition, I am not sure whether it is possible to write a
pushlet-like .net page; you may need some low-level coding that wraps
around HttpResponse etc.)
</sidenote>


HTH,
--
Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
+> My projects/studies/trials/errors : http://www.sarmal.com/



More information about the thelist mailing list