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?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
I can speak for only GWT, but here's the things that I think are holding it back:
I still use it in my day to day coding, but I've long accepted that it's not about to take off.
Because of Leaky abstractions and because Javascript is a much more elegant and suitable language for ui than Java or C#.
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!
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.
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.
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.