Is GUI a weak point?

On Apr 5, 2006, at 9:32 AM, [email protected] wrote:

Mac support only with X11. Gah.

Only use if you want Mac users to hate you. Really hate you.

Martin

Some of us will merely be mildly disappointed.

On 4/5/06, Chris A. [email protected] wrote:

  1. If it’s simple, use Tk. Tk has major limitations and is totally
    unsuited for complicated modern interfaces. That being said, it is
    excellent for simple interfaces and is the closest thing to a cross
    platform toolkit we have. I’ve been using Tk with various languages
    for over a decade now and have managed to build some rather
    complicated GUIs/programs with it. For simple GUIs and rapid
    prototyping it has been a joy; for serious GUI work, a nightmare.

Isn’t this what Tk Tile (Tile: an improved themeing engine for Tk) is
supposed to address? Look at the Windows XP and Mac OS X screenshots
at this web site. Also see
http://www.ruby-doc.org/stdlib/libdoc/tk/rdoc/classes/Tk/Tile.html for
documentation on using this from Ruby. I haven’t tried it yet. If you
have, I’d love to hear your feedback on it.

For example, the tk toolkit only provides very primitive ways of
arranging elements. I am not sure if the ruby library provides some
more complex layouts. But with tk alone it may be quite hard to
create a dialog with different kinds of elements that won’t make the
users run away :slight_smile:

Layout options in Tk and most GUI toolkits are much less primitive
than HTML layout.

BTW, I’m now working on Ruby wrapper for great HTMLayout library
(HTMLayout – Terra Informatica Software).

HTMLayout is html-based layouting engine, which has standard-simple
widgets
(edit, checkbox, combod…) and allows to create new widgets in plain
HTML.
The engine is small and fast and doesn’t relies on IE, or Gecko, or
something else. As for now, it is working on Windows only (Mac planned,
*nix
questionnable) and is free for non-commercial use.

I am planning to publish my Ruby wrapper for HTMLayout (wrapper is
codenamed
HTMR) on rubyforge IF there would be interest to such project.

R. Mark V.
Object Computing, Inc.

Victor.

Where can I find examples and sample codes of web interface GUI
programming
in Ruby?

Thank you

Victor

I didn’t mean to start a flamewar either or, for that matter, bash
Java. I apologize if I came across as a Java hater.

I don’t mean to say that Java has no good qualities or that it’s GUI
support is universally bad. But I do not believe it is the cross
platform solution it was intended to be. Maybe my opinion is
malformed (I am competent in Java but hardly an expert) or my view of
the intentions/hype inaccurate.

My main complaint with Java is the difficulties I’ve run into in
porting Java applications to various platforms. I’ve spent to much
time fighting with odd javac errors or even getting the JRE or JDK to
compile, or not core dump. Whereas I have never had these problems
with, for example, Tk.

I’m also not fond of the Java GUI ergonomics but then I’m not really
happy with any of the toolkits ergonomics.

Java does have things it does well. Also, very importantly, it
generated a lot of thought and activity in cross platform languages
and GUI toolkits. Tk has strengths and weaknesses too.

No one is intending a flame war but I have seen java do a lot of good
thick client work and I have had it running (with speed) on linux,
windows and osx. This includes swing and SWT. I’m not saying that java
is great but I am saying that the ideas that they have work really
well for certian situations.

A lot of applications can be done in a webapp and webapps are great
for situations where you wish to deploy the applications easily and
you are trying to capture data from the user. They are even getting
better with respect to text editors, etc. But, I have worked in
consulting for a few years now and I see that ruby is losing a lot of
developers to .NET because of its gui support, even though the ruby
language is far superior. .NET has a single toolkit for gui
development that isn’t really that good but it is documented and
supported. I believe that ruby could benefit from a well documented
and usable gui toolkit or abstract layer.

If this was inplace then ruby would be stronger as a complete platform
for application development and maybe more companies would start to
use it for all of their development.

Chris A. wrote:

