Does Ruby generate WINDOWS and dialog boxes?

I just heard about Ruby and it looks fascinating. I see lots of code
being
discussed but I see no mention of the actual windows and input/output
boxes/windows which it may or may not produce.

Does it make windows?


http://www.sticksite.com/ Ken Laninga

Ken Laninga wrote:

I just heard about Ruby and it looks fascinating. I see lots of code being
discussed but I see no mention of the actual windows and input/output
boxes/windows which it may or may not produce.

Does it make windows?

Oi, this might get bloody.

Firstly, not all programming involves graphical user interfaces (windows
/ dialogs; I’ll just use GUI onwards).

But, here goes. For Ruby (and most anything that isn’t Visual Basic),
GUI is a thing that is handled in a library. (Mostly because Ruby aims
to be a crossplatform language, and trying to handle GUIs crossplatform
is finicky and would probably end in tragedy if tried.)

As far as I’m aware, Ruby doesn’t include a GUI library in the standard
library.

However, such libraries are available. I’ll audaciously presume your
background to be Windows. In this case, you can either do raw Win32 API
callouts (even if it might be slightly maddening.), which is part of the
standard Windows distribution.

Also, if you’re using the One Click Installer (which you should, since
it’s by far the Path Least Annoying), you will get both VisualuRuby (a
Windows-only higher-level wrapper around the GUI calls, aims to look
VB-like from the programming point of view in the vruby variant), and
FOX (a synthethic crossplatform toolkit with probably more bells and
whistles than VisualuRuby, but you have to bear with what I consider
ugly-looking results - YMMV).

If those don’t work for you, there’s always Gtk, so far the only GUI
library I can recall that comes with prebuilt Windows bindings mature
enough I would consider usable outside personal code. Gtk visual quality
and native veracity has improved from a sorry status recently, but is
still lacking in a few areas if you have pet peeves. (Like I do,
specifically non-native file choosers.) I do have hopes for the
wxWidgets binding maturing, and a prebuilt Qt4 one appearing though,
those two toolkits are the ones I prefer - wx for nigh-on-perfect native
veracity, Qt4 for Designer, Linguist, Assistant, and the whole shebang,
and the API style. (Which is very friendly to metaprogramming.) I
currently use the latter from its Python binding (both wx and Qt4 have
well-maintained and uptodate Python bindings), so if you want to get
something done, as opposed to poking around specifically Ruby, you might
try The Other Language.

David V.

David V. wrote:

As far as I’m aware, Ruby doesn’t include a GUI library in the standard
library.

Tk is in the standard library. Don’t laugh, it can be useful! :slight_smile:

I’m using the Tk canvas for some easy-to-set-up animations that don’t
really need opengl.

Joel VanderWerf wrote:

David V. wrote:

As far as I’m aware, Ruby doesn’t include a GUI library in the standard
library.

Tk is in the standard library. Don’t laugh, it can be useful! :slight_smile:

Wooer. I subconsciously ignore Tk by now. Go me. Or something.
/me puts on a dunce hat.

David V.

Joel VanderWerf wrote:

David V. wrote:

As far as I’m aware, Ruby doesn’t include a GUI library in the standard
library.

Tk is in the standard library. Don’t laugh, it can be useful! :slight_smile:

I’m using the Tk canvas for some easy-to-set-up animations that don’t
really need opengl.

Tk is wonderful! It’s really simple to manipulate widgets and graphics
in the way you’d expect. IMHO, Tk is the Ruby of GUI toolkits.

I don’t know why people hate it so much. They seem to prefer “desktop
integration” and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

Ken Laninga wrote:

http://www.sticksite.com/ Ken Laninga
I’m planning to implement desk-top applications the same way I’m
implementing websites: use Ruby on Rails. That gives me essentially
one cross-platform application environment. Is there something wrong
with that plan?


Richard

Richard wrote:


http://www.sticksite.com/ Ken Laninga

I’m planning to implement desk-top applications the same way I’m
implementing websites: use Ruby on Rails. That gives me essentially
one cross-platform application environment. Is there something wrong
with that plan?

Richard

How would that be a desktop application?

Or, in slightly other words, do you have an architecture to go with that
plan?

David V.

Suraj K. wrote:

I don’t know why people hate it so much. They seem to prefer “desktop
integration” and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

Some of us have to “sell” software, at least to managers - then it
matters.

[Hide the women, children and livestock. This just got bloody as I
predicted.]

Also, you’re missing the point. It’s a GUI, noone really gives a damn if
the programmer had an easier time coding it if there’s hundreds of users
that will feel constantly alienated by it because of some detail the
programmer didn’t feel like bothering with.

