开发者

Difference between Extends Composite and Extend a specified widget

开发者 https://www.devze.com 2022-12-20 13:35 出处:网络
i am implementing my first GWT application currently, i just have a quick question about the differences between Extends Composite and Extend a specified widget when cre开发者_开发百科ating complex cu

i am implementing my first GWT application currently, i just have a quick question about the differences between Extends Composite and Extend a specified widget when cre开发者_开发百科ating complex custom widgets, and the advantages of using "extends Composite".

Also, is it true that the widget created by extending Composite can be loaded faster that extending a real widget, and which of them has lighter weight?

Thanks,


Widget Best Practices / Widget Building - this should get you started :)

As for the second part of your question - in most cases, your custom made, optimized for particular purpose Widget should be more lightweight than one of the ones provided by GWT (because they have to be more robust, etc). That being said, the widgets provided by GWT are quite lightweight IMHO (this is part of the whole concept of GWT - they give just the small/simple, but well built blocks to build your own application/framework).

One other thing worth noting is that the widgets provided by GWT sometimes have special implementation for a particular, ill-behaving browser (coughIEcough) - but that's not something you should be worrying about most of the time, since you should be building your Widgets one "level" higher (that is, your widgets should contain widgets provided by GWT), so that you won't have to deal with those incompatibilities between browsers.

0

精彩评论

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