Main Advantages of using GWT against other technology like [jsp,spring,javascript...]

467 views
Skip to first unread message

abdullah

unread,
Sep 5, 2014, 10:53:24 PM9/5/14
to google-we...@googlegroups.com
Hi,
 I am newbie to GWT and started developing my application using GWT.I would like to know what is the main advantages for going to GWT since we have lot of technology like JSP,Struts,..Can anyone give me suggestion on this?

jonl

unread,
Sep 6, 2014, 1:10:12 PM9/6/14
to google-we...@googlegroups.com
The thing is, its not an either or proposition. GWT is java AND javascript. You can uses jsps to create the page that your gwt module resides in. You can use spring to manage your beans and secure the client and server side of the application. I would say that struts might mot offer much in integrating with a GWT project but it would be possible to integrate them. As far as js libraries go, there is nothing to prevent you from integrating any particular js library that you wish.

Dennis Haupt

unread,
Sep 6, 2014, 1:10:13 PM9/6/14
to google-we...@googlegroups.com
ide support. less technologies in total.


2014-09-06 4:53 GMT+02:00 abdullah <mohammeds...@gmail.com>:
Hi,
 I am newbie to GWT and started developing my application using GWT.I would like to know what is the main advantages for going to GWT since we have lot of technology like JSP,Struts,..Can anyone give me suggestion on this?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

emurmur

unread,
Sep 6, 2014, 2:13:59 PM9/6/14
to google-we...@googlegroups.com
Of course, the requirements of your particular application are the main gating factor for any choice and we don't know what the applicaiton is.  But generally speaking, GWT is great for single-page applications; applications that run in the browser but act like desktop applications.  Rather than loading page after page and keeping data in a database-backed session, your applicaition runs on a single page and keeps most of it's model in the client until it needs to persist it.  The results is a more fluid user experience.

JSP/Struts are great for creating traditional web pages with dynamic content.  The user's session data (model) is kept in the server's database and when a page is requested, that model is used to render user-specific content into the page before it is returned to the browser.  The advantage of this model is the central control the server provides. 

If your application is heavily content oriented, then serving it as a set of pages makes sense.  If you are running a lot of business logic (beyond things like form validation) on the client, then you will want to use a language and tooling for that logic that supports good software engineering practices.  The two things ares not mutually exclusive; you may use JSPs to write that basic DOM and a JSON model into the page and use logic in GWT to run the page.  However, I would look to make a binary choice at first; I am delivering pages or am I writing a application;  If you are delivering pages, traditional web technology works well.  If you are writing an application, something like GWT will help you create a modern, browser delivered application. 

Ed

Ronan Quillevere

unread,
Sep 8, 2014, 4:19:13 AM9/8/14
to google-we...@googlegroups.com
My opinion

-> No javascript developer
-> Statically typed
-> Use JavaScript
-> Multi-browser / mobile support
-> Open source / free

Vasu

unread,
Sep 9, 2014, 4:49:47 AM9/9/14
to google-we...@googlegroups.com
I have created details list advantages that one can get using GWT have look at it http://www.pandurangpatil.com/2012/09/benefits-of-using-gwt.html 

Néstor Boscán

unread,
Sep 9, 2014, 9:59:09 AM9/9/14
to google-we...@googlegroups.com
For me the advantages are:

1.- If your application needs to feel like a desktop application this framework is as close as it gets.
2.- Because almost everything runs on the browser side you use less server processing and you can scale to more users. You can even create apps that download on the first access and then work without accessing the server.
3.- Because almost everything runs on the browser you need less server-side session information vs a framework like jsf. This means less complication when replicating sessions in a cluster.
4.- No javascript programming which is hard to test, and check that it works on multiple browsers.

Disadvantages

