Can it be true? HTML 4 Java, at last?

Two events recently conspired to make me suddenly understand Jaroslav Tulach's most recent amazing project. The first was a comment I received in this blog a few days ago:

I was wondering... why Java is not in a position where it is using HTML, CSS or Javascript for its GUI? Java Swing has lots of limitations for UI designers and also it is tedious. Frankly... it is old! Where using HTML bootstrap, CSS all of the UI requirements are already taken care of. I know that JavaFX introduced the web browser in Java and sadly attempted to introduce a FXML style GUI but it is a bit clunky. Bit unnecessary to learn something new with not much gain! Why not develop a solution where the front-end of a desktop java application will use HTML5 and the backend will use good old Java for carrying out bulk of the work. Java already has a great reputation... why not combine it with the best of HTML, CSS and Javascript for desktop applications?

 Now, I must say that I disagree with both points, i.e., re Swing and JavaFX, I think both are great, really great, no reservations on either of them... for the purpose for which they're intended to be used, i.e., for their place in the world, they serve that place well. However, let's leave aside that whole discussion for the moment and focus on the other point made above, that is, that HTML, especially the goodness of HTML5, could be an alternative way to provide a frontend on top of Java on the desktop.

The second event, which really brought the point home for me was an article that came through on Twitter entitled "Creating Desktop Applications With node-webkit". The article lists all the reasons why web applications can suck, e.g., "when using browsers one’s control of the user interface is limited", browser variance, and security issues. And then the Node WebKit is introduced, "to take the pain out of offline single-page application development".

 OK, now I get it. Java on the desktop is great, at last there's a general acceptance of that, as opposed to the continual process of throwing out the baby with the bathwater. However, what both these divergent sources are pointing out is that, in the same way that the Java EE world enjoys having the option of incorporating HTML5 front-ends, let's have the same opportunities for the Java desktop. 

And, with that background, let's take a look at Jaroslav Tulach's latest project. 

Start by cloning from Git, the following:

hg clone -r 7c26d20c0b0f http://hg.netbeans.org/html4j/nb/ 

What you now have 

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« March 2015
SunMonTueWedThuFriSat
4
14
15
16
22
27
28
29
30
31
    
       
Today