[snip]

  1. Pick whichever of the alternatives (see the rest of the thread) you
    think will suceed in the future and hope you’re right. There is a
    definite need for a crossplatform GUI toolkit; Tk is no longer
    fulfilling that need, Java never did,

I love ruby, but I also utilize Java for thick client applications. It’s
cross platform GUI capabilities have allowed our developers to develop
on multiple OSes. It has worked great for our client applications which
involve alot of 2D rendering. So what do you mean, “java” never
fulfilled the need? For RTS or heavy 3D I can agree with you it’s not
the best, but for most business applications it’s crossplatform GUI is
pretty good.

I am not looking to start flamewar on java. I just don’t think java is
bad in all aspects, and it’s crossplatform GUI toolkit (yes even swing)
is not so bad.

Zach

From: “Chris A.” [email protected]
Subject: Re: is GUI a weak point?
Date: Thu, 6 Apr 2006 03:58:04 +0900
Message-ID: [email protected]

Java does have things it does well. Also, very importantly, it
generated a lot of thought and activity in cross platform languages
and GUI toolkits. Tk has strengths and weaknesses too.

Maybe, in near future, Ruby/Tk applications will be able to be
exported to the Net.
I’m working on Ruby/TkORCA (Ruby/Tk on RFB canvas) which is a
framework to do that (see [ruby-talk:160371]).
One of the documents about that is
http://www.dumbo.ai.kyutech.ac.jp/~nagai/learn-ruby-in-kansai-20060128.pdf.
It is written in Japanese.
But some figures on it may help you to understand its concept.

The running demo on the site described in [ruby-talk:160371] is
still based on very old version of sources.
Current version on my environment for development can resize windows
of a daughter which is a sandbox to destribute an application
(the application is quite same as the one running on the local
windowing system).
If you want to deny a daughter to call some methods (e.g. ‘load’
method), you can do it by calling
“TkORCA::MethodWrapper.deny_daughter_to_function(‘load’)”
on the mother which is a observer/controller of daughters.
You can do also for class/module or instance methods by similar ways.
If you want to control a method-call instead of denying,
you can do that, for example,

TkORCA::MethodWrapper.wrap_function(‘load’){|orig_m, *args|
file, wrap = args
unless TkORCA.is_mother? {
# check the file path
}
orig_m.call(file, wrap)
}

Of course, daughters cannot call such methods for definition.

Well, why should be Ruby/Tk?
The reason is “(Only?) Ruby/Tk has nessesary functions to implement
such features”.

To implement a mother and daughters, a process must have some
independent widget sets.
One is widgets for implementing a kind of window-manager (for a
mother), and each of others is widgets for each daughter.
For security reason, even if a daughter succeeds to get a widget
object belongs to the window-manager, the framework is required to
disallow the daugher to control the widget.
And the framework must be able to decide to create a widget for which
widget set depend on the context of the script, bacause the framework
must load a GUI script (of course, it is a standalone script which can
run on the local) into a daughter.

Ruby/Tk can do them.

On 5 Apr 2006, at 17:49, Logan C. wrote:

On Apr 5, 2006, at 9:32 AM, [email protected] wrote:

Mac support only with X11. Gah.

Only use if you want Mac users to hate you. Really hate you.

Martin

Some of us will merely be mildly disappointed.

I dunno. Whenever I see X11.app spring to life, I think the Universe
has failed me.

Martin

On 5 Apr 2006, at 22:06, Carl W. wrote:

No one is intending a flame war but I have seen java do a lot of good
thick client work and I have had it running (with speed) on linux,
windows and osx. This includes swing and SWT. I’m not saying that java
is great but I am saying that the ideas that they have work really
well for certian situations.

Ah, me to. But my point is, that even when you use SWT, a supposedly
cross-platform toolkit, you still end up having to support 3+
similar, but slightly different GUI codebases and polish each one to
the expecations of users for Linux/Mac/Windows.

It’s a lot of work; the notion of a cross-platform gui is something
of a myth.

In Rubyland, wxRuby Å SWT.

Martin

You are right for sure, but why limit this to ruby, should we not
at this
point in time foresee the need of something more abstract.

