GWT 仍然是大型商业应用程序的选择吗

发布于 2024-11-02 20:32:38 字数 467 浏览 2 评论 0原文

我的公司正在计划开发一个全新的网络前端应用程序。

一些背景:

  1. 它必须“嘶嘶作响”,即具有良好的适销对路的外观和感觉。
  2. 我们的开发团队没有 Java 经验,在 Silverlight、Javascript、JQuery 或 CSS 方面的经验也有限。
  3. 上市时间是一个因素。
  4. 我们需要从 Oracle 数据库传输大量数据。
  5. 它必须支持 500 - 1000 个并发用户
  6. 它将在防火墙后面进行内部托管。
  7. 我们需要绘图(地理空间)功能。

有人建议使用 GWT 而不是 Silverlight 或传统技术(Javascript、jquery、CSS 等)。

我不确定这是否是正确的方法?许多 GWT 新闻都来自 2007/2008 年。这让我觉得这项技术已经过时,甚至可能正在消亡。

如果有选择的话你会选择GWT吗?

My company is planning on developing a brand new web front-end application.

Some background:

  1. It must "sizzle" i.e. a nice marketable look and feel.
  2. Our development team has no Java experience, with limited experience in Silverlight, Javascript, JQuery or CSS.
  3. Time to market is a factor.
  4. We need to stream large amounts of data from an Oracle database.
  5. It must support 500 - 1000 concurrent users
  6. It will be hosted internally behind a firewall.
  7. We need mapping (geo-spatial) capabilities.

Someone has recommended using GWT instead of Silverlight or Traditional technologies(Javascript, jquery, CSS etc.).

I am not sure if this is the right way to go? A lot of the GWT news is from 2007/2008. It makes me think that this technology is old and maybe dying.

If you had a choice would you choose GWT?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

萌无敌 2024-11-09 20:32:38

不幸的是,在这种情况下,您的两个陈述是相互排斥的:

  • 我们的开发团队没有 Java 经验
  • 上市时间是一个因素

我是一名 Java 程序员,在过去一年左右的时间里学习了 GWT。能够使用编译语言直接向浏览器写入是非常有效的。成熟的开发工具。我可以比以前更快地完成 Web 开发(使用 ASP、JSP、ExtJS ...)。

但是,正如其他评论者所说:如果您没有 Java 经验,您会发现在短时间内掌握这两种技术(Java 和 GWT)是一个真正的挑战。如果你确实设法在合理的时间内将其推向市场,我只能想象代码库的状况会非常糟糕(因为你会边做边学)——这对于你的组织闪亮的新产品来说将是一个非常糟糕的基础冒险。

再说一遍,您在列出的其他相关技能中也没有“很多”技能。

我怀疑有更有效的解决方案。正如一些睿智的老山羊项目经理所说:

我需要三个变量来交付您的项目:时间、成本和质量。选择任意两个

在您的情况下,如果组织想要在短时间内获得高质量的产品,则必须补偿成本因素 - 您的组织应该购买一些临时 GWT 专业知识,为您提供健全的软件架构并指导您的团队接下来的几个月。之后,您将准备好掌权,通过“站在巨人的肩膀上”继承高质量的代码库。

unfortunately two of your statements are mutually exclusive in this context:

  • Our development team has no Java experience
  • Time to market is a factor

I'm a Java programmer who has picked up GWT over the last year or so. It's immensely effective being able to write direct to the browser using a compiled language & mature development tools. I can fly through web-development faster than ever before (using ASP, JSP, ExtJS ...).

