[Bf-committers] Declarative UI Experiment

José Romero jose.cyborg at gmail.com
Tue Aug 10 04:34:46 CEST 2010


El Tue, 10 Aug 2010 13:38:22 +1200
Doug Ollivier <doug at flipdesign.co.nz> escribió:
> Just to reply to this topic in general.
> 
> Are we all being "coders here" can we step back from the challenge
> and ask the question, what is the problem that needs to be overcome?
> rather than trying to debate languages to replace what has been built
> 
> *Problem*
> Python (or any coding language) is somewhat abstracted from the 
> interface as an output.
> 
Personally, i find Python more readable than XML most of the time in
real use cases. The only advantage XML would offer over Python would be
security (since any sane XML parser should be completely immune to code
injection)

> *Factors*
> A) Artists, myself included, are not coders but do want to contribute
> to the Blender effort and to customise their layouts.
> B) Python Scripting for a simple interface layout still fits within
> the realms of coding and thus is daunting for a beginner, but for a
> complex challenge is an appropriate and powerful solution.
> 
To me, "coding" requires writing an algorithm, using declarative syntax
is not more or less "coding" than writing XML. 

Actually, i think the middle ground would be, make a GUI tool for
"drawing buttons" artists can use to drag and drop their panels as
their please, that autogenerates python code that can be used right
away. The other users of custom GUIs, core and extension developers,
they already are using Python anyway.

> *User Centred Solution*
>  From a User Perspective, would it not be ideal to have a GUI editor 
> that pulls blocks together and writes the code?
>  From a Coders Perspective, would it not be ideal to have Python code
> as the master/raw document?
> 
> The above list creates the design brief, the solution should tick all 
> those boxes.  The XML solution by the sounds of it is a fantastic
> step in the right direction for one of the user groups (The group I
> fit into), but seems to frustrate the others.
> 
> Can Pyhton code be generated online via a web app, or a cross
> platform GUI? i.e actually drag and drop buttons or similar?
> 
Yes, of course it can, and very well, see wxGlade
(http://wxglade.sourceforge.net/), it generates well formed (and
relatively pretty) Python from a GUI. The code uses the wxPython
module/toolkit to generate the UI. 

> This is a great challenge to overcome.

Indeed it is :)

> 
> Doug Ollivier   BDes (Hons)
> Industrial Designer
> 
> 


More information about the Bf-committers mailing list