GWT Html Layout Conventions
- by brad
I've just started working with GWT and I'm already recognizing the extraordinary power that it possesses. I'm coming from a frontend world so the Java is a big learning curve, but I think that will actually help me build a properly laid out app (html-wise) instead of just relying on the default GWT panels that often end up using tables for layout, or superfluous, absolutely positioned divs.
The biggest thing slowing me down right now however is deciding how to properly lay out the design of my site. I've got a pretty standard 2-col header/foot site (fixed width) that I want to design, but I'm not a fan of all the extra divs/styling etc that come with the DockLayoutPanel for instance.
I'm thinking that I should just write my own Layout widget extending Composite that has HTMLPanels for the general site layout
(I think... still haven't fully figured that out yet, ie. how do I add ID's to these panel divs "#header", "#nav" etc...)
then I can add other widgets into this layout
But the other thing I'm seeing is that I could write a Layout class extending UiBuilder and have straight up divs in the ui.xml file.
I'm just wondering, what is the preferred method for site layout with GWT? This isn't going to be re-used in the sense of other widgets, it will be used once and my controls etc will be placed inside.
Any tips or tricks are greatly appreciated! And if I've completely missed the boat on how to do this, let me know