From: Guo Yangguang <
[email protected]>
Subject: TK for web application
Date: Wed, 1 Aug 2007 11:35:11 +0900
Message-ID: said:
Is TK suitable for rails "web" application?It seems that TK is for
desktop application.
If i want to use TK in "rails web application",where should i put my
files containing TK codes in the rails directory?
When you want to run a Tk GUI on a client browser,
you must use "Tcl Plugin" and write a Tcl/Tk code
(NOT a Ruby/Tk code).
However, if you can admit to manage a (multi-window) Ruby/Tk GUI on
the server, Ruby/TkORCA (Ruby/Tk on RFB canvas) may be able to help you.
It can provide Ruby/Tk applications on the Net
(includes embedding it in a part of a web page).
You can use any library, if the library can draw on a container
frame of Tk (e.g. VTK is OK) or never draw on the screen.
Of course, it can store access logs and, if you want,
GUI control logs by users.
Unfortunately, current Ruby/TkORCA has no interface for a view of Rails.
Probably, making such interface is a little troublesome,
because a Tk GUI is not a "send and response"-type application
but a "connection"-type application.
A web page must has two or more frames.
One of them is a Ruby/TkORCA frame which keeps a connection to
the server, and some of othres are asynchronous pages.
The running Ruby/TkORCA GUI can be controlled by an administrator
(in this case, a web server process).
To affect the pages on the client browser, the GUI must send
the new pages with asynchronous control.
If you want to try, I'll make the current snapshot downloadable.
The only document of Ruby/TkORCA is a digest written with Japanese.
Please ask me about the setup and the usage of Ruby/TkORCA.