Why Haven't GWT- and Script#-style Frameworks Become Dominant?

被刻印的时光 ゝ 提交于 2019-12-21 09:32:37

问题


With GWT, we can write code in Java and have it translated to JavaScript code. With Script#, we can write code in C# and have it translated to JavaScript code. It sounds GWT and Script# will save web developers from suffering javascript pains. Then, why these tools haven't been dominant? Why still people dedicated to write javascript code?


回答1:


Multiple reasons, and which one is most important differs from developer to deverloper. Here are two:

  • Because JavaScript is a more nice/flexible/powerful/(insert adjective of choice here) language than Java/C#
  • People don't trust the output generated by GWT/Script#



回答2:


I can speak for only GWT, but here's the things that I think are holding it back:

  • compile time (GWT takes a long time to compile, javascript changes are instant)
  • learning new language (a lot of web developers don't know how to code java)
  • FUD over leaky abstractions and compiler. People fear a compiler making javascript for them and the leaky abstractions thing. Both are just FUD in my opinion, but that's doesn't make it any less of a reason.
  • people often don't understand where and how to use GWT and are put off by it because they try to wedge it into the wrong holes.
  • There's a perception that GWT was created to allow back end developers to code javascript, but it's not the case at all.
  • The whole idea of using VerticalPanels, HorizontalPanels, FlowPanels and FlexTables is foreign to people who have already learned how to lay things out in HTML.
  • Google is bad at marketing. No offence GWT guys, but if it was marketed/showed off a bit better it would have taken off like hotcakes
  • Lack of great widget libraries for GWT. The widgets that come with it by default are good, but we need a bit more. Libraries like GWT-ext aren't helping in my opinion, because they are just attempts to wrap javascript libraries in GWT, and don't take advantage of the power of coding in Java.
  • Steep learning curve for web developers, because it's framework is more Swing like than HTML like.

I still use it in my day to day coding, but I've long accepted that it's not about to take off.




回答3:


For UI development, working in JavaScript is significantly less painful that Java. Would you use a framework which translated assembler to Java to write your Java apps?

Most of the 'pain' with JavaScript was due to browser incompatibilities, which has changed due to large JavaScript libraries (eg dojo), and improvements in the browsers themselves.




回答4:


Because of Leaky abstractions and because Javascript is a much more elegant and suitable language for ui than Java or C#.




回答5:


because GWT ist not a one-size-fits-all solution.

GWT ist great and saves a lot of time for java developers who are writing rich internet applications. BUT!

for my unserstanding, it is quite hard to write a GWT site Seo-friendly. its impossible to have a non-javascript fallback. it is not truly optimized for loading speed.




回答6:


One way to look at (x)HTML, CSS, and Javascript is as the worlds most flexible UI system. Systems like GWT trade some of that flexibility for stability (note: I'm not super familiar with GWT outside the basic premise). There are a lot of software and/or service oriented shops that use the flexibility that (x)HTML, CSS and Javascript provide to differentiate themselves in the marketplace.

Imaginary conversation.

Client: I like the UI you built, but can we make this 20 pixels wider, change the hue slightly, and have an additional floating prompt when you rollover this half of it.

GWT Shop: Yeah, unfortunately the GWT framework doesn't support anything like that without major hacking and/or a lot of extra work that you don't want to pay for.

(x)HTML/CSS/Javascript Shop: Yeah, we can do that without too much trouble, here's an estimate.

I'm not arguing pro/con here and it's certainly more complicated that the imaginary conversation implies, but there are shops who, if forced to adopt a GWT like approach, would loose a competitive business advantage, so they're not going to do it.




回答7:


The problem with JavaScript isn't the language itself, which is quiet good in my opinion, it is, because JS is misunderstood and people don't take it seriously and don't learn it, but copy & paste crappy scripts without understanding the code. Secondly, InternetExplorer, JScript and the messed up DOM implementation ruined the image of the language.

But the main Problem is, you have to understand how the DOM and JavaScript works to write GWT code. It's the same as in JSF development, where you have to understand HTML and CSS. It is not like writing Java, where you don't have to understand the whole bytecode.




回答8:


If your a jave programmer and dont want to learn jave script or care about how IE version deal with Js then GWT is the way to go!



来源:https://stackoverflow.com/questions/654587/why-havent-gwt-and-script-style-frameworks-become-dominant

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!