Why Haven't GWT- and Script#-style Frameworks

2019-04-06 23:42发布

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?

8条回答
爷、活的狠高调
2楼-- · 2019-04-07 00:21

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.

查看更多
Ridiculous、
3楼-- · 2019-04-07 00:30

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

查看更多
看我几分像从前
4楼-- · 2019-04-07 00:30

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!

查看更多
Summer. ? 凉城
5楼-- · 2019-04-07 00:32

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.

查看更多
家丑人穷心不美
6楼-- · 2019-04-07 00:34

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楼-- · 2019-04-07 00:38

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.

查看更多
登录 后发表回答