First of
all, let me introduce myself briefly. I am a software engineer with more than
10 years java projects development experience. I am a software architect who
pays attention to the common architecture NFQ stuff like dependency, code
qualification, application maintenance, etc. And, last but not least, I am
technology trend follower who sticks with the “moving” of modern software
development.
Today I
want to talk about GWT because I have done some researches while I am preparing
a fresh new web application development. And I want to use this opportunity to
give a new glass to some pure Java guy to let them know a little bit more about
what is going on with JavaScript recently.
It is very
interesting to read the discussion of using/ not using GWT:
- Some people put hard word, e.g. “GWT is dead”, “Google is dumping GWT”.
- Some people tried to be neutral, e.g. “GWT is not as bad as I thought it was".
- Company behind the current GWT shows us a brilliant report and tells us “89% of respondents would use GWT on their next project”.
Today,
almost one year later after Jochen Krause posted his blog, according to my
personal research, I am afraid I have to agree with him and Guy Nirpaz.
Google has dumped GWT and GWT is dying.
I feel
sorry to say that since the report from Vaadin has actually confirmed that GWT
is a good choice for a new project. Well, the report is brilliant. But while I
was reading it I could not stop asking myself why such a report should even
exist. Ever see any similar report of JQuery, HTML5 or Hadoop recently? No?
Why? Because it is not necessary! Such a report of GWT is trying to let the
people calm down and remove the fear we have while considering using GWT on the
next project. This is just my personal opinion, sorry about that.
GWT has
left Google since 2012. Some people said it is good for GWT regarding the similar
movement of Eclipse from IBM to open source community. But in my personal
opinion they are not comparable. First, Eclipse is a platform while GWT is just
a framework for web application. Second, after moving to the open source
community, Eclipse is still heavily used in IBM. I don’t see the same thing
happens in Google. Google has actually abandoned GWT and embraces pure JavaScript
with HTML5 development and provided Angularjs and Polymer. The community is mad on Angularjs after they met it.
It was a
great choice to choose GWT a few years ago while JavaScript was ugly and just
toy language used for some fancy animation. Now JavaScript is mature enough for
serious project development. It is in fact already used to build some amazing
applications like Gmail, Blogger, Google+, etc. Let me show you why you should
NOT use GWT for the new project anymore.
Google walks away and community is following
I haven’t
seen any life signal of GWT for new project within the Google territory. People
follow when Google walks away.
Enterprise application development environment
This is the
most frequently talked reason for choosing GWT instead of an appropriate
JavaScript framework like Angularjs. You will be benefit from mature
development environment and java language itself. Well, that is correct. But
recently JavaScript and its development environment become more and more
mature:
IDE – Webstorm
Tools mamangement – NPM(Node
Packaged Modules)
Build tool – grunt
Dependency management – bower
Unit test – Jasmin
QA code analysis – jshint
Modular – RequireJS
Framework - AngularJS
In some
areas using JavaScript is even better than developing application in java.
Consider what would be done if maven should be updated and what would be done
if Yoeman should be updated? Much easier while using NPM right?
Object
oriented programming
Many people
have concern about JavaScript language itself. This is one reason why they
consider using GWT. To be honest, just because JavaScript is a dynamic language
does not mean it is not object oriented. You can find many JavaScript OOP
tutorial, for example this one from MDN. There are many JavaScript designpatterns can be implemented in JavaScript,
even beyond the GoF design patterns. Want to read some good books? Take a look
at the post “Required JavaScript Reading”, Rey Bango did a really great work!
Short of
JavaScript experience
GWT lets
people work with java to build a web application running on the client side. Feel
great right? But, look out! JavaScript code will be generated. We do not really
get ride of JavaScript. We are end up with generated JavaScript code! It would
be not true, if you think you don’t need to know JavaScript when GWT is used in
your project. In fact, According to my personal experience, almost every GWT
developer knows JavaScript. That makes me, as a software engineer, feel really
bad. Why should you let GWT generate the JavaScript that you can write it on
your own? In fact, the gap between Java and JavaScript is not as big as people
image. It might take some time to understand some core dynamic language
concepts like “closure” and “prototype inheritance”. The rest should be really easy for mature Java developer to understand. If
you are confused at first glance, maybe you need to learn it three times.
The native
language of web application is JavaScript. HTML is going to provide more and
more API. People around the world are contributing great frameworks/libraries
using JavaScript directly. It is difficult for GWT to follow these fast and
flexible developments done by a more tremendous community. If you want to use
them within GWT, you (or somebody else) have to make them available in the GWT
way. Such a restriction makes me feel really bad. There is really no excuse
anymore not to use JavaScript directly.
GWT is a
mature framework which provides great features like MVP, data binding, etc. But
now, thanks of AngularJS, you will have these features too while using
JavaScript. And that is not enough, beyond these features, AngularJS provides
some other excellent built-in features, e.g. dependency injection (like Guice
does) and Directive which is the killer feature of AngularJS for customization
and component integration.
Testability
Still think
GWT is the only choice for building testable client side RIA? Now is the time
to change your mind. You can test every thing by using AngluarJS, Jasmin, and
Karma. For example:
- it('should say hello', function() {
- var scopeMock = {};
- var cntl = new MyController(scopeMock);
- // Assert that username is pre-filled
- expect(scopeMock.username).toEqual('World');
- // Assert that we read new username and greet
- scopeMock.username = 'angular';
- scopeMock.sayHello();
- expect(scopeMock.greeting).toEqual('Hello angular!');
- });
Reference:
The
usage of scopeMock via DI and the expect() method looks really familiar for us
Java guys, right? :-)
Widgets
Want to use
some fancy widgets built by other guys? With GWT you have actually only one
choice: GXT. Vaadin could be another one if the complete client-side API isavailable.
With AngularJS the Directive feature make it possible and easy to integration
any other JavaScript widget library. AngularJS co-creator Miško Hevery hasmentioned that AngularJS 2.0 will work with Polymer seamlessly. Is the trend now not clear enough
to you?
Mobile app
development
Hot topic. It
looks like currently everybody wants a (web) mobile app. If you use GWT, you will
have no other choice but mgwt teams up with gwt-phonegap. And the project
gwt-phonegap shows us exactly the risk of using GWT for new project - You have
no direct access to the generated JavaScript and it is painful for any
extension and integration. Why I am saying that? Because PhoneGap provides its
features only via JavaScript API and you are forced using gwt-phonegap to
generate the appropriate JavaScript code, which can call phoneGap JavaScript
API. This approach is painful. If you want to use a new xyz web technology
built in JavaScript, you have to keep waiting until someone developed a gwt-xyz
project or you must develop the gwt-xyz project on your own. Can you afford it?
Some people might say you can use JSNI. Yes, you can! But please think about
it, why use GWT if you want to call the JavaScript API directly? Using JSNI you
will lose most benefits you have because your project is not a pure java
application anymore.
If you have
GWT project and consider build a mobile web app as a new client view, before
you decide to use mgwt and gwt-phonegap, you should at least keep an eye on the
development pulse of both projects:
Still don’t
get it? Compare with the pulse of JQuery Mobile:
Have you
seen the risk of using mgwt and gwt-phonegap in a serious project?
Please
don’t get me wrong. Daniel Kurka did a great work. His work of the both
projects makes a mobile app of GWT possible. He should get our full respect.
But, business is business, you should think of your own benefit and risk.
Summary
If you
currently want to develop a new client side RIA, still using GWT might not be
the best choice, even if you have GWT project experience. For your long term
benefit you should consider using JavaScript directly. If I were asked to build
an enterprise RIA now, I would use the following architecture and technology
stack:
- Architecture: SOFEA
- Server side: Java & Restful API (I am still a Java guy and Java is still the first choice for the backend of enterprise application.)
- Client side: AngularJS, RequireJS, HTML5, JQuery Mobile for mobile web, Cordova for hybrid app, some other JS libraries depends on the concrete requirement.
- Development Tools: maven or Gradle for backend Java project. NPM & Yoeman for frontend JavaScript project.
- Test: Junit & mockito for Java project. Karma, Jasmine, and PhantomJS for JavaScript project.
- CI: Jenkins
65 comments:
Hi My name is Avi and i think you're probably right in all the things you have said.
the only thing that you have missed is "strong types" which in large project still GWT has it advantages, refactoring of large project is something that you can't do easly.
from guys how worked with java script the problem start with maintaining the project.
NOTE:wirting new code is easier then reading (understanding) it!!!!
The only thing that can help you with the point i mention is testing and testing agin and agian. which most of the programers realy hate!!!
I think in few years when the JS projects will grow and the people who started them will leave them we see the real problems of using large JS projects.
Avi
You have so many things wrong in this post that I dont even where to start to answer you.
Please do some research about GWT again...
Alain, could you please expand? your comment is vague and completely unhelpful.
Soooo..... I have to say as a Java developer I love GWT. That said I am much interested in Node and Angular together on the client. One thing that really helped me at our organization was phone-gap. Not for the access to the device, but simply for wrapping code into an ipa. (we have a strict ios need)
We also write apps in .js is there another way to get an app on the iPad springboard other than phonegap?
I'm not aware of one, but that doesn't mean anything really.
great post, and yes Google dropping GWT has worried me for that past three years.
IMHO, Daniel's work is just much better (by-far) than jqm framework (especially performace-wise thanks to gwt). I preffer using this "small"(mgwt & gwt-phonegap) framework rather than using the jqm life-cycle-crazy framework, even if the learning curve might be a little bit steeper. Once you get past the "hello world" samples of angular and copy pasting from Jqm docs it gets really hard maintaing large scale project in JavaScript.
100% true...develop an application with 50 developers out of which 20 developers are constantly new ones because of churn rate in the industry and maintain an enterprise application on web. You will know it what pain JS brings in maintenance. The code keeps growing and so many functions and features get written more than once to avoid regression and then clean up is out of question, because no one knows what is going to break.
Then you start looking for tools which can do these..it goes on and on...Java script is a scripting language and for standing up a web page in a week with one or two developers project it sounds perfectly okay. For an enterprise application it is a NO NO
Some comments.
- Google most complex application has recently completely be rewritten in GWT. Google Apps Spreadsheet.
- Gwt with a Java backend is must cheaper and easier to maintain than Angularjs with a Java rest backend.
- Gwt business logic can be shared between the client and server.
- Mgwt just released a new version. The library is complete. There is zero risk in using it even if they stop supporting it.
- Gwt roadmap is very promising, with feature such as instant compile.
- I have seen several Angularjs projects and they are slow, unreadable and for some reason the developers feel the need to write test units for every single bit.
There is an alternative tool similar to GWT called Dragome. But this one is about compiling bytecode to js, and it also has UI components support. Things like Incremental compiling, Java 8, HTML template are already supported. And there is no need to wait to ECMAScript 6 to be standardized because it already allows use of dynamic proxies continuation (js yield), classes, lambda (arrow functions).
URL: www.dragome.com
some clarification to what you mention in the post.
" First, Eclipse is a platform while GWT is just a framework for web application." GWT is a SDK not web frameworks, There are many web frameworks built on GWT (GWTP, Errai, Vaadin, GXT, putnami ...).
"I haven’t seen any life signal of GWT for new project within the Google territory. People follow when Google walks away.". False https://www.youtube.com/watch?v=-uJjh4DDW2s
"Enterprise application development environment" You can use the same java tools for client and server development. If you are a full stack developer is more productive use one set of tools. Why not use javascipt at backend?
"Object oriented programming", I guess we'll agree that java is much more powerful than javascript to place an object oriented programming.
"if you think you don’t need to know JavaScript when GWT is used in your project" this is true.
"According to my personal experience, almost every GWT developer knows JavaScript. That makes me, as a software engineer, feel really bad. Why should you let GWT generate the JavaScript that you can write it on your own?". javascript program that makes me feel insecure and I am more productive programming in java.
"It is difficult for GWT to follow these fast and flexible developments done by a more tremendous community. If you want to use them within GWT, you (or somebody else) have to make them available in the GWT way" again false, JsInterop and Elemental 2.0, are being designed for safe integration with javascript and HTML5.
Some advantages of GWT (if you have a java backend) over plain javascript obviated in the post:
- type safe, for big projects this is pain killer.
- Compiler optimization.
- You can reuse java code between client and server.
- Transparent logging integration (log4j or logback).
- Java exceptions of client error.
- jar for package.
- Maven or gradle for complete construction of the project.
Framework
GWT is a SDK !!!!!!, You can even use angularjs framework on GWT :-D https://github.com/FinamTrade/angulargwt
Testability
You can use junit for testing cliente and server.
Widgets
You can use GWT widgets, Vaadin, GXT or HTML + CSS. We use Twitter Bootstrap + jquery.
Summary:
Architecture: SOFEA
Server side: Java (Spring + JPA) & Restful API.
Client side: GWT, twitter bootstrap, jquery and restygwt.
Development Tools: eclipse, maven or Gradle.
Test: Junit & mockito (gwtmockito).
CI: Jenkins
You said that you haven't seen any life signal in GWT. Well check out GWT.create 2015 and GWT 3.0. They're amazing!
You asked why you should let GWT generate the javaScript. Here's the answer:
-Optimize code: you'd be surprised at the amount of optimization it does. GWT is massively faster.
-Add additional features to javaScript: in addition to javaScript GWT lets you do Java, and UiBinder.
-Code Generators: Code generators let you specify what you want in an interface and then have the code generator generate the implementation at compile time. They let you do very powerful things:
-Abstract stuff away
-Abstract away browser differences by sending different code to different browsers. This is called permutations. This is much more efficient than jQuery's switch statements and allows GWT to optimize for each specific browser
Bring Java code to the browser and reuse GWT code in JVM.
Even js developers compile their code(google closure compiler).This is why so many people compile their code. There is an extraordinary amount of compilers to compile code to js. The other reason I don't write my own javaScript is that javaScript sucks. However if there is a js library I want to use I can use javaScript in GWT with JSNI. In fact, 62% of GWT projects use js.
Your summary reveals the fundamental problem
You said that you're only option for widgets is GXT but you have many options: mosaic, bootstrap, smart GWT, spiffy UI and much more
More info about the future of GWT.
GWT is at the core of new inbox's web client.
Google is using GWT also in the new calendar and Sheets.
http://gmailblog.blogspot.com.es/2014/11/going-under-hood-of-inbox.html
http://www.infoq.com/news/2014/11/google-inbox-cross-platform
https://news.ycombinator.com/item?id=8554339
Why compile to js?, perhaps the following projects will help answer that question:
- GWT
- TypeScript
- FlowScript
- AtScript
- CoffeScript
- Dart
- scriptsharp
Its useless even those guys see that gwt is almost dead around the world they refuse to acept the fact let this crap die.
It is strange when author claims that google doesn't use GWT, please do the research again and bit properly this time. I won't be exaggerating if I say google uses GWT "heavily".
The author seems to be a person with no knowledge of GWT, neither the time to spend learning it. We have used in more than one project it is really good provided the architecture is setup well to start with.
Angular 5 Resources
| Angular 5 Training in Chennai.
Thank you for posting such a nice useful and impressive content.
angularjs development company
Nice summary and prediction. Especially when you look 3-4 years back.
I wonder what GWT proponents are to say now, a few years later, about their opinion.
Disclaimer: I'm a former GWT developer, who'd chosen new at the time GWT/GXT over older dying Flex for rich web UI development. GWT was pretty good for what we've done with it, but I switched to SPAs for new projects once Angular and React have become more mature.
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
Data Science course in rajaji nagar
Data Science with Python course in chenni
Data Science course in electronic city
Data Science course in USA
Data science course in pune | Data Science Training institute in Pune
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
samsung mobile service center in chennai
samsung mobile service center
samsung mobile service chennai
Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
python training in bangalore
cool stuff you have and you keep Python classes in pune overhaul every one of us
Visit for Python training in Bangalore :- Python training in Bangalore
Wow it is really wonderful and awesome thus it is veWow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your site.ry much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your site.python training in bangalore
Very interesting blog Thank you for sharing such a nice and interesting blog and really very helpful article.microsoft azure training in bangalore
These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post.blue prism training in bangalore
Being new to the blogging world I feel like there is still so much to learn. Your tips helped to clarify a few things for me as well as giving.vmware training in bangalore
Really it was an awesome article,very interesting to read.You have provided an nice article,Thanks for sharing.aws training in bangalore
I have to search sites with relevant information on given topic and provide them to teacher our opinion and the article.
Data science course
Data analytics course
Business analytics course
Data science interview questions
Excellent blog thank u sharing the useful info.....
data analytics course
data science course
business analytics course
avianation
Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here...data analytics courses
Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.
devops training in chennai | devops training in anna nagar | devops training in omr | devops training in porur | devops training in tambaram | devops training in velachery
i feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
learn data science training
360digitmg data science courses online
its very useful blog. AWS training in Chennai | Certification | AWS Online Training Course | AWS training in Bangalore | Certification | AWS Online Training Course | AWS training in Hyderabad | Certification | AWS Online Training Course | AWS training in Coimbatore | Certification | AWS Online Training Course | AWS training | Certification | AWS Online Training Course
I like your post. Everyone should do read this blog. Because this blog is important for all now I will share this post. Thank you so much for share with us.
Data Science Training in Hyderabad
Thanks for posting useful information.You have provided an nice article,
DevOps Training in Hyderabad
Good Post! , it was so good to read and useful to improve my knowledge as an updated one, keep blogging. After seeing your article I want to say that also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
https://www.3ritechnologies.com/course/mern-stack-training-in-pune/
This post is great. I really admire your post. Your post was awesome. data science course in Hyderabad
I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up
Devops Training in Hyderabad
Hadoop Training in Hyderabad
Python Training in Hyderabad
Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website
top mulesoft online training in usa
Thank you so much for shearing this type of post.
This is very much helpful for me. Keep up for this type of good post.
please visit us below
data science training in Hyderabad
it’s really nice and meanful. it’s really cool blog. Linking is very useful thing.you have really helped lots of people who visit blog and provide them usefull information.
Data Science Training in Hyderabad
I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up
Devops Training in Hyderabad
Hadoop Training in Hyderabad
Python Training in Hyderabad
Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post .
Best Digital Marketing Courses in Hyderabad
Very informative post ! There is a lot of information here that can help any business get started with a successful social networking campaign !Business Analytics Courses
I feel a lot more people need to read this, very good info!. ExcelR Data Analytics Courses
Excellent effort to make this blog more wonderful and attractive. ExcelR Data Analyst Course
ExcelR provides Business Analytics Courses. It is a great platform for those who want to learn and become a Business Analytics. Students are tutored by professionals who have a degree in a particular topic. It is a great opportunity to learn and grow.
Business Analytics Courses
ExcelR provides Business Analytics Course. It is a great platform for those who want to learn and become a Business Analytics Courses. Students are tutored by professionals who have a degree in a particular topic. It is a great opportunity to learn and grow.
Business Analytics Courses
ExcelR provides Business Analytics Courses. It is a great platform for those who want to learn and become a Business Analytics Course. Students are tutored by professionals who have a degree in a particular topic. It is a great opportunity to learn and grow.
Business Analytics Courses
Business Analytics Course
I think I have never seen such blogs before that have completed things with all the details which I want. So kindly update this ever for us.
Data Science Training
Thank you for sharing this valuable content.
I love your content it's very unique.
DigiDaddy World
It was wonerful reading your conent. Thankyou very much. # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page
Our Motive is not just to create links but to get them indexed as will
Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain
High Quality Backlink Building Service
Boost DA upto 15+ at cheapest
Boost DA upto 25+ at cheapest
Boost DA upto 35+ at cheapest
Boost DA upto 45+ at cheapest
It was wonerful reading your conent. Thankyou very much. # BOOST Your GOOGLE RANKING.It’s Your Time To Be On #1st Page
Our Motive is not just to create links but to get them indexed as will
Increase Domain Authority (DA).We’re on a mission to increase DA PA of your domain
High Quality Backlink Building Service
1000 Backlink at cheapest
50 High Quality Backlinks for just 50 INR
2000 Backlink at cheapest
5000 Backlink at cheapest
I was looking at a portion of your posts on this site and I consider this site is really enlightening! Keep setting up..
DevOps Training in Hyderabad
DevOps Course in Hyderabad
Welcome to CapturedCurrentNews – Latest & Breaking India News 2021
Hello Friends My Name Anthony Morris.latest and breaking news linkfeeder
Very good points you wrote here..Great stuff...I think you've made some truly interesting points.Keep up the good work.
data science course fee in hyderabad
Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing.data science course in warangal
Thanks for sharing wonderful information… I want to share about Signova
Awesome blog. Thanks for sharing such a worthy information....
Angularjs Training in Hyderabad
Angularjs Training in Gurgaon
Interesting post. I Have Been wondering about this issue, so thanks for posting. Pretty cool post.It 's really very nice and Useful post.Thanks
cyber security training malaysia
I think I have never seen such blogs ever before that has complete things with all details which I want. So kindly update this ever for us.
full stack developer course with placement
wordpress design agency in united states Need professional WordPress Web Design Services? We're experts in developing attractive mobile-friendly WordPress websites for businesses. Contact us today!
swift kf4a fusion splicer price
NICE BLOG Immigration Consultants in Coimbatore, Immigration Services - Oxford migration
Post a Comment