On Mon, 19 Jul 2010, Michael Allman wrote:
On Fri, 16 Jul 2010, Greg Brown wrote:
Well, personally I'm not too happy with the direction BXMLSerializer is
taking things... from UI-centric to UI-agnostic.
I think you may have missed the point. WTKX was never UI-centric, except in
name. There was nothing specific to the org.apache.pivot.wtk package in
there. Moving it to org.apache.pivot.beans required no refactoring other
than changing the name.
I don't think I expressed myself well. WTKX was never UI-centric, but it
looked like it, and being a "subproject" of WTK it had the whiff of UI-ness
to it. :)
If it isn't UI-centric, I consider that an opportunity for growth. If Pivot
has a markup language for making UI-building easier, it should make some
assumptions about its problem domain to simplify that task.
I think one way to approach this goal is to consider BXML as a sort of
intermediate language---an input to a serializer that builds a component
hierarchy. You could keep that completely clean as a sort of souped-up
javabean serialization format, hell, even cleaner than it is now.
On top of BXML would be a DSL that makes some UI-centered assumptions. It
might make some assumptions about the use of some style language, like CSS,
to make it easier to work with. It might use CSS inheritence and cascading.
It might allow closer integration with scripting (*cough PIVOT-573 ahem*) and
richer event-driven binding support.
There's another enhancement to the serialization of WTKX => "Component
instance" that would be useful: lossless transformation. There's some
useful information in the wtkx file (maybe bxml, I don't know that yet)
that you don't get back from it. I'd like to be able to get a reference
to the serializer used to build a given component if at all. That would
in fact be incredibly helpful as I would like access to the serializer's
named objects after the fact.
Michael