Should I go the widget way or HTML way?
Asked Answered
C

2

8

Using UIBinder and Widgets is straightforward but the html it produces is quite bloted and difficult to style (uibinder generates a lot of inline styles that override external styling - even HTMLPanel has some).

Should I go with plain HTML where reasonable to get a clean makrup (with plain Element Objects - eg. ButtonElement) ?

How to process events then ?

Or is it a productivity overkill not worth doing ?

What are pro's and con's of widget vs html way ?

Cachinnate answered 19/1, 2011 at 12:26 Comment(0)
D
8

We use widgets only if we need

  • event handling or
  • internationalization in the ui.xml itself

The rest we do with plain html. So our ui.xml files are a mix of both accomplished by using a HTMLPanel (this allows for using widgets as well as plain html).

This presentation might be interesting for you (starting at slide 19).

Dispersion answered 19/1, 2011 at 15:34 Comment(0)
B
1

My choice widget. I hate play with html and their id's and write javascript function for them and other reasons.

gwt has many reasonable widgets that really facilitate coding and thinking! just write any widget and many many handler to it instead of writing javascript functions of course if you like coding java.

you can say some widgets are slow in some browser but the speed is not important in all time performance and scalability is much more important that gwt structure and gwt-rpc mechanism guaranties it to you.

Beaudette answered 19/1, 2011 at 14:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.