This has already happened at least three times in XML; Mozilla’s XUL,
GNOME’s libglade and Microsoft’s XAML.

Take your pick.

Martin

On 4/5/06, Carl W. [email protected] wrote:
[…]

No one is intending a flame war but I have seen java do a lot of good

developers to .NET because of its gui support, even though the ruby
language is far superior. .NET has a single toolkit for gui
development that isn’t really that good but it is documented and
supported. I believe that ruby could benefit from a well documented
and usable gui toolkit or abstract layer.

You are right for sure, but why limit this to ruby, should we not at
this
point in time foresee the need of something more abstract.
I feel quite stupid writing this because I have so little GUI
experience,
but it strikes me very very clearly that I share the disgust for GUI
developping because it is sooo difficult.

For me it seems that what is needed is an Open GUI specification, way
on
top of GTK, KDE or whatever graphical interface.
If that could be done in a decent way ( sooo easy to say, sooo difficult
to
do) the rest would spring into life automatically.
Ruby, Python, Objective C, Perl6 (yes I know it is dead, but I am an
optimist) and all the other marvellous languages will implement it.

Such a beast could be inspired by things we might have learnt by SWING,
CSS,
Tk and so on.
It could defenitely be inspired by the already existing graphical
layers.
It will be crucial to be “pragmatic”.

Please do not forget that we are still in the Stone Age of Computers,
like
in the old times of industry revolution, when each manufacturer created
his
own screws and you needed his own screwdrivers. (Dunno why I am suddenly
thinking about proprietary SW and protocols :wink:

If this was inplace then ruby would be stronger as a complete platform

for application development and maybe more companies would start to
use it for all of their development.

It would, but I think our community (and no single language community
for
that matter) is not strong enough to pull that off alone, but please
make me
mistaken!

[…]
Just some thaughts

Robert


Deux choses sont infinies : l’univers et la bêtise humaine ; en ce qui
concerne l’univers, je n’en ai pas acquis la certitude absolue.

  • Albert Einstein

On 4/6/06, Carl W. [email protected] wrote:

that works using either of the prevailing graphical interfaces.
Working with Freedesktop.org on unifying interface issues, they plan
to release a beta version of the software in May and version 1.0 in
June. Ultimately, advocates hope that it will be part of a larger but
separate effort called Linux Standard Base, which is designed to make
the operating system easier for software companies to use."

Of course somebody else has thaught about this before me, shame ;).
Thank
you for the link it seems very interesting indeed.

I thaught something more general might be needed, more clearly
abstracting
from the lower levels.

On the other hand it will be crucial to get it working soon, so I am
probably wrong!
And I have not studied this enough anyway to make stupid statements
(well it
has some rewards of its own to make stupid statements, it gets you
smarter
when reading the replies).

Does anyone think that this direction is relavent for ruby?

