Re: 3.2: gjs/seed, QML?
- From: Alberto Mardegan <mardy users sourceforge net>
- To: desktop-devel-list gnome org
- Subject: Re: 3.2: gjs/seed, QML?
- Date: Mon, 25 Apr 2011 17:56:25 +0300
On 04/25/2011 04:20 PM, Emmanuele Bassi wrote:
> if we want declarative UIs then we shouldn't look further away than a
> platform through ad hoc JS APIs.
This is also a viable way indeed. Though my gut feeling, and some
concrete tests , hints me that performance-wise the way might be
steep for HTML5.
> every right-hand-side definition, and it requires dropping into C++
> and Qt if you want to have reasonable performance and decent logic
> abstraction to avoid the "write once, throw away immediately after"
Indeed, but you'll have to drop into the native code for any declarative
> I tried QML, talked to people using it daily, saw real-world usage of
> it, and even talked to its creators - and I am constantly amazed how
> somebody could ever think that conflating UI description and logic
> into the same ad hoc, barely specified language was a good idea.
I believe it's part of its strength, instead. I've seen way too many
times developers having to change/hack their code to produce a cool
effect (or just a layout) that the UI designer wanted so badly, but that
the theming engine was unable to deliver.
And it's not also about theming; sometimes you want to use a completely
different widget, a different animation, a slightly different UI
behaviour that cannot be achieved by just changing the application style.
At the end, despite having separate theme files (CSS or other), changing
a UI in a non trivial way often requires changing the code.
And I'm not talking about migrating a desktop UI to a tablet or to a
mobile device (even if indeed I believe that the reasoning applies here
much more strongly), but at least according to my experience with Nokia
UIs (Gtk, Hildon and then MeeGoTouch), the fantasy of UI designers has
always surpassed the capabilities of the theming engine.
Anyway, be it a QML-like or a HTML5 based language, I believe that GNOME
needs a declarative UI engine.
Application logic (unless it's really trivial) should still be coded in
a native language, with bindings that allow the objects to be used from
the UI layer. As I see it, a successful UI language should allow one to:
- design the UI, statically
- design all the UI interactions
- design the animations
- allow for easy themability
- allow for simple code snippets, which for example could be used for
- facilitate code reuse
- write the application core in one's favourite language, and provide
for different "skins" (which is more than a theme, as they could
contain totally different UI flows) to be used in different contexts:
GNOME desktop, KDE, touchscreen device, small screen device, etc.
So, not just the theming, but also the fact whether a control should be
a switch or a checkbox, and even whether it should be not shown at all,
all these are parts I consider to be "UI" and I'd like them to be
modifiable without rewriting my application's code.
IMHO QML can do this quite effectively; but then, I'm not claiming it's
the only one (it's just the one I'm more familiar with).
http://blog.mardy.it <- geek in un lingua international!
] [Thread Prev