1.- The widgets in GWT are not pretty or offer lots of functionalities like data tables, context menus, etc. For that you need something like Smart GWT.
2.- Because it behaves like a desktop app, when you test, you have to test from the first page which leads to long testing cycles.
3.- Speaking of testing, you can't use tools like JMeter to test the app because it doesn't behave like a web app. You need to use it's own testing classes. Haven't use selenium.
4.- If you need your app to work like a web app it will not feel like a web app.

Personally I would use GWT in all my projects. I've seen it scale very well in production enviroments.

Regards,

Nestor

Joseph Lust

unread,
Sep 9, 2014, 12:29:16 PM9/9/14
to google-we...@googlegroups.com
Good points nestorjb, but I wanted to embellish a few:

2.- Because it behaves like a desktop app, when you test, you have to test from the first page which leads to long testing cycles.

If you use a Places/Activities pattern, such as in GWTP (GWT Platform), then you'll have page state serialized to the URL. In this case, you can jump right to a page in your tests. If you're using Selenium, you can reuse steps, so even if you had to start from the login page for each test, you'd only write that code once.

 
3.- Speaking of testing, you can't use tools like JMeter to test the app because it doesn't behave like a web app. You need to use it's own testing classes. Haven't use selenium.


If you use a pattern like GWTP or similar, where very few files are served after load, then it's the RPC/XHR's that are all the server load. Using JMeter you can indeed test these. Assuming that you push your static content off to a CDN (CloudFlare, S3/CloudFront) then you really don't need to load test those parts, but you can if you like.

Using a Java based framework (GWTP) makes testing Selenium (w/ Java) easy because you can use the same URL builders (PlaceRequests) directly in Selenium and jump straight to the pages under test. Essentially no hardcoded literals at all! Frankly, my only problem when testing GWT from Selenium is that the tests go so fast the DOM cannot keep up, but a half dozen decorators to wait for elements to be rendered to the page and the tests fly along. That shouldn't be a big problem since you can test your presenter logic in pure JUnit and run those tests in a few ms. The Selenium is really for smoke testing and integration testing of login/workflows.

 
4.- If you need your app to work like a web app it will not feel like a web app.

What does a webapp feel like? For me it feels like the pages load instantly and the browser history/URL's look like I've actually been bouncing around the pages. True, it does not do classic postbacks on every page interactions, but I call that a plus. As long as you serialize your places to the URL F5 and bookmarks will work like any other webapp as well. 



I would add a con though:
  1. With GWT you've got to know and think about what you're doing. GWT will do every best practice under the sun for your and make your app run about as fast as possible with no memory leaks without you needing to be an HTML spec/browser maven. GWT will practically guarantee that you're app will run properly if it compiles. Conversely, many people would rather use a hard to maintain JSP/PHP framework rife with security holes, problems, and highly verbose configurations because it appears easier to get out the gate and do simple things with. So, if you want to use GWT, you'd best read the manual, otherwise stick with a simple framework.

Joe

Jens

unread,
Sep 9, 2014, 1:08:38 PM9/9/14
to google-we...@googlegroups.com
I would add a con though:
 
Another "con":

Because GWT is so Java'ish people often think they don't need knowledge of CSS / HTML / JS at all when using GWT. However reality is that sooner or later you will need knowledge in these areas. You don't have to be experts but you shouldn't be afraid of CSS / HTML / JS either. You have to know the platform you are developing for: the browser.


-- J.

Joseph Lust

unread,
Sep 9, 2014, 3:20:53 PM9/9/14
to google-we...@googlegroups.com
Amen Jens. If you're going to be a web developer, you'll need to know about the web. GWT doesn't hide you from JS/CSS/HTML/HTTP entirely, it just makes them work well with Java and Java patterns in a highly optimized way.

Sadly, many a manager I've championed about GWT don't want to hire expert web developers. They don't want a superior development product. They want a framework that can be used by the least skilled developers, hired en masse for the lowest possible pay to shove a minimum viable product out the door with maximum haste. If that's you're goal, GWT's not for your product/project. Personally I'd not work at such a shop, but there are plenty of them out there.

- Joe
Reply all
Reply to author
Forward
0 new messages