Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Web Toolkit vs Straight Javascript for reasonably large & complex application?

I've got a web conferencing client written predominantly in Java/Swing with some JNI native modules for stuff like: video, audio, and desktop sharing. In total the client is about 400k lines of Java code not including native modules.

We are investigating a long term plan for migrating away from Java/Swing and toward HTML5/Javascript for the client. As of right now, browser support is shaky/non-existent for some of our needs such voip, web cam video, and desktop sharing. So in the short term we could perhaps ship a browser plugin to do these things along with HTML5/JAvascript to do everything else.

For something of this complexity (basically a rich desktop client being ported to the web) what would make more sense: GWT (Google Web Toolkit) or straight Javascript using a JS library such as jQuery ?

EDIT: There are currently 5 developers working on this project.

like image 479
bradforj287 Avatar asked Jan 20 '23 10:01

bradforj287


2 Answers

If you have programmers with Java background, there are plenty of reasons why to use GWT:

  • powerful statically typed language also @client side
  • rapid development (!!!)
  • tools! IDEs, PMD, FindBugs and gazillion other. Also configuring Eclipse with Google plugin is just piece of cake, unlike many other frameworks.
  • permutations for various browsers are already handled by GWT itself
  • your JavaScript is optimized - handled by GWT
  • you STILL CAN use plain JavaScript if you want (however GWT is designed the way you don't have to)
  • GWT is really scalable. Your Java back-end will stay true Java, so you can use whatever favorite powerful java libraries
  • client side development is quite robust and Swing-like, not too hard to find a programmer to fit there

And many others. Honeslty, JavaScript is still quite slow (okay not to troll - language doesn't have "speed", but you get me). It doesn't matter if you are using jQuery or GWT. Face it, it isn't going to perform as fast as thick client. So why to sacrifice your comfort :)

like image 105
Xorty Avatar answered Apr 07 '23 17:04

Xorty


Take the google wave product as an example. It was merged from plain old javascript to GWT to support more rapid development, especially considering the many developers concurrently working the project.

In my experience, manually hacking a site of what you're suggesting with jQuery would be an awful lot of work which most likely will suffer from refactoring issues, difficulty to reuse code, and probably end up with alot of code that will be really hard to grasp for any new developers coming into the team.

Don't get me wrong jQuery is really great javascript tool; but when writing complete applications in it, it quickly becomes unmanageable. That's at least my opinion.

like image 38
Johan Sjöberg Avatar answered Apr 07 '23 16:04

Johan Sjöberg