But, as the other commenters have said: if you've no Java experience you're going to find it a real challenge picking up both technologies (Java & GWT) in a short time. If you do manage to make it to market in a reasonable time I could only imagine the code base would be in very poor condition (since you'd be learning as you go) - which would be a very poor foundation for your organisation's shiny new venture.

There again, you don't have a 'lot' of skills in the other related skills you listed either.

I suspect there's a more effective solution. As some wise old goat project manager said:

I have three variables to delivering your project: time, cost and quality. Pick any two

In your situation, if the organisation wants a quality product in a short time, it's the cost factor that must compensate - your organisation should buy in some interim GWT expertise to give you a sound software architecture and to mentor your team for the next few months. After that you'll be ready to take the reigns, inheriting a quality codebase by 'standing on the shoulders of giants'.

哭泣的笑容 2024-11-09 20:32:38

正如其他人所说,GWT 绝对不是一个垂死的项目。事实上恰恰相反,现在 Google 内部有超过 20 名定期贡献者(2008 年只有 6 名)。 Wave(尽管作为 Google 服务已停止,但作为 Apache 基金会项目仍然存在)、Orkut、AdWords、Google Moderator 和新的(仍处于测试版)Google Groups 都是使用 GWT 制作的; Google Buzz 的部分内容以及 Google 的其他一些项目也是用它构建的。

现在就您的选择而言:

  • Silverlight 是一项即将消亡的技术。微软明确表示现在正在投资“HTML5”: http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834
  • GWT 主要是客户端工具包,但它配备了用于客户端-服务器通信的“高生产力”工具(用于端到端协议的 GWT-RPC 和 RequestFactory,用于轻松 JSON 序列化的 AutoBeans)。借助 UiBinder,您可以轻松运用您的网页设计师技能。
  • 如果您对 JS 感到满意,那么就去吧,但是您必须选择“正确的工具包”(jQuery?Google Closure?)。否则(似乎是这种情况),这实际上取决于您需要/想要的“ajaxy”程度。我是“单页应用程序”的坚定信徒,但是 YMMV,或者您可以有特定的限制来排除它。无论如何,您都必须选择服务器端技术。

因此,根据您的需求/愿望和技能,我会选择 GWT 或“一些 JS 工具包”。在任何情况下,您都可以完全控制外观和感觉(除非您选择臃肿的播放器之一:ExtJS/ExtGWT、SmartGWT 或类似的;您可能会缩短这些播放器的上市时间,但您稍后会在性能、与其他工具包的集成以及外观方面付费)。

根据您所说的关于您的技能,我肯定会推荐 GWT(尽管您缺乏 Java 经验);因为缺乏 JavaScript 经验比缺乏 Java 经验更糟糕(你谈论的是“大型应用程序”,所以开始正确构建东西和/或拥有帮助重构的工具非常重要,你将拥有这些与 Java)。

@ianmayo 在我写上面的时候回复了,我只能附议他的话!

As others have said, GWT definitely is not a dying project. Quite the contrary actually as there are now more than 20 regular contributors from within Google (versus a semi-dozen back in 2008). Wave (despite being discontinued as a Google service, it's still alive as an Apache Foundation project), Orkut, AdWords, Google Moderator and the new (still beta) Google Groups are made with GWT; and parts of Google Buzz and a few other projects at Google are built with it too.

Now as to your choice:

  • Silverlight is a dying technology. Microsoft made it clear that it now invests in "HTML5": http://www.zdnet.com/blog/microsoft/microsoft-our-strategy-with-silverlight-has-shifted/7834
  • GWT is mostly a client-side toolkit, but it comes with "high productivity" tools for client-server communications (GWT-RPC and RequestFactory for end-to-end protocols, AutoBeans for easy JSON serialization). With UiBinder, you can easily put to use your web designer skills.
  • if you're comfortable with JS, then go for it, but then you'd have to choose the "right toolkit" (jQuery? Google Closure?). Otherwise (which seems to be the case), it really depends how much "ajaxy" you need/want to be. I'm a strong believer in "one-page apps", but YMMV, or you can have specific constraints that rule it out. In any case, you'd have to choose a server-side technology.

So, depending on your needs/wants and skills, I'd choose GWT or "some JS toolkit". In any case, you'll have full control over the look and feel (unless you choose one of the bloated players: ExtJS/ExtGWT, SmartGWT or similar; you'll probably have a shorter time-to-market with these, but you'll pay it later, in terms of performance, integration with other toolkits, and look-and-feel).

In the light of what you're saying about your skills, I would definitely recommend GWT (despite your lack of experience with Java); because lack of experience with JavaScript is far worse than lack of experience with Java (you're talking about a "large application", so it's really important to start building things right and/or have tools to help refactoring, which you'll have with Java).

@ianmayo replied while I was writing the above, and I can only second what he said!

浅唱々樱花落 2024-11-09 20:32:38

为了不让上述看似一致的答案误导读者,请在受人尊敬的 stackoverflow 中保持客观观点,以下评论表达了我使用 GWT 的确切经验。 GWT 是否消亡取决于有多少新应用程序会采用它,Google 趋势可以告诉我们 (gwt 趋势)。

摘自https://softwareengineering.stackexchange.com/questions/38441/何时不使用 google-web-toolkit

>
我对这个问题的回答既好又不好——好的是因为我以前实际使用过它,坏的则因为在使用 GWT 之前我对 HTML/CSS/JavaScript 非常有经验。这让我对 GWT 的使用方式感到抓狂,而其他并不真正了解 DHTML 的 Java 开发人员可能不会这样做。

GWT 名副其实 - 它将 JavaScript 和某种程度上的 HTML 抽象为 Java。对于许多开发人员来说,这听起来很棒。然而,我们知道,正如 Jeff Atwood 所说,所有抽象都是失败的抽象(如果考虑 GWT,值得一读)。对于 GWT,这具体引入了以下问题:

在 GWT 中使用 HTML 很糟糕。

正如我所说,在某种程度上,甚至抽象了 HTML。对于 Java 开发人员来说,这听起来不错。但事实并非如此。 HTML 是一种文档标记格式。如果您想创建 Java 对象来定义文档,则不会使用文档标记元素。它冗长得令人发狂。也控制得不够。在 HTML 中,本质上有一种编写方式

您好你好吗

在 GWT 中,您有 3 个子节点(text、B、text)附加到 P 节点。您可以先创建 P,也可以先创建子节点。子节点之一可能是函数的返回结果。经过与许多开发人员一起开发几个月后,尝试通过跟踪 GWT 代码来解读 HTML 文档的外观是一个令人头痛的过程。

最后,团队决定对所有 HTML 使用 HTMLPanel 可能是正确的方法。现在,您已经失去了 GWT 的许多优点,即让 Java 代码可以轻松使用元素来轻松绑定数据。

在 GWT 中使用 CSS 很糟糕。

通过附加 HTML 抽象,这意味着您使用 CSS 的方式也不同。自从我上次使用 GWT(大约 9 个月前)以来,它可能有所改进,但当时 CSS 支持很混乱。由于 GWT 让您创建 HTML 的方式,您经常会遇到一些您不知道已注入的节点级别(任何 CSS 开发人员都知道这会如何极大地影响渲染)。嵌入或链接 CSS 的方法太多,导致名称空间混乱混乱。最重要的是,你有精灵支持,这听起来不错,但实际上改变了你的 CSS,我们在编写属性时遇到了问题,然后我们必须稍后显式覆盖这些属性,或者在某些情况下,阻碍了我们匹配我们的手的尝试 -编写 CSS 并必须以 GWT 不会搞砸的方式重新设计它。

问题的结合,利益的交集

任何语言都会有其自身的问题和优点。是否使用它是基于这些的加权公式。当你有一个抽象时,你得到的是所有问题的联合,以及好处的交集。 JavaScript 有它的问题,并且经常被服务器端工程师嘲笑,但它也有很多有助于快速 Web 开发的功能。想想闭包、语法速记、临时对象以及 Jquery 完成的所有内容(例如 CSS 选择器的 DOM 查询)。现在忘记在 GWT 中使用它吧!

关注点分离

我们都知道,随着项目规模的增长,良好的关注点分离至关重要。最重要的之一是显示和处理之间的分离。 GWT 让这变得非常困难。也许并非不可能,但我所在的团队从未想出一个好的解决方案,即使我们认为我们已经找到了,但我们总是会出现一个泄漏到另一个的情况。

桌面!=网络

正如 @Berin Loritsch 在评论中发布的那样,GWT 的模型或思维方式是为实时应用程序构建的,其中程序具有与处理引擎紧密耦合的实时显示。这听起来不错,因为很多人都认为网络所缺乏的就是这一点。但有两个问题:A) Web 是基于 HTTP 构建的,这本质上是不同的。正如我上面提到的,基于 HTTP 构建的技术 - HTML、CSS,甚至资源加载和缓存(图像等),都是为该平台构建的。 B) 一直从事 Web 工作的 Java 开发人员不容易切换到这种桌面应用程序思维方式。这个世界上的建筑是一门完全不同的学科。 Flex 开发人员可能比 Java Web 开发人员更适合 GWT。

