简体   繁体   English

何时不使用Google Web Toolkit?

[英]When not to use Google Web Toolkit?

I'm considering use of GWT on a major in-house web app development project, namely it's major advantage in my eyes is the cross-compilation to Javascript which would (at least theoretically) help my team reduce the size of tech stack by one. 我正在考虑在一个主要的内部Web应用程序开发项目中使用GWT,即它在我眼中的主要优势是对Javascript的交叉编译,这将(至少在理论上)帮助我的团队减少一个技术堆栈的大小。

However, having been burnt before (like most devs), I would like to hear from programmers who did actually use it on any problems with GWT which would hamper, or limit, it's use within a certain problem domain. 然而,之前已经被烧过(像大多数开发者一样),我想听到程序员在GWT的任何问题上实际使用它,这会妨碍或限制它在某个问题领域内的使用。

When do you not recommend using GWT, and why? 你什么时候不推荐使用GWT,为什么?

I didn't read all the comments in the link that Jamshid provided, so this might have been addressed there... 我没有阅读Jamshid提供的链接中的所有评论,所以这可能已经解决了......

If you want to build something closer to a traditional web app (ie, web 1.0) that is centered around the concept of pages and forms being submitted, then GWT will be a hindrance. 如果你想构建一个更接近传统Web应用程序(即web 1.0)的东西,它以提交的页面和表单的概念为中心,那么GWT将成为一个障碍。 However, if you want to build something with a richer interface that's more like a desktop app (ie, web 2.0), then I've found GWT to be nifty for a couple reasons: 但是,如果你想用更丰富的界面构建一些更像桌面应用程序(即web 2.0)的东西,那么我发现GWT很漂亮有几个原因:

  • I can write and test most of my code in Java, which I know much better than HTML and Javascript. 我可以用Java编写和测试我的大部分代码,我比HTML和Javascript更了解。
  • I don't have to spend much time worrying about cross-browser support. 我不必花太多时间担心跨浏览器支持。

That said, GWT isn't perfect. 也就是说,GWT并不完美。 Trying to integrate with third-party Javascript libraries is hardly pain free, and getting it to work how I wanted with maven and eclipse gave me a few headaches. 尝试与第三方Javascript库集成并不是没有痛苦的,并且让我按照maven和eclipse的方式工作,这给了我一些麻烦。 If you do go with GWT, I highly recommend watching this presentation - Google Web Toolkit Architecture: Best Practices For Architecting Your GWT App . 如果您使用GWT,我强烈建议您观看此演示文稿 - Google Web Toolkit架构:构建您的GWT应用程序的最佳实践

Ive been using GWT since 2011. As any technology, it has its pro and cons. 自2011年以来我一直在使用GWT。作为任何技术,它都有它的优点和缺点。 Main benefit, by far, is the fact that if you have a team with strong java skills (even maybe developers that worked with Swing) then GWT is a smooth step. 到目前为止,主要的好处是,如果你拥有一支具有强大java技能的团队(甚至可能是使用Swing的开发人员),那么GWT是一个平稳的步骤。 It will be more familiar and probably you will get things done faster (at first) with it in comparisson with other technologies. 它将更加熟悉,并且可能与其他技术相比,您可以更快地(最初)完成工作。 Now, you said that it is a "major in-house webapp", so take in consideration that compilation time is a BIG ISSUE in GWT. 现在,您说它是“主要的内部Web应用程序”,因此请考虑编译时间在GWT中是一个很大的问题。 See this GWT report from Vaadin https://vaadin.com/gwt-report-2012-portlet/download/1150559483/Future-of-GWT-Report-2012.pdf So, I believe that only in the described scenario using GWT would make sense. 请参阅Vaadin的这份GWT报告https://vaadin.com/gwt-report-2012-portlet/download/1150559483/Future-of-GWT-Report-2012.pdf所以,我相信只有在描述的场景中使用GWT才会合理。

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

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