User interface design isn’t the same as programming a user interface.
Programmers, especially the lazy sort, tend to suck, suck-oh-so-horribly
at user interface design. Approaching user interface design with a
programmer’s mindset can only end in pain, tragedy, and Tk.

Also, you’re confusing internal UI consistency, and external UI
consistency. Internal UI consistency is when the features of the UI fit
together to make working with the software alone productive (your clean
and functional).

External consistency is when the UI incorporates features that make
working with that software in connection with other software on the
computer productive. This means panels will scroll when the mouse is
over them and won’t require clicking on the buttons. This means that the
file chooser, on XP, will have a “My Documents” button as the third one
in a button sidepanel on the left. (I can’t describe the rage I feel
when a toolkit opens a file chooser that doesn’t even try to look alike
and leaves me flailing about trying to find my way back home.) I’ve seen
Tk interfaces fail at all the above when they’re capabilities the damn
system below them gets right out of the box, and I’ve no doubt that’s
barely the tip of the iceberg.

Both internal and external consistency are, for pretty much most
applications, factors that contribute to productivity. Having an
externally consistent program in no way excludes it being internally
consistent, so no point in setting up that straw man.

Any GUI toolkit will let you achieve internal consistency, and getting
really good usability from a GUI is 1% toolkit choice, 99% blood and
sweat. (My favourite GUI programs in terms of UI usability, and
consequently the ones I use most are firstly Opera, written in nothing
publically known for Windows, Qt3 for Linux, and IntelliJ IDEA, based on
the by-default-horrid Swing it makes sing and dance.) However, the
mindset of most Tk users seems to be to fight achieving external
consistency kicking and screaming and inventing nonarguments to prove
such patent nonsense as external consistence being undesirable. (That’s
usually laziness, youthful zealotry, incompetence, or short time budget
speaking. Prove me wrong.)

Also, to set you right. People, or at least I (the only part of “people”
I can confidently speak for - for what part were you speaking and with
how much confidence when you used the words “people” and “they” again? -
obviously not yourself), don’t just prefer eye candy. I want usable
interfaces that do what I need, do what I want, and do even what I
didn’t know I wanted, and pay close attention now, that also look
good, look native-or-better (Java 6 giving me subpixel font AA on
Windows 2000 machines at work or under uncooperative Linux window
managers), act native-or-better (cf. some Windows programs that emulate
“scroll widget under cursor”). Both. And. No. Less. I am willing to and
have paid money to get that, and when forced to make a choice, there
will be something pissing me off with either alternative making me
wrestle lossage of some sort.

(PS: Just writing desktop integration in quotes doesn’t make it of no
value. Refer to the missing the point by leagues bit above.)

Oh, and to make my position fully clear, I do hate Tk as a programmer
too. I find Qt linearly superior because of the object-oriented design,
MVC support, and the mixin architecture for separating UI and controller
logic, and QMetaObject::connectSlotsByName very reliably killing event
handler wireup boilerplate. And who really cares how you lay out the
widgets when there’s Designer (the form designer that made me stop
hating form designers) to do that. Oh, and even with those features,
it’s probably faster than Tk.

Tk isn’t hardly the Ruby of GUI toolkits, with the massive advocating of
/ tolerance to mediocrity of results, it’s the PHP of GUI toolkits.

David V.
No Way Someone Reads This Whole

Quoting Suraj K. [email protected]:

Tk is wonderful! It’s really simple to manipulate widgets and graphics
in the way you’d expect. IMHO, Tk is the Ruby of GUI toolkits.

I don’t know why people hate it so much. They seem to prefer “desktop
integration” and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:
I don’t actually hate Tk – I just never learned how to use it, and I
think
its widgets are ugly relative to, say, Qt. Now Tcl, on the other hand –
that I
do hate. :slight_smile: It was the first scripting language, but I find Tcl code
virtually unreadable.

From: David V. [mailto:[email protected]]
Sent: Sunday, December 17, 2006 5:56 AM

Also, you’re missing the point. It’s a GUI, noone really gives a damn if
the programmer had an easier time coding it if there’s hundreds of users
that will feel constantly alienated by it because of some detail the
programmer didn’t feel like bothering with.

[…]

David V.
No Way Someone Reads This Whole

I had. And it was good words. Really worth to be remembered and quoted.

(I’ve been freelance UI designer and usability consultant during several
years, so I somewhat know, what it all about.)

V.

David V. wrote:

How would that be a desktop application?

To us programmers it would be a web app with a local server, but to
the user it would be indistinguishable from, say, an application built
with Visual C++ and Microsoft Foundation Classes running on a Windows
OS.

Does that make sense to you?


Richard

On Sun, 2006-17-12 at 12:56 +0900, David V. wrote:

No Way Someone Reads This Whole

