On 18 fév, 11:44, Zé Vicente wrote: > > This is my feedback: > > I found out that is much more easy and fast to use FlowPanel + CSS to > build layouts than any other GWT components. I only use GRID, > FlexTable and similar when I am displaying a real "Grid". > I chose FlowPanel to organize my layout because it generates after the > compilation a <div> element. If I add CSS to it, I can do whatever I > want with my layout without changing the Java code. > > What I expect from the community: > > 1. I would appreciate if you can share your experience in terms of > layout organization with GWT and the usage of Grid, FlexTable, > Vertical Panel, HorizontalPanel components in your code.
VerticalPanel is useful only in very rare cases. In most cases, you just add your widgets to a FlowPanel, as most widgets are made with a block-level root element. To reduce the number of classes used in our code (and thus the output size), we only use Grid (not even a single HorizontalPanel), and in one occasion a FlexTable (because we're using a colspan, but replacing it with an HTMLPanel or some other widget is on my TODO list). For our Grids, we're almost always using table-layout:fixed, which renders much faster on IE (we unfortunately *have* to support IE6 :'- ( ). In some cases, we're using float:left and float:right on widgets added to a FlowPanel where a GWT beginner would have put a Grid or HorizontalPanel. Finally, we've built a SpanPanel instead of using display:inline on a FlowPanel (just a matter of taste; might also be a bit faster, dunno) and we make use of InlineLabel and InlineHTML (we had them before they were added to GWT, and happily switched to the new ones as soon as they became available) > 2. Are there others developers with similar strategy: FlowPanel + CSS? We still have quite a lot of tables (mostly DecoratorPanels, Trees and Grids), but yes. Yahoo! UI's strategy is far better and I'd love to have the same kind DOM behind similar GWT widgets, but they might not play as well as GWT in old browsers (IE6, I'm looking at you). > 3. Does anyone know if GWT can be faster if it has to build a layout > with less <table> tags? Sure! (less elements created, and browsers tend to render DIVs and SPANs faster than TABLEs; except maybe IE6 provided you're using table- layout:fixed) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
