Vaadin 7 beta1 - New layouts

Vaadin 7 beta1 contains new implementations of HorizontalLayout and VerticalLayout


No calculations means better performance

In alpha 2 we introduced a new layout mechanism and removed automated conversions of % to pixels, which sped up layouting. For beta1 we have completely rewritten the horizontal and vertical layouts to avoid calculations altogether. Instead of calculating the layouts in javascript we are now moving more responsibility to the browser and layouting is done mostly using pure CSS.


CSSLayout became even simpler

CSSLayout is targeted at people who want to do layouting using CSS. For that purpose it has previously been too complex with its three DOM levels. In beta1 we simplified CSSLayout so it now consists of only one containing div and adds its children directly to that. You are then free to use CSS without restrictions. If you need more DOM levels, you can always nest layouts.


There is always a but

We did not want to remove features from the horizontal/vertical layouts as we could not really identify what was really unnecessary in them. We were not able to find a way to make all cases work properly without any calculations so in a few situations (mainly related to expand ratio and/or alignments), the layouts perform calculations. To get really the last bit of performance out of the application, you might want to avoid these setups.


For short examples on how to use the new features, check out the Vaadin 7 mini tutorials:
https://vaadin.com/wiki/-/wiki/Main/Vaadin+7

For information on how to migrate from Vaadin 6 to Vaadin 7, see
http://dev.vaadin.com/wiki/Vaadin7/MigrationGuide

This is an beta release so we expect there to be bugs. We will no longer be making large new features but finalization of the current features might still affect API in some places. All your comments on the new features are welcome. Please post all Vaadin 7 related comments in the Vaadin 7 category.