开发者

Should I go the widget way or HTML way?

开发者 https://www.devze.com 2023-02-05 17:43 出处:网络
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

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 (wit开发者_运维技巧h 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 ?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消