lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hi Stefan!

On Fri, Sep 03, 2010 at 01:01:59PM +0200, Stefan Behnel wrote:
> What does "the resulting code" mean to you? Just what you need to represent 
> the GUI itself, or also the code that fills it with functionality? I mean, 
> most GUI toolkits have some half-abstract way of matching GUI events with 
> target code, but if you want to go further than that (i.e. *into* the 
> target code), I doubt that it will be very helpful.

Ah, the resulting code, is just code that address widget positioning on
geometry managers (the GUI itself, only).  Any logic of it would be in
charge of the programmer, not this tool.

I think it would work very well with Qt, Tk and HTML, which I know very
well.  On they, GUI definition and GUI logic are in totally different
places.  I don't know about GTK or ncurses, but I believe it wouldn't be
too different.

> If I'm not completely mistaken, I read about at least a couple of usable 
> GUI abstractions in the Python world. But you seem to want to abstract from 
> the language binding as well.

Yeah, they call it AnyGUI.  But it is different.  You specify your GUI
using Python classes of AnyGUI and tell it to "render" to Qt, ncurses,
whatever.  It is Python-specific and at language level.

> Wouldn't it make more sense to use a graphical DSL instead of a textual 
> one? For example, you could use the Qt designer to model your GUI, and then 
> generate the platform independent GUI representation from that. Or use an 
> HTML editor and map the HTML/CSS output to Qt/GTK+/whatever. Few people 
> write user interfaces manually these days.

Well, my plan is to address pitfalls of visual designers.

Qt Designer, for instance, generates a .ui file which is not more than a
XML.  I'm not going to start a flame war about whether or not XML is a
good format, but for me it is definitively not:  with XML I can't diff
the file between version X and version X+1 and get a good diff about
what changed.  With XML I can't change it manually and know what I am
doing.  If I were using a format with the same purpose of XML, I'd
prefer YAML or JSON.

I think Steve Donovan pointed out some other good pitfalls of visual
designers.  I'm not discarding visual designers, I'm just saying that
I'd like to use a more Unix-like tool (universal interface: text input,
text output) to generate them.  BTW, Steve also gave a nice example of a
possible declarative language.

Silas Silva