Search code examples
gwtuibinder

Should I go the widget way or HTML way?


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 ?


Solution

  • 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).