4

My team consists of more java guys and limited experience with JavaScript. I know this question have been asked several times, but just to get my facts right, I need to clarify few things as my experience in client side technologies are very limited. We've decided to build our solution using GWT instead of pure JavaScript framework (given there are more java experience).

These were the facts to back my decision.

  • 100% written in java
  • Requires basic java skills (Java SE not Java EE)
  • OOPHM – Out of process hosted mode – Define your browser & version. Browser compatibility no longer our problem
  • Debugging – debug your GWT apps just like any other Java application, using your IDE's debugger
  • Optimized JavaScript - GWT writes faster and more compact JavaScript than you

But some of my application function needs to use external js libraries. For e.g. Let's say I need make use of some specific js library to draw some stuffs on a particular page. (actually that js files written in dojos).

  1. Can above requirement be accommodated with GWT?
  2. Do you think the decision to go with GWT is wise or do have any other recommendation?
  3. We've found sencha gxt has the best widget library around( I'm aware its commercial, at least i found all widgets what we need). Do you think it's a wise idea to use wrapper library over core GWT ?

Thanks in advance.

Charith De Silva
  • 3,650
  • 4
  • 43
  • 47
  • CasperOne, could you recommend where this person (or any person) could ask this type of question? In general programming realm, this is a valid and helpful question. Does this mean that SO does not have room to serve people needing such type of help? Perhaps, the question should have been migrated to Programmers? – Blessed Geek Aug 10 '12 at 22:15
  • Hi Guys - This question was closed (still believe this is a valid question) so I'm keeping a comment how did it go with our product. – Charith De Silva Sep 19 '13 at 03:31
  • We are quite happy with DOJO and we've done loads of changes on the UI (view) without compromising logics behind them.So I suggest anybody who tossing between js and frameworks like gwt, just try to learn JS it's not too bad as it appear after all :) – Charith De Silva Sep 19 '13 at 03:40
  • We've tried gwt based framework (Vaadin) but ended up failing at the prototype stage just due to poor maintainability. Also we were not happy with the performance too. We started working on a pure JS framework (Dojo 1.8) and it's been over a year we have absolutely no issue with it. It took sometime for us to get it going but it's not hard after you learn basics. We've done loads of changes on the UI (view) without compromising logics behind them.So I suggest anybody who tossing between js and frameworks like gwt, just try to learn JS :) – Charith De Silva Sep 19 '13 at 03:48

3 Answers3

3

Can above requirement be accommodated with GWT?

Yes (see @Andrey Kapelchik's answer).

Do you think the decision to go with GWT is wise or do have any other recommendation?

Given your background and the points you mentioned, I think it is a very good decision. I have built apps with JavaScript, jQuery etc., but for anything that's larger than 1000 lines of code, I wouldn't want to build a JavaScript app "manually" again. The points that are decisive for me:

  • With GWT, I can re-use parts of the code both on the server and client side. For example, I can validate on the client side to give immediate feedback, then validate again on the server for security, using the same code.
  • I find my way much easier in large GWT projects. While it's certainly possible to arrange even large JavaScript code in a clear way, it always tends to get unwieldy.
  • I make intense use of IDE features all the time (refactoring, finding write access to fields, ...), and IDE support for JavaScript is too limited for me.

You will still need a tiny bit of JavaScript knowledge here and there. Your team definitely should learn CSS, and I'd recommend to learn it thoroughly - no matter which client side framework you choose.

We've found sencha gxt has the best widget library around( I'm aware its commercial, at least i found all widgets what we need). Do you think it's a wise idea to use wrapper library over core GWT ?

In a few projects I'm working on, we're using GXT, because that decision was made a few years ago. Here's my opinion: If you need to build something that looks very much like a desktop app, GXT may be perfect, otherwise I wouldn't recommend basing the app on GXT.

You get the best performance with pure GWT, and if you know CSS, it's much more flexible. GXT has some nice features, but working around its limitations, significant performance issues (and sometimes its bugs) can be quite time-consuming. If you really need a special GXT widget, you can still build a pure GWT app, and then add just that one GXT/SmartGWT widget.

Chris Lercher
  • 37,264
  • 20
  • 99
  • 131
2

I suppose GWT is perfect for the requirements and objectives of your described project. GWT has JavaScript Native Interface to use native JavaScript. JSNI allows integrating GWT with existing JavaScript or with a external JS library. It solves these issues by allowing you to integrate JavaScript directly into application's Java source code.

kapandron
  • 3,546
  • 2
  • 25
  • 38
1

My team really struggled with this issue after many false starts we determined that JavaScript can not really be avoided and it is not as bad to master as I feared it would be. The time it would take to ramp up on GWT would be around the same as it would take to ramp up on client side JS MVC framework.

We did consider GWT but dropped it because it will be harder to maintain in the long run for the following reasons.

  • What if the developers of GWT loose interest in maintaining it, it takes a really sophisticated skill set to maintain something like GWT.
  • Widgets that we might want might be available for something other GWT and porting to GWT might be more work than we want to do.
  • Modern JavaScript MVC frameworks are getting really mature with a lot of really cool features that make it easy to develop complex one page apps.
  • Browser will get better, JS frameworks will get better, it will be easier to higher front end developers ... etc.

We also evaluated dojo and dumped it because we felt that customizing it was going to be too hard for our team. Here is what we ended up with.

  1. Twitter Bootstarp for a CSS / widget framework
  2. A bunch of different jquery plugins wrangled up form various places online
  3. JQuery, Backbone, Handlebars for the client side MVC framework.

If i was starting the project again today, I would go with AngularJS from Google, it really is an amazing approach for building client side web apps. Especially because of the clever use of Dependency injection in JavaScript and the two way biding and a bunch of other stuff. I was at a Throne of JS conference and the google AngularJS guys were saying that they ported a 17,000 line GWT app to 2500 line angularJS app.

ams
  • 60,316
  • 68
  • 200
  • 288