Search code examples
javascriptgwtdojovaadingxt

JavaScript framework for client


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.


Solution

  • 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.