I did. And applauded most of the way through it. Programmers have a
very annoying habit of not only disregarding the end-users but, indeed,
actively sneering at them. This is why software sucks almost, but not
quite, universally.


Michael T. Richter
Email: [email protected], [email protected]
MSN: [email protected], [email protected]; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
[email protected]

“My paramount object in this struggle is to save the Union, and is not
either to save or to destroy slavery.” --Abraham Lincoln

On Sun, 2006-17-12 at 10:09 +0900, Suraj K. wrote:

Tk is wonderful! It’s really simple to manipulate widgets and graphics
in the way you’d expect. IMHO, Tk is the Ruby of GUI toolkits.

I’m with David here. Tk isn’t the Ruby of GUI toolkits. But I diverge
sharply from him after that. He says it’s the PHP of GUI toolkits. I
say it’s the GWBASIC of them.

Tk-based GUIs are typically so fscking useless that I’d rather use the
CLI and ed over an app coded in Tk.

I don’t know why people hate it so much. They seem to prefer “desktop
integration” and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

You may want to do some reading before you embarrass yourself further.
Start with The Rise of Worse is Better
(The Rise of ``Worse is Better''). Then pick up a book on
good UI design. Almost any book written on the topic in, say, the past
20 years will open your eyes to just how much effort and thought goes
into a good user interface, GUI or otherwise. (Here’s a hint: the vast
majority of user interfaces suck bowling balls through garden hoses.)


Michael T. Richter
Email: [email protected], [email protected]
MSN: [email protected], [email protected]; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
[email protected]

“My paramount object in this struggle is to save the Union, and is not
either to save or to destroy slavery.” --Abraham Lincoln

David V. wrote:

Suraj K. wrote:

I don’t know why people hate it so much. They seem to prefer “desktop
integration” and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

Some of us have to “sell” software, at least to managers - then it
matters.

Bingo! That’s where we differ. I don’t sell software so I haven’t had to
deal with market pressures and bosses and customers, etc. Thus, my claim
might have more merit when viewed in the interest of programmer
productivity/laziness.

Also, you’re missing the point. It’s a GUI, noone really gives a damn if
the programmer had an easier time coding it if there’s hundreds of users
that will feel constantly alienated by it because of some detail the
programmer didn’t feel like bothering with.

Alas, what a world we live in. The same goes for movies where the stars
and director get a substantial chunk of the publicity/credit while the
back-end sound engineer is largely ignored.

[…]

Approaching user interface design with a
programmer’s mindset can only end in pain, tragedy, and Tk.

LOL good one. :slight_smile:

Also, you’re confusing internal UI consistency, and external UI
consistency. Internal UI consistency is when the features of the UI fit
together to make working with the software alone productive (your clean
and functional).

Interesting.

External consistency is when the UI incorporates features that make
working with that software in connection with other software on the
computer productive. This means panels will scroll when the mouse is
over them and won’t require clicking on the buttons. This means that the
file chooser, on XP, will have a “My Documents” button as the third one
in a button sidepanel on the left.

I don’t use windows, so I’m quite satisfied with Tk’s horrendous
appearance and its lack of integration with “My documents”.
Nevertheless, I can understand your point of view and I do sympathize.

[…]