结论...
GWT 能够仅使用 Java 轻松生成快速但肮脏的 AJAX 应用程序。如果“快速而肮脏”听起来不像您想要的,请不要使用它。我工作的公司非常关心最终产品,以及给用户带来的视觉和交互上的精致感。对于我们前端开发人员来说,这意味着我们需要以使用 GWT 的方式来控制 HTML、CSS 和 JavaScript,就像尝试戴着拳击手套弹钢琴一样

In order not to mislead readers with above seemingly unanimous answers, keep objective view in respected stackoverflow, following review expressed exact experiences I had with using GWT. Whether GWT is dying depends on how many new apps will adopt it,Google trend can tell (gwt trend).

Excerpt from https://softwareengineering.stackexchange.com/questions/38441/when-not-to-use-google-web-toolkit

>
I am both good and bad to answer this question - good, in that I've actually used it before, and bad, in that I was quite experienced with HTML/CSS/JavaScript prior to working with GWT. This left me maddened by using GWT in a way that other Java developers who don't really know DHTML may not have been.

GWT does what it says - it abstracts JavaScript and to some degree HTML into Java. To many developers, this sounds brilliant. However, we know, as Jeff Atwood puts it, all abstractions are failed abstractions (worth a read if considering GWT). With GWT, this specifically introduces the following problems:

Using HTML in GWT sucks.

As I said it, to some degree, even abstracts away HTML. It sounds good to a Java developer. But it's not. HTML is a document markup format. If you wanted to create Java objects to define a document, you would not use document markup elements. It is maddeningly verbose. It is also not controlled enough. In HTML there is essentially one way to write

<p>Hello how are <b>you</b>?</p>

In GWT, you have 3 child nodes (text, B, text) attached to a P node. You can either create the P first, or create the child nodes first. One of the child nodes might be the return result of a function. After a few months of development with many developers, trying to decipher what your HTML document looks like by tracing your GWT code is a headache-inducing process.

In the end, the team decided that maybe using HTMLPanel for all HTML was the right way to go. Now, you've lost many of GWT's advantages of having elements readily available to Java code to bind easily for data.

Using CSS in GWT sucks.

By attachment to HTML abstraction, this means that the way you have to use CSS is also different. It might have improved since I last used GWT (about 9 months ago), but at the time, CSS support was a mess. Because of the way GWT makes you create HTML, you often have levels of nodes that you didn't know were injected (any CSS dev knows how this can dramatically affect rendering). There were too many ways to embed or link CSS, resulting in a confusing mess of namespaces. On top of that you had the sprite support, which again sounds nice, but actually mutated your CSS and we had problems with it writing properties which we then had to explicitly overwrite later, or in some cases, thwarted our attempts to match our hand-coded CSS and having to just redesign it in ways that GWT didn't screw it up.

Union of problems, intersection of benefits

Any languages is going to have it's own set of problems and benefits. Whether you use it is a weighted formula based on those. When you have an abstraction, what you get is a union of all the problems, and an intersection of the benefits. JavaScript has it's problems, and is commonly derided among server-side engineers, but it also has quite a few features that are helpful for rapid web development. Think closures, syntax shorthand, ad-hoc objects, all of the stuff done by Jquery (like DOM querying by CSS selector). Now forget about using it in GWT!

Separation of concerns

We all know that as the size of a project grows, having good separation of concerns is critical. One of the most important is the separation between display and processing. GWT made this really hard. Probably not impossible, but the team I was on never came up with a good solution, and even when we thought we had, we always had one leaking into the other.

Desktop != Web

As @Berin Loritsch posted in the comments, the model or mindset GWT is built for is living applications, where a program has a living display tightly coupled with a processing engine. This sounds good because that's what so many feel the web is lacking. But there are two problems: A) The web is built on HTTP and this is inherently different. As I mentioned above, the technologies built on HTTP - HTML, CSS, even resource-loading and caching (images, etc.), have been built for that platform. B) Java developers who have been working on the web do not easily switch to this desktop-application mindset. Architecture in this world is an entirely different discipline. Flex developers would probably be more suited to GWT than Java web developers.

