Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reducing code complexity for GWT

I started learn GWT by example on google and my first conclusion is: too much code

Like this:

stocks.add(symbol);
        stocksFlexTable.setText(row, 0, symbol);
        stocksFlexTable.setWidget(row, 2, new Label());
        stocksFlexTable.getCellFormatter().addStyleName(row, 1,
                "watchListNumericColumn");
        stocksFlexTable.getCellFormatter().addStyleName(row, 2,
                "watchListNumericColumn");
        stocksFlexTable.getCellFormatter().addStyleName(row, 3,
                "watchListRemoveColumn");

Does GWT have any extensions for reducing code size and simplifying creating GWT forms?

like image 604
ziftech Avatar asked Sep 15 '09 09:09

ziftech


3 Answers

Nice example (oversimplified but clean conceptually) of GWT UI Design with CSS and HTML is Tags First GWT.

I agree with you that if one follows generic examples from Google documentation it's not a pleasant experience. The things changed lately though but they don't yet get fully reflected in the Google docs. Try the following: before going on with GWT development watch these 2 presentations: Best Practices and Performance Tips.

Without using CSS-based UI design, Event Bus, Command Pattern based GWT-RPC, MVP presentation tier and google-gin (GWT implementation of Guice) it's hard to overcome complexity in GWT just like in any other heavy GUI framework.

If you liked these ideas (described in the presentations above) you might want to consider gwt-dispatch and gwt-presenter that implement some of these patterns.

Few examples are: GWT MVP Example and Apache Labs Hupa GWT-based webmail

UPDATE: for latest in MVP design for GWT look for GWT MVP in GWT 2.1 and/or gwt-platform frameworks (among others that may work for you).

like image 152
topchef Avatar answered Nov 17 '22 16:11

topchef


UiBinder (GWT 2.0) could be helpful

like image 7
kaboom Avatar answered Nov 17 '22 17:11

kaboom


Geez might help you.

Geez provides easy to use style layouts for GWT and a series of static methods to build commonly used widgets.

like image 1
Nat Avatar answered Nov 17 '22 16:11

Nat