pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Allman <...@allman.ms>
Subject Re: WTKXSerializer -> BeanSerializer
Date Fri, 02 Jul 2010 21:57:47 GMT
On Mon, 19 Apr 2010, Greg Brown wrote:

> The fact that WTKXSerializer doesn't have any dependencies on WTK is 
> almost a strong enough argument on its own to move it to pivot-core.

Maybe it should?

WTKX and WTKXSerializer are very elegant in their simplicity, but they 
aren't as convenient as they could be for UI markup.  And that's what WTKX 
is for, right?

One thing that's been bugging me as I work on my first Pivot project is 
the verbosity of specifying styles on elements.  Why can't styles be 
specified as attributes on the element in their own right?  Instead of

<BoxPane styles="{ backgroundColor: 'red', horizontalAlignment: 'left' }"/>

how about

<BoxPane backgroundColor="red" horizontalAlignment="left"/>


The latter syntax is significantly more compact and IMHO much more 
readable.  Of course, there's no reason the current syntax for settings 
styles couldn't be retained.

To handle this syntax, the parser could look for a skin property matching 
an attribute name if the component itself has no such property.



View raw message