Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why should I use jQuery instead of GWT? [closed]

I need to decide between jQuery and GWT for my new project.

I haven't programmed in JavaScript for a while, and I was looking into GWT for the last few days. It looks pretty awesome, generating all the different JS for different browsers and all, however:

  • developing in Java takes more time than the same thing using jQuery (at least for this project)
  • the documentation is poor (for example, how should I know which elements should I use when designing the page? -- there's not enough documentation for this)

I've been using jQuery for most of my projects and it's pretty good.

I want to convince the client that jQuery is better suited for this project and I need more arguments to support this.

like image 884
BobiYo Avatar asked Jul 30 '09 08:07

BobiYo


People also ask

Is GWT popular?

GWT (Google Web Toolkit)It is more popular than native JSF as it makes it easy to maintain complex JavaScript user interfaces with Java code.

Is GWT front end?

Google Web Toolkit (GWT /ˈɡwɪt/), or GWT Web Toolkit, is an open-source set of tools that allows web developers to create and maintain JavaScript front-end applications in Java.

What is GWT in JavaScript?

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.


Video Answer


1 Answers

I would go with JQuery.

I once maintained a GWT project that eventually forced me to re-write it twice. First as a refactored GWT app, second in JQuery.

I haven't touched Javascript seriously for a very long time. The last time was about 2002. I'm a Java developer so my first impression of GWT was awesome. But that was just the impression.

Problems I found with GWT:

  1. It forces you to follow its client/server structure. In the end all I want is AJAX and those good widgets. GWT's widgets by itself don't seem that good-looking. Aesthetically, I prefer Adobe Flex! But to keep the comparison closer, JQuery's UI looks better than GWT's. In addition you have that wonderful Theme Roller support from JQuery.

  2. I've tried DWR. It's great. It's far easier to enable AJAX in your Java code using DWR than GWT.

  3. If you're using GWT, eventually you will be forced to learn JavaScript. Arjen of SpringSource once said about XML and SOAP (though not the exact quote): "How can you develop WebServices and not know XML? SOAP is XML. You can't avoid it". Same thing with GWT. It's still Javascript in the end.

  4. Realistically, Javascript isn't that hard to learn vs Java. More people know Javascript than Java. Even web designers know it. You're a programmer, and you're scared of Javascript?

  5. Back to the project I rewrote. When I rewrote our GWT application it took me almost two months to rewrite it. With JQuery it took me two weeks, and I was rusty with JavaScript.

  6. With JQuery you don't really write hardcorde JavaScript. That's why you use JQuery in the first place. Maintaining code with GWT is horrible. You wanna see the latest changes you did in the code... go compile... wait for GWT... 5 minutes... rinse... and repeat and hope it doesn't throw an error. If it does, you'll be recompiling again, and waiting for another 5 minutes. Rinse and repeat. With JQuery change a line, refresh your browser. Done.

I know I'm not being objective here, but I'm just sharing my experience :) The moral is don't be scared of Javascript. Google uses Javascript anyway

like image 136
chris Avatar answered Oct 21 '22 10:10

chris