TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What is wrong with GWT.

28 点作者 uriel超过 13 年前

11 条评论

alexkearns超过 13 年前
This is just another example of the "there is only one way to do things, my way" philosophy that taints so many discussions about software development.<p>Sure, GWT does not create the cleanest mark-up and javascript in the world but maybe that is not always your goal. You may just want to get a web app up and running quickly but are lacking the javascript expertise - cue GWT, which allows you to harness your java expertise to create a web app.<p>If you don't like to create web apps this way (I for one would much prefer to hand code javascript), then don't but also don't go around name-calling the technology "disgraceful" just because it does not serve your own specific purposes.
评论 #3099262 未加载
ses超过 13 年前
This is an old article, and a poorly written one at that.<p>Strikingly though one of the criticisms that seemed most poignant to me is:<p>"GWT completely ignores the fact you are creating a website, NOT an application"... I think this shows a serious lack of forethought on the author's part to not see that many websites were turning into web applications, and many enterprise applications with desktop clients had also started to go down this route.
评论 #3098393 未加载
VikingCoder超过 13 年前
What is wrong with blog posts<p>Lately I've been reading a lot of blog posts assailing a technology as though proponents of that technology think all other tools are useless in all situations.<p>Replace "GWT" and "JS" in this article with "C++" and "Assembly," and all of the points still hold. But C++ is still incredibly useful for many developers, and so is GWT.<p>GWT largely exists because it has a reason to exist. One of its main reasons to exist is that browsers are not standards compliant, and sometimes the standards are ill-defined. A well-defined abstraction layer on top of that is very useful... right up until it's not. Sometimes you need to dig in to Assembly, and sometimes you need to dig in to JS. But quite often, higher-level abstractions get you all the way from start to finish.
评论 #3098430 未加载
PaulHoule超过 13 年前
"Any time you program one language in another, you lose all the benefits of the target language"<p>... yeah, like when C gets compiled to machine code, you lose all the benefits of machine code.<p>On some level that's true. You can certainly write machine code that's faster than C, and often you can take advantage of hardware features that the C compiler can't use (in some cases, SIMD.) On the other hand, C code can be portable across platforms and developers can be more productive.<p>GWT keeps one important attribute of Javascript: the ability to run cross-platform on web-browsers. It trades the benefits of programming in Javascript for the benefits of programming in Java. Static types have some advantages, and you get to work with Eclipse and have automated refactoring and a good debugger.<p>His fundamental criticism against single-page webapps is valid, but this is true about Java applets, Flash, Silverlight as well as some Javascript frameworks.<p>A fundamental criticism I'd have of GWT is that it's very to build very complex applications in GWT, complex enough that the problem of managing asynchronous communication becomes a real bear.
评论 #3098843 未加载
rdoherty超过 13 年前
Oh hi, OP here. I wrote this a <i>long</i> time ago. My opinion has changed a little in that time. I've already heard the arguments for/against GWT and understand its benefits. Not really sure why it's on HN now and honestly a little embarrassed by it.
ttcbj超过 13 年前
In my view, GWT is for creating large/robust web-based applications, and that is where machine-level optimizations really pay off. If you are writing a tiny utility on a page, hand coded javascript might pay off, but if you are writing a large/complex application, it becomes impractical for a human to do what a optimizer can.<p>I am not saying that GWT is perfect for everything, but it pains me to think of writing (and debugging, and refactoring) a large application in javascript, or any weakly typed language. I've tried it, and found it difficult to maintain.
评论 #3098866 未加载
rbanffy超过 13 年前
Independently of the merits of GWT or the follow-up apology post, Java is an awful language to write web applications with. Languages like Ruby and Python (mostly when associated with frameworks like Rails or Django) allow you to become much more productive, yield a much smaller codebase and much lower long-term maintenance costs.<p>As for the JavaScript side, if you find it daunting, you may try Coffeescript or even Closure (which provides some Java-developer-friendly limits to JavaScript).<p>Java has its strengths, but writing web applications isn't among them.
评论 #3098825 未加载
评论 #3098738 未加载
joshhart超过 13 年前
Check out scalagwt. They've enhanced GWT to read a protobuf abstract syntax tree so that any language could be compiled to javascript if it can target that output. The first language they have working is Scala, which is far more suited to working with frontend code than java and in my opinion better than javascript. The nice thing about GWT in general is that you get to use a traditional oop approach to maying out the components of a webpage ala java swing.<p><a href="http://www.google.com/m/url?client=ms-android-verizon&#38;devlocsession=off&#38;ei=_VSUTuDEMoXaqAPNhwE&#38;gl=us&#38;hl=en&#38;q=http://scalagwt.github.com/&#38;source=android-browser-type&#38;ved=0CBcQFjAA&#38;usg=AFQjCNE5sNJ8eaGDqMVqJniEiKBlgzKOHA" rel="nofollow">http://www.google.com/m/url?client=ms-android-verizon&#38;de...</a>
tcarnell超过 13 年前
EVERYTHING is wrong with GWT - just dont use it.<p>Generally I believe the idea of writing code in one language to be converted into another is wrong. Languages are tools to do a job - pick the right one for the job or it will end in tears.
评论 #3098412 未加载
评论 #3098431 未加载
评论 #3098432 未加载
评论 #3098392 未加载
jfoutz超过 13 年前
Our customers were thrilled to see their 20 year old applications running on an iPad. I don't know how that would be possible without a java interpreter for funky old languages, and GWT as a bridge to the web.
jtmille3超过 13 年前
Just to beat a dead horse, most languages, especially scripting languages compile down to something else. I don't use GWT, but I could understand the lure of using a known language that has established great tools to create a powerful web applications. From what I understand it will even optimize then obfuscate the javascript for you. As for the degradation argument, that is a weak negative.