Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TK apps from CGI script 2

Status
Not open for further replies.

bionicfysh

Programmer
Sep 23, 2003
25
0
0
GB
Dear all,

Can anyone tell me if it is possible to display TK/tcl (or other) applications on a web page generated by a CGI script.

My question may be weird but I wish to have applications created in C, OpenGL, and other propietary devlopment software, displayed on my web site. I hear or JAVA as an alternative to application server technology, but I would like to refrain from this solution if possible.

If anyone knows how to (for example) display the result of a simple TK "Hello World" program onto a webpage created by a perl CGI script, then I would be very grateful.

Many thanks for any feedback.

bionic
 
A web browser only understands how to show web pages (html) but you can get plugins for your browser to allow it to run/interpret other types of data, like java applets or flash programs. I did a search on "tcl browser plugin" and found this site:
This may help you do what you want but remember that visitors to your web site will need to install the plugin before they can use your tcl/tk apps. As far as C goes, I haven't searched for a solution but I'd assume this would be harder to do.
 
Hey thanks Philote !

This is very helpful cuz at least I know that it is possible, although only remotely.

If I understand correctly it is not possible for a server side script to host an application that a client can run. Only static (and relatively dynamic) pages can be displayed.

On the client side however, the latter will need a plugin in order to "see" my app; I guess that this is the way that most JAVA applet work ?


This is perfectly understandable, but regretable. For security and convenience I refrain from using flash. Besides the latter has not been fully implemented on linux (for development) so this is not an option.

I thought of TK/tcl because it is a really cool environment for display of grafx stuff... Many thanks for the link. I will keep on searching, and asking as I am sure that out there there must be a protocol to allow for applications to be hosted on a web browser. If there isn't then there should be.

I wish I know more about programming cuz I would develop one, make it free of use, and become the next Linus Troval :)


thanks again
 
Parkers ! You are a genius, and my sviour :)

Many thanks for this. I did not even think that it would be possible, and you just gave me the answer I was looking for.

Basically (for those of you interested), I will be running molecular modelling simuilations (I know... but I am sad like that) and I want to display the results in real time on my own website so that at any time my tutors can see the progress I am making (MSc in computational chemistry). This of course can be applied to just about any field of science, engineering, medicine, finance, and even only computer games.

Since you can create some decent programs/games on your own system (linux, amiga, etc...) and you want people to play them only, it must be possible instead of relying purely on the JAVA beans... (which I like but don't know enough about to judge).


Well I will keep you all posted on this project once it is up and running...

In the mean time: THANKS to TEK-TIPS, to PHILOTE, and to PARKERS :)


from da bionic one
 
I've been called many things in my life but never a genius !! :)

anyway let us know how you get on...
 
Another option if you're just trying to display non interactive graphical data is to use a perl module to generate a graph as a standard image type (like .png), and just use that perl script in the img's src. Then just have the page or frame set to refresh as often as is feasible or applicable. No client applet or runtime needed, but definitely limits the complexity.

________________________________________
Andrew - Perl Monkey
 
This last comment by icrf is also an interesting point. You see, I have to be able to produce both runtime and fast grafx capabilities. Hence if you all imagine my molecular model carryint out (reverse Monte Carlo) calculations on the server, what will come out will be the (potential) energy of the whole molecular system under investigation as well as the ever changing coordinates of the molecules. Hence two variable sets.


The displays comes in useful, because one must be able to visualise the change in molecular structure (creating/breaking bonds, rotations, twists) at anytime. For this purpose I use a commercial package called PV-WAVE from VNI ( I need to find a way to send this display onto my web page without requiring for the client browser to install any plugins. (imagine that some of my teachers use computers as old as themselves). TK, OpenGL or else will play a big part because I want to let the user the choose parts of the molecule (>10000 atoms) which are of interests to him/her.

Similarly I will need to create graphs representing the change in energy (and other useful parameters) at a given time, so this does not need to be done interactively.

Folks ! I must apoligise for boring you with this comp/chem stuff, but I thought I would give you a picutre of what us guys do in the lab in our spare time... :)

thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top