JavaScript framework for the client

My team consists of several java guys and limited experience with JavaScript. I know that this question has been asked several times, but in order to correctly understand my facts, I need to clarify some things, since my experience with technology on the client side is very limited. We decided to build our solution using GWT instead of a pure JavaScript framework (given that there are more features of java).

Here are the facts confirming my decision.

  • 100% written in java
  • Requires basic Java skills (Java SE, not Java EE).
  • OOPHM - Out of hosting mode. Define your browser and version. Browser compatibility is no longer our problem.
  • Debugging - debug your GWT applications just like any other Java application using the IDE debugger
  • Optimized JavaScript - GWT Writes JavaScript Faster and More Compactly Than You

But some of my application functions should use external js libraries. E.g. Let's say I need to use some specific js library to draw some things on a specific page. (these are actually js files written in dojos).

  • Can excess requirements comply with GWT?
  • Do you think the decision to go with GWT is reasonable or is there any other recommendation?
  • We found that sencha gxt has the best widget library (I know its commercial, at least I found all the widgets that we need). Do you find it reasonable to use a wrapper library over the main GWT?

Thanks in advance.

+4
source share
3 answers

Could the requirements for GWT be higher?

Yes (see @Andrey Kapelchik).

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

Given your background and the points you mentioned, I think this is a very good solution. I created applications with JavaScript, jQuery, etc., but for something more than 1000 lines of code, I would not want to create a β€œmanually” JavaScript application again. Points that are crucial to me:

  • With GWT, I can reuse portions of code on both the server and client side. For example, I can check on the client side to give immediate feedback, and then check the server security again using the same code.
  • I find my way a lot easier in large GWT projects. While you can certainly clearly organize large JavaScript code, it always becomes cumbersome.
  • I use IDE functions intensively all the time (refactoring, searching for fields, ...), and IDE support for JavaScript is too limited for me.

You'll still need a tiny bit of JavaScript knowledge here and there. Your team should definitely learn CSS, and I would recommend learning it completely - no matter what client structure you choose.

We found that sencha gxt has the best widget library (I know its commercial, at least I found all the widgets that we need). Do you find it reasonable to use a wrapper library over the GWT core?

In several of the projects I'm working on, we use GXT because this decision was made several years ago. Here is my opinion: if you need to create something similar to a desktop application, GXT may be ideal, otherwise I would not recommend using the application on GXT.

You get better performance with pure GWT, and if you know CSS, it is much more flexible. GXT has some nice features, but when working with restrictions, significant performance problems (and sometimes errors) can be quite time-consuming. If you really need a special GXT widget, you can still create a clean GWT program and then add only one GXT / SmartGWT widget.

+3
source

I believe that GWT is ideal for the requirements and goals of your described project. GWT has a JavaScript Native Interface for using native JavaScript. JSNI allows you to integrate GWT with existing JavaScript or with an external JS library. It solves these problems by integrating JavaScript directly into the source code of a Java application.

+2
source

My team really struggled with this problem after many false starts, we determined that JavaScript could not really be avoided, and I could not cope as badly as I was afraid. The time taken to increase the GWT will be about the same as for building the client-side JS MVC structure.

We reviewed the GWT, but abandoned it because in the long run it will be more difficult for the following reasons.

  • What if GWT developers are interested in preserving it, it requires a really complex set of skills to support something like GWT.
  • Widgets that may be required may be available for something else GWT, and porting to GWT may be more than we want.
  • Modern JavaScript MVC frameworks are becoming truly mature with many really cool features that make it easy to develop complex, one-page applications.
  • The browser will improve, the framework of JS will improve, it will be easier for developers to bring developers to the forefront ... etc.

We also rated dojo and dumped it because we felt that setting it up would be too complicated for our team. Here is what we have finished.

  • Twitter Bootstarp for CSS / widget framework
  • A bunch of different jquery plugins woven in different places online,
  • JQuery, Backbone, Handlebars for the MVC environment on the client side.

If I started the project again today, I would go with Google's AngularJS, this is a really amazing approach for building web client applications. Especially because of the clever use of dependency injection in JavaScript and two-way winnings and many other things. I was at the Throne of JS conference, and the Google AngularJS guys said that they ported the 17,000-line GWT application to the 2,500-line angularJS application.

+1
source

All Articles