However, the
mindset of most Tk users seems to be to fight achieving external
consistency kicking and screaming and inventing nonarguments to prove
such patent nonsense as external consistence being undesirable.
(That’s usually laziness, youthful zealotry,

Alright, you’ve caught me there :slight_smile:

Also, to set you right. People, or at least I (the only part of “people”
I can confidently speak for - for what part were you speaking and with
how much confidence when you used the words “people” and “they” again? -
obviously not yourself)

I do so with the confidence of uncertainty (probability = 0.5). When one
does not know the world, one naturally assumes the world is like one’s
self. Alas, I am but a frog in a well.

[…]

David V.
No Way Someone Reads This Whole

Thanks for the lesson.

Michael T. Richter wrote:

On Sun, 2006-17-12 at 10:09 +0900, Suraj K. wrote:

Tk is wonderful! It’s really simple to manipulate widgets and graphics
in the way you’d expect. IMHO, Tk is the Ruby of GUI toolkits.

I’m with David here. Tk isn’t the Ruby of GUI toolkits. But I diverge
sharply from him after that. He says it’s the PHP of GUI toolkits. I
say it’s the GWBASIC of them.

Tk-based GUIs are typically so fscking useless that I’d rather use the
CLI and ed over an app coded in Tk.

I don’t know why people hate it so much. They seem to prefer “desktop
integration” and eye-candy instead of clean, functional interfaces.
Sigh. :frowning:

You may want to do some reading before you embarrass yourself further.

Why should I fear embarrassing or otherwise making an ass out of myself?
Such fear would prevent me from learning and keep me ignorant forever.

Start with The Rise of Worse is Better
(The Rise of ``Worse is Better''). Then pick up a book on
good UI design. Almost any book written on the topic in, say, the past
20 years will open your eyes to just how much effort and thought goes
into a good user interface, GUI or otherwise. (Here’s a hint: the vast
majority of user interfaces suck bowling balls through garden hoses.)

Thanks for the link and suggestions.

On Sun, 2006-17-12 at 14:16 +0900, Suraj K. wrote:

You may want to do some reading before you embarrass yourself further.

Why should I fear embarrassing or otherwise making an ass out of myself?
Such fear would prevent me from learning and keep me ignorant forever.

That is both an interesting and a refreshing attitude. However there is
a key word you missed above: “further”.

Being afraid of initial embarrassment is silly. Mistakes are a part of
life and ignorance is the default condition. (I’d even, in my more
cynical moments, extend “ignorance” to “stupidity” in the previous
sentence – yes, self included.) What you should be afraid of is
repeated embarrassment: embarrassment on the same (or similar) points.

Being initially embarrassed is a sign of learning. Being further
embarrassed on the same topic is a sign of not learning. See what I
mean?

Start with The Rise of Worse is Better
(The Rise of ``Worse is Better''). Then pick up a book on
good UI design. Almost any book written on the topic in, say, the past
20 years will open your eyes to just how much effort and thought goes
into a good user interface, GUI or otherwise. (Here’s a hint: the vast
majority of user interfaces suck bowling balls through garden hoses.)

Thanks for the link and suggestions.

Thanks for the refreshing outlook. Usually people who talk about how
“tool is great and people who don’t like it Just Don’t Get It”
aren’t so open-minded. If you want to take this off-list, I might even
be able to direct you to some decent books on HUI design (or at least
some web pages with decent information).


Michael T. Richter
Email: [email protected], [email protected]
MSN: [email protected], [email protected]; YIM:
michael_richter_1966; AIM: YanJiahua1966; ICQ: 241960658; Jabber:
[email protected]

“[Blacks] … are inferior to the whites in the endowments both of body
and mind.” --Thomas Jefferson

Michael T. Richter wrote:

Being initially embarrassed is a sign of learning. Being further
embarrassed on the same topic is a sign of not learning. See what I
mean?

Understood.

Start with The Rise of Worse is Better
(The Rise of ``Worse is Better'').

I strive to be in the worse-is-better camp. :slight_smile:

Then pick up a book on

good UI design. Almost any book written on the topic in, say, the past
20 years will open your eyes to just how much effort and thought goes
into a good user interface, GUI or otherwise. (Here’s a hint: the vast
majority of user interfaces suck bowling balls through garden hoses.)

Agreed. I’m familiar with a bit of Jakob Nielsen’s work and Marc
Rettig’s wonderful “paper prototyping” technique – but that’s about it.

If you want to take this off-list, I might even
be able to direct you to some decent books on HUI design (or at least
some web pages with decent information).

If you don’t mind, please post the web resources here, so that we may
all benefit from your guidance.

Thanks for your consideration.

Richard wrote:

David V. wrote:

How would that be a desktop application?

To us programmers it would be a web app with a local server, but to
the user it would be indistinguishable from, say, an application built
with Visual C++ and Microsoft Foundation Classes running on a Windows
OS.

Now -that- I want to see. Really. Odds are it Just Won’t unless you only
render in IE with high security privileges and abuse ActiveX with
reckless abandon.

Does that make sense to you?

As I’m generally not a fan of the heinous crimes commited in the name of
Ajax, I’d have to see the result for that to happen. Most of the
in-browser desktop mockups make me ask why not use Java Web Start /
ClickOnce / Flex anyway? DHTML still doesn’t work fully reliably even
amongst standards-compliant browsers due to the W3C being too busy
reinventing the world in angle brackets and trying to force the shiny
markup language of the day down the throats of the whole ten people that
understand and need it instead of properly addressing Ajax (that
undoubtedly impacts more web users right now than the joke that is
XForms). And the dependencies for the above technologies aren’t rocket
science to fullfill.

David V.

Har!

A better reaction than I expected. And a better reaction than mine would
have been at that time of day too. Thanks for seeing through the flames,
and yes, for personal code, all technology calls are off by default.

David V.

Suraj K. wrote:

deal with market pressures and bosses and customers, etc. Thus, my claim
might have more merit when viewed in the interest of programmer
productivity/laziness.

I write most of my software for myself, and I’m fantastically lazy (to
point of borderline clinical death), but I’m with David. Tk hurts my
eyes. It annoys me in subtle ways that, over time, crawl under my skin
and gnaw at my tendons and bones. Ow!

Looks matter.


James B.

“Inside every large system there’s a small system trying to get out”.
- Chet Hendrickson