I work on a project that uses ZK and we’re considering moving away from that framework and Vaadin is a potential candidate. One of the nice things ZK supports is declaratively composing a UI from ZUL files (ZUL is basically XML). We’ve built around the declarative model to allow our users to dynamically create they’re own screens. Vaadin does not seem to have a direct equivalent to this declarative model…or does it? I’m no Vaadin expert so thats why I ask. If Vaadin supports both programmatic and declarative UI building then that would be great and exactly what we need.
I noticed new HTML5 Components using Polymer and this seems like it could work for building UIs declaratively and if thats the case whats the roadmap for developing the standard Vaadin components this way?
Basically my question can be reduced to: Does Vaadin support both declarative and programmatic UI creation and if so can you provide examples/docs on the declarative approach?
You can build UIs from component hierarchies and their properties just like with the programmatic model, but you need Java code to a) handle user interaction and dynamic changes in the UI, b) set up data.
The declarative syntax is similar to the HTML5 syntax used with Vaadin Components. They will probably relate very closely in future, but currently in the experimental phase of the Components they are separate.
also got a question about this topic. Is it possible to use “class” attribute in XML syntax? I’m looking for something like it’s done in JavaFX and FXML.
E.g.
<v-text-field caption="Email" class="myownstyle" />
And then define this style in a css behind? Or in the theme?