GWT:UiBinder 还是 GWT Designer?
我有我的第一个 GWT 项目,它是使用 UiBinder (GWT 2.0 方式)创建的,我发现它比编写 UI 创建 Java 源代码(GWT 1.0 方式)更容易。
但我看到了 Google 免费发布的名为 GWT Designer 的东西。它具有标准 Google Eclipse 插件所缺少的出色功能和向导。我喜欢它,但我仍然认为使用 UiBinder 更好。我认为 GWT Designer 会非常有用,因为它可以帮助您编写 UiBinder XML 文件(GWT 2.0 方式),而不仅仅是源代码(GWT 1.0 方式)。
你对此有何看法? 我需要迁移到 GWT Designer 项目吗? 如果我迁移但仍保留 UiBinder UI 创建会更好吗?
I have my first GWT project that I created using UiBinder (GWT 2.0 way) which I found to be easier than write my UI creation Java source code (GWT 1.0 way).
But I saw this thing called GWT Designer that Google are releasing for free. It has nice features and wizards which were missing with the standard Google Eclipse Plugin. I like it, but I still think that using UiBinder is better. I think GWT Designer will be really useful when it can help you write UiBinder XML files (GWT 2.0 way), and not just source code (GWT 1.0 way).
What do you think about it?
Do I need to migrate to GWT Designer project?
Will it be better if I migrate but still keep UiBinder UI creation?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
最新的 GWT Designer 现在支持 UiBinder,而且效果很好。
http://download.instantiations.com/D2GWTDoc /continuous/latest/docs/html/wizards/gwt/uibinder_composite.html
The latest GWT Designer now has support for UiBinder, and it works great.
http://download.instantiations.com/D2GWTDoc/continuous/latest/docs/html/wizards/gwt/uibinder_composite.html
与传统的 widget 构建相比,UiBinder 可以为您提供更好的性能和更好的优化下载;对我来说,这足以成为坚持使用 UiBinder 的理由。如果您的应用程序足够轻且速度足够快,那么选择可能取决于最适合您的开发风格。
我不会将现有的 UiBinder 模板移植到设计器中。 Google 将很快向 GWT 设计器添加对它们的支持。
UiBinder can give you better performance and a better optimized download than traditional widget construction; to me that's enough of a reason to stick with UiBinder. If your app is light and fast enough as it is then the choice probably comes down to what style of development suits you best.
I wouldn't go as far as to port your existing UiBinder templates into the designer. Google will be adding support for them to GWT designer soon enough.
我自己还没有使用过新发布的 GWT Designer,但如果它已经使用 UIBinder 编写,我不认为它会保证将整个项目迁移到它。
请记住,构建 UI 的两种方法并不相互排斥 - 您可以使用 GWT Designer 创建一个新的小部件并在现有的 UIBinder 项目中使用它,如果您认为它更好,您可以考虑迁移观点。或者不是,因为他们仍然可以幸福地共存。
I haven't used the newly-freed GWT Designer yet myself, but I wouldn't expect that it would warrant migrating your entire project over to it if it's already written using UIBinder.
Remember that the two methods of constructing a UI are not mutually exclusive -- you can use the GWT Designer to create a new widget and use it in an existing UIBinder project, and if you decide it's that much better, you can consider migrating at that point. Or not, since they can still happily coexist.
如果您在一个拥有 CSS 和 html 专家的组织中进行专业开发,那么如果您不使用 UIBinder 之类的东西进行布局以及单个页面,那么 GWt 将很难销售。我还认为 CSS 设计师在响应 UI 需求变化方面比使用 GWT 布局技术的 java 开发人员做得更好。
但是,如果您的 java 员工可以控制需求并且不必回答 UI 设计人员,那么我认为在说明性模板和 GWT Designer 之类的东西之间进行选择只是一个问题偏好。
If you are doing professional development in an organization that utilizes experts in CSS and html, then GWt is going to be a tough sell if you don't use something like UIBinder for layouting as well as individual pages. I also think that a CSS designer can do a better job at responding to UI requirement changes than a java developer using GWT layouting techniques.
However if your java staff has control of the requirements and don't have to answer to UI designers, then I suppose choosing between delcarative templates and something like GWT Designer is just a matter preference.
正如重新发布公告中所述:
自 GWT 以来,使用 UiBinder 代码是没有意义的设计师很快就会支持。
As said in the relaunch announcement:
It wouldn't make sense to get ride of your UiBinder code since GWT Designer will support it soon.
不要使用设计器插件。最近的更新(本文发布时为 8.1.1)包含允许用户添加与 IE 不兼容的元素的按钮,例如 CellTable、DeckPanel、HorizontalPanel 和 VerticalPanel。
这意味着无论谁使用该插件,都需要自行承担风险。如果 IE7 尝试引入这些元素,它将加载部分页面,但无法加载使用这些元素的组件。 IE8 可能根本无法加载该应用程序。
DON'T use the designer plugin. The most recent update (8.1.1 at the time of this post) contains buttons that allow the user to add elements that are incompatible with IE, for instance CellTable, DeckPanel, HorizontalPanel and VerticalPanel.
This means whoever uses the plugin, uses it entirely at their peril. If IE7 tries to pull in these elements, it will load a partial page but fail to load components that use these elements. IE8 may not be able to load the application at all.