GUIs - A Modest Proposal

lkcl luke.leighton at gmail.com
Sun Jun 13 07:20:32 EDT 2010


On Jun 13, 3:34 am, Gregory Ewing <greg.ew... at canterbury.ac.nz> wrote:
> lkcl wrote:
> >  * in neither gtk nor qt does there exist an "auto-layout" widget
> > that's equivalent to putting some <span /> DOM objects into a <div />,
> > to "flow" widgets that wrap around.
>
> You essentially seem to be complaining here that pqyqt and
> pygtk are not HTML.

 no, i'm not complaining - i'm pointing out that in my meandering
experiences to pick suitable technology, i found, very simply, that
both pyqt and pygtk didn't cut it.  that's not a "complaint".  so i'm
stating/implying that from the experience that i had with both
toolkits, pyqt and pygtk were not as easy to create layouts or widgets
with (but caveat: jeremy kindly points out that in pyqt there is
examples/layouts/flowlayout.py)

 another way to put that: i'm stating that, in my search for suitable
technology to implement W3C-standards-like behaviour, such that i
could map an existing widget set API on top of it, i found both pygtk
and pyqt4's "bang per buck" as far as both extensibility and existing
functionality was concerned to be below an acceptable threshold *for
me*.

 statement of "personal experience". not "complaint".

> They have their own auto-layout mechanisms
> that do what they're designed to do well enough -- they just
> happen to be based on a different model from HTML.

 one which turns out to be sufficiently different from HTML as to make
it beyond my time and patience to implement one in terms of the
other.  again - that's not a "complaint", just a statement that i
prefer to leverage technologies where the "bang per buck" or better
"bang per line-of-code" is way above average.


> I'm far from convinced that HTML and CSS are the One True Way
> to design GUIs these days,

 if you have "HTML the fileformat" and "CSS the fileformat" in mind
when saying that, i can tell you right now that they're not.
fortunately, with the W3C DOM functions exposing properties and style
attributes, it's possible to manipulate the exact same attributes that
CSS and HTML "files" provide access to, using a declarative
programming style.

 so with pyjamas you get the best of both worlds.  (and i've found
that the combination of the advanced features of python, and
declarative DOM manipulation, is _definitely_ worthwhile exploring,
and i definitely find it to be far more powerful than pyqt4 or pygtk
programming).

 it's the exact same thing for SVG image file-format.  i'm
_definitely_ not convinced that "SVG the image fileformat" is The One
True Way to design images - but i'm equally definitely convinced of
the power of SVG manipulation libraries which allow for the creation
SVG images using declarative programming.

 but, all that having been said, and returning to "HTML and CSS (the
fileformats)", there's a lot to be said for convincing people who are
stuck in those worlds of the benefits and freedom of declarative
programming... _without_ having to get involved directly in
javascript.

> that web apps are about to take over
> the world, etc. There is still a place for GUI toolkits that
> are not based on the DOM,

 that there definitely are.

> or whatever the W3C technology of the month is.

 :) don't underestimate how much time and money is going into the W3C
standards!  and remember, someone's got to implement them, so the
actual proof of the pudding is not what the W3C thinks but whether the
technology ends up actually in the hands of users and is successful
_for users_.

 l.




More information about the Python-list mailing list