Re: remote execution from an applet

Shawn Silverman <[email protected]>
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <[email protected]>
Hi, Tina.  I prefer web page control when I can because the UI and the 
client/server interface is already done for you (i.e. the browser and 
HTTP protocol and servlet framework).  All the same things can be done 
with applets, however, you usually need to come up with your own 
communication protocol over a socket connection to the server.

Halfway between these two solutions is to use HTTP connections from 
within your applet when a button is pressed.  eg. use
	new 
URL("http://myserver_that_the_applet_is_on/servlet/SomeRequestHandler")

Then you can use a servlet on the server side to handle what you need.  
I've implemented this approach with a NickClick digital camera applet 
that displays the image off the camera, and that can tell the camera to 
take a picture, etc.  I used an applet because I would have to convert 
the camera data to a GIF or JPG on the TINI, and it was faster to do 
this on the client side.

For lots of other projects, I've used only HTML, CSS, and servlets.  
This is the approach I recommend.

[Oh, before I forget, the nature of an applet is that its code runs on 
the browser of the client.  it does not run server-side on the TINI.]

May I recommend downloading the Tynamo server from 
http://tynamo.qindesign.com/  It has full HTTP/1.1 and Servlet 2.2 
capabilities.  (Note that the website currently has version 1.0-RC4, 
but I will be posting 1.0 shortly, after I finish "perfecting" the 
documentation :)  )

Hope that helps,
	-Shawn

On 29-Apr-04, at 6:47 AM, Tina McGrath wrote:

> hi,
>
> please help if you can,  out lecturer has led us a merry dance, and 
> only now with two days to go informs us that we have gone about the 
> project the wrong way and should have been using servlets instead of 
> applets!!!
>
> thanks to all who have helped me get the applet working, it was 
> something very small and wood for trees and all that, but now it is 
> sorted.
>
> what we didnt take into account was that the applet would not work the 
> tini board, stupid i know, but there you have it.
>
> what i want to happen is that went a button on the applet is pressed 
> it turns lights on on a board that is connected to the tini board.  we 
> have the code that does this, it is compiled and converted to a .tini 
> file, an it works, but how do i get this .tini file to communicate 
> with the button on the applet.  any life line would be very much 
> appreciated.
>
> tks

_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.