On 20 juil, 08:37, Ståle Undheim <[email protected]> wrote:
> I have worked with web for ages, and although I am not that good at
> web design, I can make passable pages in HTML. However, going to the
> GWT world, I feel a bit lost about how to setup my UI, and organize
> classes and such. I create panels and add components, but I really am
> not sure how to set things up to look good. One approach I am trying a
> bit now is to have panels, and have the elements as anonymous class
> extensions off the fields:
>
> public class SomePanel extends FlowPanel {
> private final TextBox search = new TextBox() {{
> addStyleName("span-10");
> addKeyUpHandler(...);
> }};
> {
> add(search);
> }
>
> }
This creates a lot of classes, which will have to be compiled into JS.
The GWT optimizes the best it can but it won't make miracles, so those
classes will add some overhead.
> I am also considering now to just write things up in HTML, then
> convert it all to DOM.create, but that seems overly verbose.
Use HTMLPanels instead.
> I really
> hope UiBinder becomes available soon, as that seems to be closer to
> what I would like to have. Anyone got any good advice for how I should
> organize classes and panels?
I'd recommend the "Measure in Milliseconds: Performance Tips for
Google Web Toolkit" talk from Google I/O, in addition to the "Best
Practices for Architecting Your GWT App" one.
http://code.google.com/events/io/sessions/MeasureMillisecondsPerformanceTipsWebToolkit.html
There's a trade-off to find between "code beauty" and performance.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---