Re: Webbased look and feel in Perl/Tk
by Zaxo (Archbishop) on Aug 21, 2001 at 10:13 UTC
|
Tk is fine for an X connection over, say, ssh, but is not suitable for http. It would be absurd to convert screenshots of Tk into imagemaps.
The GUI will need to be translated into HTML forms and perhaps some Javascript. The serverside will need a cgi layer which calls your present program logic. That should be doable if your code is well factored.
You're not forthcoming about what your buttons do or what your application accomplishes, so it's difficult to give more detailed advice.
After Compline, Zaxo
| [reply] |
(ichimunki) Re: Webbased look and feel in Perl/Tk
by ichimunki (Priest) on Aug 21, 2001 at 18:42 UTC
|
As soon as you define "webbased look and feel" we'll have your answer. :)
Seriously, there has been some discussion c.l.p.tk of "skinning" Tk apps, so that they have an internally consistent graphic theme which differs from the rest of your applications. We also have Petruchio's Tk::Style module, which allows for something similar as I understand it. But if your clients want a web browser experience, what's wrong with ripping the Tk interface from your application and replacing it with a CGI interface? Of course, I make this sound trivial, and in some ways for a well-designed application it would be trivial. But it's not, since direct GUI interaction is not the same as turn-based HTTP interaction.
Some tricks you can try might include embedding widgets into your Tk::Text object (and if you don't have one, looks like you'll get to figure one out), and building a toolbar with some fancy icons and some standard browser notions on it. By putting your widgets into the Tk::Text object they will be drawn a lot more like the elements on a web page.
But me personally, I'd ask the client what exactly their problem with the current interface is. By removing borders from buttons, and setting backgrounds to a consistent color, and stuff like that, you can make your app look a lot less like a bunch of glued together GUI-construction-kit pieces and more like a solid whole. Again, Tk::Style looks like it would be helpful in this endeavor. | [reply] |
Re: Webbased look and feel in Perl/Tk
by premchai21 (Curate) on Aug 21, 2001 at 17:32 UTC
|
I believe that the other replies have misinterpreted the question. The idea does not, to me, seem to be to rewrite the interface for the Web but simply make it look that way, while maintaining its Tk-ness underneath. Not knowing much about Tk, I can't help much with that, but -- juo: knowing what sort of application you're writing would help. And which interpretation (or neither?) is correct?
convert((post(POST_CURRENT))->value,
CONV_ZORKMIDS, CONV_DOLLARS) == 0.02
| [reply] [d/l] |
|
|
Correct, The language behind the look and feel does not matter. It is only the look and feel that has to be webbased. The reason for this is that many different applications are used who are all using their own different codes but are used in one workflow by one operator : Some use Perl, some use Java, some use Tcl/Tk, some use some other application owned languages, etc.... but the common wraparound (GUI) for those applications should be a webbased look and feel so that the operator is guided through the different applications in the same look and feel. In that way the different applications are wrapped around one GUI which makes the use easy. Today were soo many applications can be used to achieve target automation is an important factor but besided from automation ease of use is the next important factor and the only way this can be achieved when using different applications is try to wrap them around one GUI that guides the users through the different steps, through the different applications.
| [reply] |
|
|
Your operator(s) should be intelligent enough to figure out that the same controls do the same things, in that case. There really is no one HTML L&F -- it's dependent on the browser, OS, toolkit (in some cases), and possibly other factors. If you really need to have a common look and feel, then find a UI toolkit, plaf (for Java / Swing), and/or customization set, whichever happen(s) to be applicable, that is interfaceable to every system that needs to have a UI. Another alternative is to simply write the UI into one separate frontend, then put the other programs behind some sort of command line interface and use pipes (same box) or sockets (different boxes).
Just my 2%$USD...
| [reply] |
Re: Webbased look and feel in Perl/Tk
by John M. Dlugosz (Monsignor) on Aug 21, 2001 at 08:17 UTC
|
Why not make it a web interface for real? | [reply] |
Re: Webbased look and feel in Perl/Tk
by $code or die (Deacon) on Aug 21, 2001 at 18:19 UTC
|
You could look at Tk::HTML
I think it might do what you want
Error: Keyboard not attached. Press F1 to continue. | [reply] |