Home > Archive > Smalltalk > August 2006 > Question for web development gurus
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Question for web development gurus
|
|
| enigmainorlando@aol.com 2006-08-06, 4:01 am |
| Hello,
I've never been into web development -- always found it uninteresting.
But now I find myself forced into it, due to a current project.
I'm using VisualWorks 7.3.1, and for the web development part, Seaside,
which I have found to be reasonably intuitive and painless to learn so
far. The problem I have discovered is that I need web pages on the
client side to be what I will call "updated dynamically" so to speak.
In other words, you access my server and get some information in the
form of a web page. But the server will continue to run some
computations, and I would like either the server to be able to
automatically update the web page on the client side, or the client
side web page to be able to automatically poll or probe or access the
server to get the updated info, without the user having to hit a
refresh button or click a link or whatever.
Now again, I'm no web development guru -- in fact I know little to
nothing about it. But correct me if I am wrong -- regular old static
HTML cannot do what I want... correct? If so, what do I need? What's
the easiest, simplest, cheapest solution for me? I read that Seaside
would work with JavaScript. Does JavaScript have the capability to do
what I want? If it doesn't, what does? I already know that Java could
do it, or a custom client-side program in whatever language (for me -
Smalltalk). However, I am trying to keep this as simple as possible,
and I would like to avoid creating a custom application that a user
would have to download. I just want them to be able to use a standard
web browser.
Bottom line: what do I need? Will HTML do it (unlikely)? Or would
JavaScript work (would be great if it did -- sounds painless enough,
relatively speaking)? Or do I have to (puke) go and learn Java in
order to get this thing to do what I want? Or are there other
solutions (besides a custom application of course)? I'd like to avoid
Java if at all possible.
Thanks for the help.
| |
| David Gorisek 2006-08-06, 4:01 am |
| You don't need Java for this. See the following page on how to do it:
http://ajaxpatterns.org/Periodic_Refresh
Best regards,
David
enigmainorlando@aol.com wrote:
> Hello,
>
> I've never been into web development -- always found it uninteresting.
> But now I find myself forced into it, due to a current project.
>
> I'm using VisualWorks 7.3.1, and for the web development part, Seaside,
> which I have found to be reasonably intuitive and painless to learn so
> far. The problem I have discovered is that I need web pages on the
> client side to be what I will call "updated dynamically" so to speak.
> In other words, you access my server and get some information in the
> form of a web page. But the server will continue to run some
> computations, and I would like either the server to be able to
> automatically update the web page on the client side, or the client
> side web page to be able to automatically poll or probe or access the
> server to get the updated info, without the user having to hit a
> refresh button or click a link or whatever.
>
> Now again, I'm no web development guru -- in fact I know little to
> nothing about it. But correct me if I am wrong -- regular old static
> HTML cannot do what I want... correct? If so, what do I need? What's
> the easiest, simplest, cheapest solution for me? I read that Seaside
> would work with JavaScript. Does JavaScript have the capability to do
> what I want? If it doesn't, what does? I already know that Java could
> do it, or a custom client-side program in whatever language (for me -
> Smalltalk). However, I am trying to keep this as simple as possible,
> and I would like to avoid creating a custom application that a user
> would have to download. I just want them to be able to use a standard
> web browser.
>
> Bottom line: what do I need? Will HTML do it (unlikely)? Or would
> JavaScript work (would be great if it did -- sounds painless enough,
> relatively speaking)? Or do I have to (puke) go and learn Java in
> order to get this thing to do what I want? Or are there other
> solutions (besides a custom application of course)? I'd like to avoid
> Java if at all possible.
>
> Thanks for the help.
>
| |
| Jochen Riekhof 2006-08-06, 4:01 am |
| Hi...
The simplest and oldest form to get a refresh is using the html meta tag
to trigger a refresh of the entire web page after a defined number of
seconds. This tag goes inside the <head> </head> section of your html
output:
<meta http-equiv="refresh" content="5; URL=http://en.selfhtml.org/">
This one reloads your webbrowser after 5 seconds with the contents of
the en.selfhtml.org website. Of course you can just specify the same
page address that contins this tag to get a repeated refresh.
For avoiding reload of the entire page, this kind of refresh is often
put in frames or additional info windows.
Ciao
....Jochen
| |
| Doug Swartz 2006-08-06, 8:01 am |
| On 6-Aug-2006, Jochen Riekhof <jochen@rieknospamhof.de> wrote:
> The simplest and oldest form to get a refresh is using the html meta tag
>
> to trigger a refresh of the entire web page after a defined number of
> seconds. This tag goes inside the <head> </head> section of your html
> output:
> <meta http-equiv="refresh" content="5; URL=http://en.selfhtml.org/">
>
> This one reloads your webbrowser after 5 seconds with the contents of
> the en.selfhtml.org website. Of course you can just specify the same
> page address that contins this tag to get a repeated refresh.
The second simplest method is to use the javascript setTimeout function
and and BODY onLoad property. To do this, change your BODY tag to include
syntax something like:
<BODY onLoad="setTimeout(’window.location=”http://en.selfhtml.org/”‘,
5000);">
Of course, remember that users can disable javascript. Of course, user of
some browsers, like Opera, can disable metatag refreshses also.
If you only want part of your page to be refreshed, you can use either of
these techniques inside a Frame or IFrame.
Doug Swartz
| |
| enigmainorlando@aol.com 2006-08-07, 4:07 am |
| Thanks to everyone for all of the help so far. Is there a way to
trigger a refresh from the server?
| |
| enigmainorlando@aol.com 2006-08-07, 4:07 am |
| Will streaming (from server to client) work with Seaside? Thanks.
| |
| Jochen Riekhof 2006-08-07, 8:01 am |
| > Is there a way to trigger a refresh from the server?
With meta-refresh this was somewhat tricky I remember. I /think/ we did it
once several years ago by not closing the server output stream (writing
sporadic whitespace to keep the conmnection alifve) and finally writing a
javascript refresh command as mentioned previously at the end before closing
the stream.
Ciao
....Jochen
| |
| Astares 2006-08-08, 7:03 pm |
| > Is there a way to trigger a refresh from the server?
Depending on your needs you may want to push updates to all web browser
clients
from the server side instead of client side refresh or polling.
There is an implementation for Seaside available:
See
http://astares.blogspot.com/2006/05...easide-web.html
Keep on talking small
Torsten
|
|
|
|
|