Jquery/MooTools/Prototype 是否不再需要 GWT?
我不再听到太多关于 GWT 的消息了。
当它第一次问世时,似乎在某些 RIA 圈子里引起了热烈的反响。
但最近我的印象是 GWT 的受欢迎程度有所下降,因为像 Jquery/MooTools/Prototype 这样的解决方案提供了解决相同问题的更简单的方法。
这是准确的还是 GWT 解决了不同类型的问题?
I don't hear much about GWT any more.
When it first came out, it seemed to be all the rave in certain RIA circles.
But lately my impression is that GWT has suffered a dip in popularity because solutions like Jquery/MooTools/Prototype offer a much easier way of solving the same problem.
Is this accurate or does GWT solve a different type of problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
嗯,有点像。
GWT 的最终产品最终与其他 JS 框架提供的类似 - 一个 JavaScript 解决方案,它在很大程度上抽象了所有浏览器和 DOM 不一致之处,以便您可以专注于 Real Work™。
然而,GWT 和 JS 框架之间存在显着差异 - 使用 GWT 编写代码的程序员正在编写 Java,然后将其编译为 JavaScript。
所以归根结底是这样的:因为现在已经有了优秀的 JS 框架,所以还有多少 Web 开发人员了解 Java,但不懂 JavaScript? 因此,不知道 jQuery 或 MooTools 或其他什么?
对我来说,这个问题的答案是:不多。
Well, sort of.
The end-product of GWT ends up being something similar to what the other JS frameworks provide - a JavaScript solution that, for the most part, abstracts-away all the browser and DOM inconsistencies so you can focus on Real Work™.
However, there is a significant difference between GWT and the JS frameworks - programmers who author code with GWT are writing Java, which is then compiled into JavaScript.
So what it really comes down to is this: because great JS frameworks now exist, how many web developers are left that know Java, but don't know JavaScript? Ergo, don't know jQuery or MooTools or whatever?
To me, the answer to that question is: not many.
GWT 和 javascript 库有两个不同的用途。 GWT 从 Java 代码生成 Web 应用程序,并且 JavaScript 库可以用作 Web 应用程序中的组件。 由于 javascript 库可用于许多不同类型的 Web 应用程序项目(ASP.NET、Ruby on Rails 等),因此它们可能比 GWT 有更多的受众,但 javascript 库本身并不能完全取代 GWT 的功能。 根据需要,两者都对各自的受众非常有用。
GWT and javascript libraries serve two different purposes. GWT generates web applications from java code and javascript libraries can be used as a component within web applications. Because javascript libraries can be used in many different types of web application projects (ASP.NET, Ruby on Rails etc.) they may have more of an audience than GWT but the functionality of GWT isn't something javascript libraries completely replace on their own. Depending on needs, both can be very useful for their respective audiences.
GWT 当然适合那些喜欢使用 Java 编写代码的人。 如果你不是一个Java极客,你不会对它有热情,也不会欣赏它。 它完全消除了学习一个新框架的需要。 您只需要了解 Java,仅此而已。 正如有人已经指出的那样,Node.js 框架可以跨平台使用(.NET、Java、Ruby),但我不确定这个说法是否属实。
GWT of course is for folks who like to code using Java. If you are not a Java geek, you will not have passion for it, nor will be able to appreciate it. It has completely eliminated the needs to learn one new framework. All you need to know is Java, that's it. js frameworks as someone already pointed out can be used across platforms (.NET, Java, Ruby), but I am not sure if this statement is actually true.