GUI (Tk) and Web Questions, general

Hi all,

My story is that I had a GUI project that had to get done in a hurry
for a presentation and for a number of reasons I got started using Tk
version 8.4.19 that works well (for me) with Ruby1.9 (so far).

After spending about a week ( not all of it entirely rewarding :frowning: ) I
actually starting "liking" the package after a built a couple of quasi
wrapper classes and I found some useful documentation sources.

Now I have spent several additional weeks with other parts of the
project in the foreground but I keep updating the GUI. I am actually
liking things more and more as I am getting comfortable the various
issues.

HOWEVER, IN THE LONG RUN - maybe 6 months - this App (probably) needs
to be BROWSER based. There seems to be a decent chance that Tk 8.4
will let me get a nice working design done (based on sockets) and that
we could contract with a Programmer to convert the DeskTop App to a
Web App.

I say "probably" because ActiveState, the company that sells the Tcl
Dev Kit" for all OS of direct concern now has a number of products
some of which seem to be set to work with Ruby. (Also the initial
intended audience is small - so distributing a truly stable/multi-os/
multi everything desktop pkg seems like an OK idea - IF it really
works without issues.)

So there are just a bunch of questions here:

1. Is Tk version 8.4.19 considered "ancient history" these days and
generally only a few folks using it - or is it considered "ok" to use
for putting a GUI together?

2. Is the TclDevKit gaining any "favor" in the Ruby community, are
"many" folks using it? / is it considered something like "state-of-the-
art" and/or "Clean" compared to the 8.4 stuff?

Any thoughts on this issue of "mocking up forms in 'DeskTop' mode" to
bet moved to an eventual Browser App with minimal effort will be
greatly appreciated.

Thanks!

george

Notes:

Already using "NoteBook" widget for Tabs and a half dozen Combo-boxes,
ListBoxes, over a dozen buttons and so on. Considered using Shoes,
but I could not tell what other issues I would run into using
TCPSockets and all.

1. Is Tk version 8.4.19 considered "ancient history" these days and
generally only a few folks using it - or is it considered "ok" to use
for putting a GUI together?

Yes, as far as Tk goes, the 8.4.x series is ancient history, though
still in common usage - go figure. For info about newer versions of Tk
on Ruby (and other dynamic languages), please see the tutorial I've put
together at http://www.tkdocs.com

Mark

thunk schrieb:

Hi all,

My story is that I had a GUI project that had to get done in a hurry
for a presentation and for a number of reasons I got started using Tk
version 8.4.19 that works well (for me) with Ruby1.9 (so far).

After spending about a week ( not all of it entirely rewarding :frowning: ) I
actually starting "liking" the package after a built a couple of quasi
wrapper classes and I found some useful documentation sources.

Now I have spent several additional weeks with other parts of the
project in the foreground but I keep updating the GUI. I am actually
liking things more and more as I am getting comfortable the various
issues.

HOWEVER, IN THE LONG RUN - maybe 6 months - this App (probably) needs
to be BROWSER based. There seems to be a decent chance that Tk 8.4
will let me get a nice working design done (based on sockets) and that
we could contract with a Programmer to convert the DeskTop App to a
Web App.

I say "probably" because ActiveState, the company that sells the Tcl
Dev Kit" for all OS of direct concern now has a number of products
some of which seem to be set to work with Ruby. (Also the initial
intended audience is small - so distributing a truly stable/multi-os/
multi everything desktop pkg seems like an OK idea - IF it really
works without issues.)

So there are just a bunch of questions here:

1. Is Tk version 8.4.19 considered "ancient history" these days and
generally only a few folks using it - or is it considered "ok" to use
for putting a GUI together?

2. Is the TclDevKit gaining any "favor" in the Ruby community, are
"many" folks using it? / is it considered something like "state-of-the-
art" and/or "Clean" compared to the 8.4 stuff?

Any thoughts on this issue of "mocking up forms in 'DeskTop' mode" to
bet moved to an eventual Browser App with minimal effort will be
greatly appreciated.

[snip]

Tk 8.5 added:
1. An additional themed toolkit ttk,
2. Anti-aliased fonts using freetype under X11,
3. Redesigns of radiobutton, checkbutton, menubutton following
the windows95 design under X11.
4. An objectified command interface.
5. A major Tk-carbon overhaul under OSX.

1. ttk was also available for tk8.4, but is possibly now
    deprecated for 8.4.
    From Ruby/Tk: You will need to have ttk wrappers for ruby
    in order to use it or ...

    In Tcl:

    add export commands to the ttk namespace and overwrite
    the global tk commands with their ttk counterparts.

    namespace eval ttk {
     namespace export button
    }

    # Replace (enforce) tk::button with ttk::button
    catch {
      namespace import -force ttk::button
    }

    This allows you to reuse the Ruby/Tk interface with ttk,
    however ...

4. The objectified command interface is major a performance
    improvment, when you did code the interface the wrong way:

     In Tcl:

     button .b -text mytext -background red ...
     ... will be faster with Tk 8.5 than Tk 8.4!

      option add *b.text mytext
      option add *b.background red
      option add *b....

      button .b
      ... will be faster than the first example
      under Tk 8.4 and Tk 8.5.

      ... which brings me back to however from 1.:
      ttk and tk are incompatible; more specificly
      ttk and tk button have different properties.
      When following the import example from 1. than all the
      different properties between ttk and tk have to be
      channeld-through the option database.
      Which incidentally makes the interface faster.

5. Apple ditched carbon, there is a shiny new implementation
    of tk under AQUA using the COCOA interface. This new
    port is part of Tk 8.6.

3. Sucks! The Windows95 design ins't acceptable under any circumstances,
    not even under Windows, it was rightly disbanded by Microsoft.

Which way do you intend to go browser-wise?
I am on the SVG-track, my own tool Jeszra converts
a full tk-gui into a SVG graphic. Currently, the
generated SVG is inert, since I only use it inside
the documentation.

There is a lot of work in the SVG/browser field,
Microsoft and Google are currently working on
hardware accelerated SVG, while Apple already has
it (inside IOS and OSX). A special variation of
SVG is used by RIM in their BlackBerry platform
for GUI development, too.

You can see another benefit from SVG, by
visiting the jeszra website with Internet Explorer < 9,
then the SVG is on-demand translated(javascript)
into a flash animation.

-roger

···

--
http:://jeszra.sourceforge.net/jeszra