david
david

Reputation: 2142

GWT - Many widgets or a widget containing other widgets

I'm designing the user interface. It has some static content and a lot of widgets.

Which is better?

Upvotes: 2

Views: 392

Answers (3)

Glenn
Glenn

Reputation: 8032

I addressed this very question in a presentation to a local JUG meeting the other day.

Which is better depends on what problem(s) you are trying to solve. Usually that means what pain you are trying to avoid from previous projects.

If you find it to be painful to include the static content in your GWT Module code, then your second option looks more appropriate. If the different widgets need to interact with each other (e.g. updating one refreshes the others), then your first option will contain the less pain.

Do you like the declarative style of GUI generation? If so, then consider using UiBinder which is included in GWT 2.

Upvotes: 2

LH.
LH.

Reputation: 99

How about a mix? If there are widgets that logically go together, group them into a containing widget. Then put a smaller collection of widgets into your big containing widget.

Upvotes: 0

cupakob
cupakob

Reputation: 8531

i'm also working on project with a lot of widgets (maybe over 250) and i think, one widget, which contains all others is the better way.

Upvotes: 0

Related Questions