简体   繁体   English

GWT:UiBinder还是GWT设计师?

[英]GWT: UiBinder or GWT Designer?

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). 我有我使用UiBinder (GWT 2.0方式)创建的第一个GWT项目,我发现它比编写我的UI创建Java源代码(GWT 1.0方式)更容易。

But I saw this thing called GWT Designer that Google are releasing for free. 但我看到这个名为GWT Designer的东西谷歌正在免费发布。 It has nice features and wizards which were missing with the standard Google Eclipse Plugin. 它具有标准的Google Eclipse插件所缺少的很好的功能和向导。 I like it, but I still think that using UiBinder is better. 我喜欢它,但我仍然认为使用UiBinder更好。 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). 我认为GWT Designer在它可以帮助你编写UiBinder XML文件(GWT 2.0方式)时非常有用,而不仅仅是源代码(GWT 1.0方式)。

What do you think about it? 你怎么看待这件事? Do I need to migrate to GWT Designer project? 我是否需要迁移到GWT Designer项目? Will it be better if I migrate but still keep UiBinder UI creation? 如果我迁移但仍然保持UiBinder UI创建会更好吗?

UiBinder can give you better performance and a better optimized download than traditional widget construction; 与传统的小部件构建相比,UiBinder可以为您提供更好的性能和更好的下载; to me that's enough of a reason to stick with UiBinder. 对我而言,这足以成为坚持使用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. 我不会将现有的UiBinder模板移植到设计器中。 Google will be adding support for them to GWT designer soon enough. Google很快就会向GWT设计师添加对它们的支持。

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. 我本人还没有使用新发布的GWT Designer,但如果已经使用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. 请记住,构建UI的两种方法并不相互排斥 - 您可以使用GWT Designer创建新的小部件并在现有的UIBinder项目中使用它,如果您认为它更好,您可以考虑迁移点。 Or not, since they can still happily coexist. 或者不,因为他们仍然可以愉快地共存。

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. 如果你在一个利用CSS和html专家的组织中进行专业开发,那么如果你不使用像UIBinder这样的东西进行布局以及单个页面,那么GWt将是一个艰难的销售。 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. 我还认为,与使用GWT布局技术的Java开发人员相比,CSS设计人员可以更好地响应UI需求变化。 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. 但是,如果您的java工作人员可以控制需求而不必回答UI设计人员,那么我认为在删除模板之类的选择和GWT Designer之类的东西只是一个问题偏好。

As said in the relaunch announcement : 正如重新发布公告中所述:

Now that these products are available again, we hope you'll start using them within your GWT projects. 现在这些产品再次可用,我们希望您将在GWT项目中开始使用它们。 Meanwhile, our next step is to more deeply unify them into the GWT family of tools by blending the fantastic Instantiations technology into the Google Plugin for Eclipse (GPE). 同时,我们的下一步是通过将奇妙的Instantiations技术融入到Google Plugin for Eclipse(GPE)中,将它们更加统一到GWT系列工具中。 So, there's much more to come, including things we're pretty sure you'll like, such as UiBinder support in GWT Designer. 所以,还有更多内容,包括我们非常肯定您会喜欢的内容, 例如GWT Designer中的UiBinder支持。

It wouldn't make sense to get ride of your UiBinder code since GWT Designer will support it soon. 因为GWT Designer很快就会支持你的UiBinder代码是没有意义的。

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. 最新更新(本文发布时为8.1.1)包含允许用户添加与IE不兼容的元素的按钮,例如CellTable,DeckPanel,Horizo​​ntalPanel和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. 如果IE7试图引入这些元素,它将加载部分页面但无法加载使用这些元素的组件。 IE8 may not be able to load the application at all. IE8可能根本无法加载应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM