Introducing jDojo!

Ok, I don’t really have any authority or any involvement whatsoever with jDojo but I figured I would introduce it on my site.  I am going to be checking it out more closely going forward and seeing what benefit it really gives us.

You will need to register to get into the jDojo site so go ahead – I think it is well worth it.  The latest version now has support for Dojo 1.4 – which tells me these guys are making sure the community has the ability to support very current API’s.  I didn’t get to see the EclipseCon session Michael gave but it looked very interesting and also gives a great summary of what jDojo is.

“The programmer does not program against the Java JDK classes, but against Dojo and JavaScript stubs that JDojo provides.”

I would really like to see a good comparison to how jDojo compares to GWT and the advantages and disadvantages of both – I have some high level ideas but it is clear these two projects are attempting to do something similar (make web 2.0 development easier).   It is very clear that large enterprise JavaScript applications are a bear to manage and tools like these kinds of tools make it very easy to quickly create cross browser applications based on HTML, CSS and JavaScript.  The thing I love best about jDojo is the code you write looks almost exactly like JavaScript so you aren’t really “compiling” per say.  The benefits you get are typed programming and error checking right within Eclipse.  From the main page of the jDojo site here is a summary of the key benefits:

The benefits in summary..

  • The JDojo programmer can now write its Web UI code using the features of the Eclipse Java tooling.
  • The JDojo compiler ensure that correct Dojo and JavaScript code is generated (no missing/unnecessary commas, brackets etc) but also automatically handles things like the list of ‘required’ statements.
  • Type information is now part of the code, and not of the documentation anymore.
  • The programmer still deals with the DOM, browser environment etc, having the full control over all the details.
  • Existing code can be easily integrated by writing a JDojo stub for it.
  • The generated JavaScript code matches the style of the existing code and can co-exist easily in the same project.

Why GWT is a great concept.

One of the most powerful aspects of tools, samples, templates, etc is the fact that most developers learn by example.  So while the last post I put here (Is GWT the future of web development?) went viral on the internet and you heard many rebuttals, affirmations, and other comments, there is one fact that remains – GWT is a very cool technology that “hides” a lot of the complexities of creating state-full web applications that implement Web 2.0 functionality.  It also does another thing, it gives Java developers a bridge over to JavaScript/HTML programming.  By writing Java (which the developer is very familiar with) and outputting a Web 2.0 application it immediately gives the Java developer a one-to-one relationship – or at least GWT’s interpretation.

I think of compilers and tools like this as a point in time technology.  It will be great in the beginning but in the end the developer will rarely “compile” the web application and possibly just edit the output directly – or rewrite it from scratch.  The problem I see is the steep learning curve so the latter part of that  statement may be a while.

I relate things like this to MFC, MFC was great for C/C++ developers but once you learned what MFC did under the covers for the most part many just went around MFC and removed the bloat.

So if Google and the open source community do this right, GWT may stay around for quite a while.  If it ends up creating “bloaded” applications then I think in the end it will not survive.

Lastly, it looks like this approach is gaining popularity.  From the comments there were a couple of open source projects and even a commercial project Vaadin that essentially do the same thing.

Is GWT the future of web development?

Pretty much most people who live in the technical world have seen, played with, or heard of GMail and all of the other applications like Google Wave.  Ever wonder how applications like these can be created?  Well, you should check out the Google Web Toolkit (GWT).  I started playing with this last week pretty heavily and I have to admit the concept is very intriguing and I think this stuff may have some legs.  The idea is you get all of the benefits of the Eclipse IDE (coding, type-ahead, debugging, etc) for your web applications but you actually write Java!  The cool thing about this is you get to continue coding in Java and the end compiled result is a slick Web 2.0 application based on JavaScript.  The GWT compiler supports the vast majority of the Java language[1].

You can check out the GWT API Reference guide to get a better feel for what kinds of UI are possible out of the box.  There is also a basic widget library available for immediate use and if you are not satisfied with those you can always create your own custom widgets.  What I really think has been done well (although I am not an internationalization expert) are the  different techniques you can use for internationalization.  Debugging is a huge bonus, you can now easily develop and debug your JavaScript applications right within Eclipse by debugging your application using the regular debugger.  The compiler’s generated output is simply a few JavaScript and HTML files, along with other public resources (css, images, etc…).   All you need to do to deploy your application is to put these resources on your web server[2].

So why is GWT so cool?  The key I believe is in attracting Java developers but also for the JavaScript optimizations it does for you in the JavaScript output.  You get obfuscated JavaScript files that are optimized for all of the major browsers – something you would have to first know how to do and then usually have to do it by hand.  You can also completely extend the GWT SDK with your own additions!  Creating custom services, UI controls, and extensions for your own products and developers.  Lastly, GWT is completely open source.  You can contribute to it or use it by adhering to the Apache 2.0 license model.

I am sure we will be hearing more of GWT and I would like to hear other opinions on this approach to Web 2.0 development.