4 ms·
To GWT or not to GWT is a tough call. There are features of GWT that I love the most when developing front-end code: resource bundle (auto-gen CSS sprites both
by edwinnathaniel 14y ago
To GWT or not to GWT is a tough call.
There are features of GWT that I love the most when developing front-end code: resource bundle (auto-gen CSS sprites both the images and in Java code, no more hacky solution), i18n, UiBinder, JUnit (provided you 'architect' the code using MVP), great JS compiler (pruning dead code, producing multiple outputs for browser specific).
GWT infrastructure is definitely years ahead of anything out there in the market.
Having said that there are a few things that I missed from using normal tools like HTML/CSS/JS: fast refresh/update, debugging inside firebug vs attaching your IDE to debug front-end stuff. In general, development in GWT is slower if you don't have fast machines :)
- RyanZAG 14y ago> fast refresh/update, debugging inside firebug vs attaching your IDE to debug front-end stuff. Have you tried out the new SuperDevMode? It lets you use sourcemaps to debug the java code directly in the browser. Only works with Chrome currently, I think. I tried it out a bit but it felt a bit clunky, and I actually prefer debugging in Eclipse to firebug/chrome, I think. Couple seconds of startup time don't worry me as much as others, I guess. I use the time to think through what should happen and where problems could show up. At any rate I agree with you on how good the tooling support for localization/css/etc is - I think the learning curve is too steep for most people? The size of the getting started guide is pretty crazy, and there is a lot of confusing deprecated stuff, especially in the panels (some for html quirks mode (IE6), some for standards mode...)
- edwinnathaniel 14y agoThe last version of GWT that I used was 2.1 and I believe SuperDevMode was there already (open in any browser, hookup with this SWT/Swing UI that relays back to your Eclipse IDE). Back then it was very very clunky and slow to the point that if you have large rich UI it may even crash. Learning curve of the GWT API itself was okay, but the setup ceremony is not (preparing IDE, build, mavenizing, the whole end-to-end from start to finish). I don't know if this can be improved since this may be inherent culture from the Java world. But like anything in this world: you get some, you lose some (e.g.: no silver bullet). At this time, it's a matter of preferences and specific to each individual situation. If you have a well-defined project, GWT may suit you well. But if you need something that change quickly and frequently, preparing GWT may be yet-another-too-technical stumbling block.
- RyanZAG 14y agoAh.. nope, SuperDevMode is a very recent invention from GWT 2.5 - it uses Chrome's new source map tech to allow Chrome to overlay and debug your java code inside Chrome itself. Firefox will soon have the functionality too which will let Firebug work directly on Java code. https://developers.google.com/web-toolkit/articles/superdevmode https://developers.google.com/web-toolkit/articles/superdevm... I agree very much with your last statement though - hacking something together with no concern for future changes/requirements in Java nearly always ends in catastrophe.