6 ms·
GWT 2.0: So good it's ridiculous
- richcollins 17y agoHow could trading the expressiveness of JS for the expressiveness of Java without the commensurate increase in performance be "So good it's ridiculous".
- donjaime_hn 17y agoYou clearly didn't RTFA. I'll give you my personal reasons for liking GWT in a few short bullets. 1. Better tooling - IDE refactoring when I need to change things. Red squigglies when I make a typo or reference something thats not there. A real debugger with breakpoints for finding bugs. Auto completion and auto style formatting so I dont have to type so goddamn much. 2. Compiler optimizations - Your code gets faster and smaller. Write maintainable code, have it turned into performant code. 3. API's and libraries - easy client server RPC, discoverable wrappers for the DOM APIs. Reuseable widgets that have predictable structure/side effects! 4. Maintainable code base - If you worked with more than 4 engineers on a non-trivial product, you would understand the appeal of a Java code base. UIBinder lets me not worry about CSS name collisions. I would go on, but you seem like a TLDR type of person, so it would probably be a waste of my time.
- mikedouglas 17y agoWas the personal attack at the end necessary?
- marcusestes 17y agoAgreed.
- donjaime_hn 17y agoProbably not. I sometimes get annoyed when people, faced with the choice of gaining some domain knowledge before forming an opinion, decide to instead just be loud about things they know little about. Personal attacks are lame though, even on the internet. Thanks for calling me out on it :). I apologize.
- madair 17y agoGood response to the question, which was clearly loaded
- richcollins 17y ago1. No reason you couldn't do this in JS (see Smalltalk) 2. The new JS VMs do plenty of optimization 3. C has more libraries than Java. Lets use C for everything 4. Actually, there is a lot of evidence that maintainability is inversely related to the number of lines of code. The more lines, the more bugs. (I don't have time to find the studies. They are there if you Google them.) I did read the article. I just wasn't interested in writing a treatise on the subject. Just wanted to give a counter point.
- boucher 17y agoThe performance that GWT is able to get is impressive. There are all kinds of optimizations they can make because of the assumptions they have, especially that you will run the code through the compiler.
- pohl 17y agoWhy ask this forum when the article explores this in detail?
- mikedouglas 17y agoDoes it, really? Most of the optimizations mentioned in the article (compression/obfuscation, module system, yslow integration) or in these comments (debugging, refactoring, auto completion) are all available/possible in javascript alone. What tangible benefits require Java's type system?
- mmastrac 17y agoGuided code splitting and type tightening (with associated devirtualization) are serious optimizations that can't be done today in JS. GWT can guarantee the immutability of JS object shapes - something you can't do with bog-standard JS.
- deleted 17y ago[deleted]
- jonmc12 17y agoGWT always sounds interesting, but I am underwhelmed by the application gallery. Every app looks like a draft version of gmail, google maps or google wave. Any links to impressive interfaces (non google-built)?
- trapper 17y agoblueprint by lombardi is pretty good https://blueprint.lombardi.com/ https://blueprint.lombardi.com/
- sandofsky 17y ago"Your current web browser (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_1; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9) is not officially supported by Lombardi Blueprint. If you experience any problems using this site please install either Microsoft Internet Explorer 6+ or Mozilla Firefox 3.5+ before contacting Blueprint Support."
- DTrejo 17y agoI would say speed tracer, but that is google-built.
- ibsulon 17y agoI suggest looking at the EXT-GWT library for what is possible. I'm using it in a project where its GPLness doesn't matter.
- hello_moto 17y agoIt depends on your needs. If you don't want to modify the widget appearances or behaviors, Ext-GWT is nice. If you aren't building a large web-app, Ext-GWT is the way to go. But if you're one of them people who prefer to do TDD, or unit-test etc, avoid Ext-GWT at all cost. If you want to personalize your app, avoid Ext-GWT at all cost. If you want a solid (library) Java code, avoid Ext-GWT at all cost. I've been using their code since MyGWT 0.4 and right now we're trying to get rid of it so bad.
- ivenkys 17y agoYes GWT 2.0 is impressive but haven;t we had 3 submissions on that in the last week. Surely nothing new is being said here.
- rbanffy 17y agoThose who like statc-typing will always find it ridiculously great. Those used to dynamic-typing will find the idea of writing JavaScript in Java ridiculous, but not great. There is wisdom in the middle.
- rgrieselhuber 17y agoPardon my ignorance but is there a clean way to run GWT with non-JVM server side languages?
- ivenkys 17y agoDefine clean.
- rgrieselhuber 17y agoDoesn't require some third-party (which tend to lag behind the latest versions) library to get it working and I can write normal server side code in Python, etc.
- jauco 17y agoYou can run a REST server and make your callbacks using JSON. That's what I did a while back. PHP could be used without problems.
- mmastrac 17y agoI've done the same in the past (Python backend). I'll add one more suggestion on top of that. You can create JSNI bindings for all of the JSON RPC objects with GWT to get compile-time API checks that disappear entirely from the output.
- DenisM 17y agoYes, you can make XMLHTTPRequest backend calls, although it's a bit of a pain to debug due to same-origin policy. If you get to this basically you have to turn off built-in GWT server and use your own to serve both GWT-compiled code and your XML requests.
- geekles 17y agoThe problem with GWT is java, which makes it meh.
- flaub 17y agoI've been working on a .NET clone of GWT as a side-project for awhile. It doesn't have a widget library yet, but it does have web-mode and development-mode. It works by decompiling MSIL which means you can use any .NET language you want. http://github.com/flaub/DotWeb http://github.com/flaub/DotWeb Not much in terms of demos, but the core technology is all pretty much done. Plugins for FireFox (NPAPI-based) and IE work so that you can set breakpoints in Visual Studio. Web-mode does a decent job of optimizing right now because it does method dependency analysis.
- DenisM 17y agoYo should make a post about it. Make sure to mention how it relates to similar Microsoft's own efforts.
- kls 17y agoWhile, GWT is a very impressive feat of technical accomplishment. It really misses the mark, the problem with it as well as most of the old desktop development (languages, toolkits, frameworks) is that it favored the developer over the designer. This is one of the reasons for the popularity of the web, it allowed the designer (and the want-to-be designer) the ability to design and build interfaces without having to know a turring complete languages. When I first started looking to do more dynamic web applications, I was convinced that toolkits like GWT and Echo2 where they way to go but I was reasoning from a Java developers perspective. It makes the job of a Java developer easier, while adding complexity to the task of the designer. This is all well and good when you have a 1-5 man team of experienced Java developers. I now prefer to use Java (Ruby, C, whatever) to write business logic services on the server and use HTML, css and JavaScript on the client. by writing a UI controller in JavaScript that gets embedded into the HTML file via a script tag it gives very clean separation of HTML, CSS and code this allows a large team to work very productively. Designers work in HTML, CSS. UX developers work in pure JavaScript and business domain developers work in their language of choice. This coupled with a CMS has allowed us to abandon the kludge of a server side document scripting language (asp, jsp, php) entirely and significantly reduced the complexity of delivering a web application.
- DenisM 17y agoYou should give it another look - GWT2.0 has declarative UI language and HTML can be directly embedded into it.
- donjaime_hn 17y agoYou should look at UiBinder (part of GWT 2.0). You write HTML and CSS, stick it into a UIBinder template. And in 5 minutes you can take a designed mock and have it bound to a Java class in a very efficient way. You get things like CSS namespacing and obfuscation for free with this approach too.
- kls 17y agoThanks, I will take another look at it.
- 17y ago