Well I am not qualified to answer this question :(. But if it evolves
into a
standard it will be, don’t you think?

Carl W.
0412218979
[email protected]

Cheers
Robert


Deux choses sont infinies : l’univers et la bêtise humaine ; en ce qui
concerne l’univers, je n’en ai pas acquis la certitude absolue.

  • Albert Einstein

Not sure if anyone saw this today on slashdot:

OSDL to Bridge GNOME and KDE

“Open Source Development Labs is previewing work that will attempt to
make life easier for software companies by bridging GNOME and KDE. The
effort, called Portland Project, began showing its first software
tools on in conjunction with this week’s LinuxWorld Conference & Expo.
Using them, a software company can write a single software package
that works using either of the prevailing graphical interfaces.
Working with Freedesktop.org on unifying interface issues, they plan
to release a beta version of the software in May and version 1.0 in
June. Ultimately, advocates hope that it will be part of a larger but
separate effort called Linux Standard Base, which is designed to make
the operating system easier for software companies to use.”

Does anyone think that this direction is relavent for ruby?

Chris A. wrote:

It’s not so much that X11 is bad; it’s good to have it available and
actually does a good job of running X11 concurrently with OS X. But
it’s just so disappointing. Besides the memory/CPU cost/startup time
it emphasises that this is a limited port of an application written
for another architecture. Although this applications work fine under
X11.app the keys are different (than actual OS X apps), the appearance
is different, the focus model may not be what they expect…

I see. I’ve only tried it on Windows and, bar a few quirks, it’s quite
good - a million times better than Tk on Windows at least. Take, for
example, the list box. Under Ruby/Tk, the list box is essentially a
text box with a list of items - one per line, and clicking a line
selects that whole line. You can’t tap a key to go to an item beginning
with that letter (you can in FxRuby), and scollbars have to be manually
attached to a host control. But, oh, they can’t just be connected, no,
that would be too simple. They have to be put on the form as a seperate
control. But then you have to think about how that scrollbar docks to
the side of the listbox, so a frame is needed to make sure the controls
line up correctly, and then you have to tell it to act as a scrollbar
for the listbox, and also tell it to change the size of the thumb based
on the contents of the listbox.

I didn’t even attempt to build a tree. I ported my Rake dependency tool
to FxRuby, and found it ridiculously easy to build a dialog with a
couple of trees which do the job of the Tk version far better. It has a
file browse dialog (which the Tk version didn’t) to load the rakefile,
and even a search capability.

And not to mention the fact that it just looks better - it looks more
like a Windows app, which is good on Windows.

Martin C. wrote:

I dunno. Whenever I see X11.app spring to life, I think the Universe
has failed me.

Martin

Wow… Guess you really don’t like X11.

Currently, all our stuff is Windows-only internal tools for project
development (in fact, the only GUI thing I’ve done in Ruby so far is a
tool to show Rake dependencies).

However, if I do any cross-platform stuff that might be used on a Mac,
I’ll definitely make sure I look at something other than FOX.

It’s not so much that X11 is bad; it’s good to have it available and
actually does a good job of running X11 concurrently with OS X. But
it’s just so disappointing. Besides the memory/CPU cost/startup time
it emphasises that this is a limited port of an application written
for another architecture. Although this applications work fine under
X11.app the keys are different (than actual OS X apps), the appearance
is different, the focus model may not be what they expect…

On Wed, 5 Apr 2006 23:54:26 +0900, you wrote:

Tk has major limitations and is totally
unsuited for complicated modern interfaces.

I’ve been using Tk with various languages
for over a decade now and have managed to build some rather
complicated GUIs/programs with it.

for serious GUI work, a nightmare.

ok, for those of us keeping score at home, which is it? :slight_smile:

assuming tcl/tk what was missing in the gui ap that you couldn’t find
an extension for?

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

Yes, Fox has a lot of very nice features and I’m keeping a very
interested eye on it. It is unfortunate that it currently does not
run natively (without X11) on OS X. If it did I would be using it and
not Ruby/Tk.

In defense of Tk, I gather from your comments that you arae using the
core Tk. This provides fairly low level widget primitives. There are
plenty of packages (many of whicih exist for Ruby/Tk) which provide
higher level widgets such as superior list boxes, trees, etc. For
example BLT, Iwidgets, Bwidgets, … I view Tk as a lower level
toolkit than Fox and others, just as X11 is an even lower level
toolkit below Tk.

As I’ve written before I believe that Tk is not good for building
modern GUIs. But when I say this I am not speaking of the widget set.
I’m speaking of lacking core concepts. Tk requires a root toplevel
to exist at all times: if you withdraw it it vanishes from the screen
but now, if you have no other toplevels, keyboard events don’t
register; it has limited ability for a “first responder” type of
behavior; etc.

On 4/7/06, tony summerfelt [email protected] wrote:

ok, for those of us keeping score at home, which is it? :slight_smile:

They are not mutually exclusive. Tk is a nightmare for serious GUI
work and I have dealt with that nightmare and done serious GUI work in
Tk. It’s not much of a nightmare if you wake up as soon as it starts
=)

assuming tcl/tk what was missing in the gui ap that you couldn’t find
an extension for?

I don’t understand the question.

c.