In conclusion...
GWT is capable of producing quick-and-dirty AJAX applications quite easily using just Java. If quick-and-dirty doesn't sound like what you want, don't use it. The company I was working for was a company that cared a lot about the end product, and it's sense of polish, both visual and interactive, to the user. For us front-end developers, this meant that we needed to control HTML, CSS, and JavaScript in ways that made using GWT like trying to play the piano with boxing gloves on

向地狱狂奔 2024-11-09 20:32:38

GWT 绝对不老也不死! Google 自己的很多应用程序都是使用 GWT 开发的。您可以下载GBST 案例研究并了解这家全球金融公司如何使用 GWT 提高生产力并创造丰富的用户体验。你必须知道,当你使用 GWT 时,你会自动使用 javascript、html 等。你用 java 创建一个 gwt 应用程序,但是当你编译它时,gwt 会创建一个包含 html 文件、javascript 代码、css 等的文件夹...

我绝对推荐它!

GWT is definitely not old or dying! A lot of Google's own applications are developed using GWT. You can download the GBST case study and learn how the global financial company uses GWT to improve productivity and create a rich user experience. You have to know that when you use GWT you automatically use javascript, html, etc. You create a your gwt application in java, but when you compile it gwt creates a folder with html files, javascript code, css, etc...

I definitely recommend it!

烟织青萝梦 2024-11-09 20:32:38

首先,GWT并不是消亡的技术,它的使用量在增加,最新版本是2.2。从 1.6 版本开始,我使用 GWT 已有 2 年了。自它们以来它的改进是相当惊人的。

由于 GWT 是客户端技术,因此它只会对应用程序可扩展性功能产生积极影响。因为服务器端 Web 技术(如 jsf、struts、wicket)是服务器资源消耗者,但 gwt 不需要任何服务器资源来呈现用户界面。

但是您的团队存在问题。因为你们的团队没有java经验,自己去适应java和gwt这两项新技术是相当困难的。如果你们有时间学习,我强烈建议GWT。

First of all , GWT is not dying technology, its usage increases, and its latest version is 2.2. I am using GWT for 2 years, since version 1.6. Its improvements since them is quite amazing.

Since GWT is client side technology, it does have only positive effects of your application scaliblity feature. Because server side web technologies such as jsf, struts, wicket are server resource consumers, but gwt does not need any server resource to render user interface..

But there is problem for your team. Because your team has no java experience, it would be quite difficult to adapt yourself two new technologies java and gwt.. If you have time to learn , I would strongly suggest GWT.

岁吢 2024-11-09 20:32:38

精通 GWT 大约需要 1 年时间。如果您开发像 MicrosoftOffice 或 PhotoShop 这样复杂的应用程序,那么使用 GWT 会带来回报。恕我直言,对于小型且相对简单的应用程序使用 GWT 是没有意义的。 GWT 确实是一个消磨时间的框架,您必须有非常充分的理由来使用它。我认为 99% 的 Web 应用程序不需要 GWT。

It takes approx 1 year to become proficient in GWT. Using GWT pays off if you develop an application as sophisticated as MicrosoftOffice or PhotoShop. It makes no sense to use GWT for small and relatively simple apps, IMHO. GWT is a time killing framework indeed, and you have to have very strong reasons to use it. I think that 99% of web apps don't need GWT.

遗心遗梦遗幸福 2024-11-09 20:32:38

GWT 不是垂死的框架,而是消磨时间的框架。它有安全问题。您可以轻松地向 GWT 应用程序发出 CSRF(跨站点请求伪造)请求。而且Java和Javascript是完全不同的语言,你不能轻易翻译。为了提高您的工作效率,请避免使用 GWT。

GWT is not dying framework, but time killing framework. It has security issue. You can do easily CSRF(Cross site request forgery) request to the GWT applications. Also Java and Javascript are totally different languages, you can't translate easily. For your productivity avoid GWT.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文