Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can GWT be compared to javascript based frameworks?

How does GWT compare (or can it be compared) to Javascript frameworks such as backbone.js, angularJS, Ember, JQuery, etc.? Do they aim to accomplish the same job, making them competitors, or can they be used together?

like image 796
Ahmed Aswani Avatar asked Jul 01 '12 15:07

Ahmed Aswani


People also ask

What language is GWT client side code written in?

The GWT Web Toolkit, formerly known as Google Web Toolkit, is a set of development tools for building and optimizing complex browser-based applications using the Java programming language.

What is considered as JavaScript framework?

In brief, JavaScript frameworks are a collection of libraries containing code written in JavaScript, making life a lot easier for software developers. Each JavaScript framework offers pre-built codes for different areas and different purposes in software development.

What is the difference between JavaScript and JavaScript framework?

JS libraries give developers predefined methods and classes to help them work faster and more efficiently. On the other hand, the JS framework acts as a framework for developers to construct apps for specific platforms.


1 Answers

Yes and no. While GWT's compiler is essentially a Java-to-Javascript converter, the benefits it offers far outweigh anything I've seen from any popular JS libraries.

Since GWT-based apps are written in Java, they gain many of the benefits thereof, such as being strongly typed and extremely easy to refactor. If something changes that affects another class, you know it immediately. And for those things that Java isn't great at, you can always use Javascript to handle the case with JSNI. Google has also provided a great plugin for Eclipse which allows you to debug your code like nothing I've ever seen of a JS library. Another benefit of this is that you write your client- and server-side code in the same language, and GWT does the heavy lifting of tying them together.

There are also the benefits of the automatic generation of multiple permutations. GWT kicks out a copy of your code that looks and behaves identically (inasmuch as is possible) on the most commonly used browsers. Your clients all see the same thing without you carrying the extra weight. You aren't responsible for writing endless lines of code to deal with those countless browser idiosyncrasies that have plagued web developers forever. While to some extent these things are handled by some JS libraries, GWT makes it completely effortless.

In my experience, the libraries you mentioned are all great in their own right, but simply can't provide the powerful debugging, portability, extensibility, maintainability and portability that GWT does right out of the box. GWT isn't really built to work with other libraries, and instead gives you the capacity to do (mostly) everything those libraries can without their help. (Of course that isn't to say that you can't use other libraries wherever you want...you can if you really feel the need to do so.)

So in my opinion, no, there is no competition. GWT is the figurative heavyweight champion in this arena.

like image 151
Chris Cashwell Avatar answered Nov 14 '22 23:11

Chris Cashwell