Saturday, February 19, 2011

Grow Up Java! Proposing Java Desktop Edition

No, this is not another 'Java is Dead' rant. Java is very much alive and kicking. It is one of the best development and runtime platform available. By far the most stable platform of those. And that might just be its biggest bane. Ridiculous! How is stability a bane? You might ask. Well, you can see the slow progress in path breaking innovation, due to it. See the debate on closures and the progress on module system/OSGI.

The Java platform is growing only by a few APIs and small language changes/additions every year. There is no major big innovation happening. All the major changes that has been happening are outside it. Be it the  Dependency Injection, Persistence API, Scripting API, Desktop API, Application Framework API, they were only added to the platform subsequently. But they are just APIs. What we need is something big. Something that is 10 years advanced than today.

What I feel is Java is advancing in a bottom-up fashion. Small and slow changes at a time. What we need is a top-down approach. Think futuristic, design it and then only implement it in a bottom-up approach.

Take the example of new Swing Application Framework (now dropped from the standard). I think this new framework is a poorly envisioned idea. Look at the poor state of JMF. No substantial progress can be made on the desktop without support for multimedia. Yes, JavaFX is coming soon (for 3+ years ?). It is a big step forward but is not a standard (yet. Will it be ever?).

We have the JavaSE and JavaEE is built on top of it. Why can't we do the same with the desktop? Why can't we have something like the Java Desktop Edition or JavaDE ? Put all the big stuffs here. In this way, we can keep the JavaSE simple. Language and VM changes goes into JavaSE. Common APIs applicable to both EE and 'DE' goes into SE. But desktop additions like application framework, multimedia, browsing capabilities, gadget bar?, JavaFX, etc. goes into 'DE'. Of course, JavaME also needs to be considered but since industry's mood is to bring SE to ME, they can be considered the same for the sake of this blog.

Some might argue that the desktop is becoming irrelevant with the popularity of web applications and powerful browsers (with HTML 5). But as any unbiased report will say, the irrelevance of desktop will not happen anytime soon. After all, the browser needs to run on a desktop!

Basically, Java Desktop Edition becomes the new Operating System. It should have transparent integration with the underlying OS. Have functionalities in the form of services and modules on the lines of OSGI. So everything is a service: print service, document service, file service, graphic service, database service, < add your favorite services here >. So advanced capabilities can be exposed as a service to any module or applications (collection of modules) in the system. Imagine having Eclipse plugins as services exposed to all applications.

Think of the innovative possibilities of a Java Desktop (heard it before?):
- Java Browser with built-in support for applets, JavaFX - we can have applet plugins
- Browser can be embedded in any application
- GIMP like editor - JIMP?
- Standard installer for all applications - No OS specific versions of Eclipse or Netbeans (Java WAS supposed to be Write Once, Run Everywhere)
- Finally, a Java media player
- Desktop gadget bar
- Java Office
- < your favorite application here >

It is time for Java to grow up and act its age.

16 comments:

  1. Some of Java desktop software looks pretty nice. Take a look at the software, 'Raid' at http://www.nexpixel.com

    ReplyDelete
  2. Maybe you haven't heard, but there is this tool called ECLIPSE that does EXACTLY what you've just said, and has done it FOR A LONG TIME.

    ReplyDelete
  3. Ermmmm this was already done and failed to gain any momentum back in 2004:

    http://java.sun.com/developer/technicalArticles/J2SE/Desktop/jds2.html

    Ben (Java dev since 1997)

    ReplyDelete
  4. There is some new stuff for Java on the desktop. For example a library exposing the new Windows 7 features for Java (J7Goodies): http://www.strixcode.com/j7goodies/

    ReplyDelete
  5. What about Apache Pivot? I use it and it's very nice. http://pivot.apache.org/

    ReplyDelete
  6. I am not talking about UI framework only. I am talking about a platform similar to JavaEE for servers. A platform that provides all the functionality as services to other applications. There once was JINI but it could not make the cut. Eclipse is single UI and one application. Everything installs into Eclipse. As I said, it should be the new OS. And applications can have their own independent UIs.

    ReplyDelete
  7. @Ben
    Java Desktop systems uses non-Java applications (Linux based). I am proposing all those applications be developed in Java (only possible if the underlying framework is powerful)

    ReplyDelete
  8. There was a desktop widget project called Glossitope:
    http://juixe.com/techknow/index.php/2007/06/11/glossitope-an-open-source-java-based-widget-container/

    Didn't gain too much momentum (I think it was replaced by javaFX) but the sources are probably somewhere on the net.

    ReplyDelete
  9. Eclipse is a wonderful platform but it is complex and has a lot of dependencies between different frameworks. It offers a lot of APIs but no real or ready-to-use solution for app creation. I know that there are some projects for that available. If you create a desktop app with RCP, the package is very large which is not always good. I know that the word Applet is "evil", lets say RIA technology (yes, RIAs are not only Flex). And try to use an RCP app as RIA (RAP is an option, but not the same and don't compare JNLP with RIA).

    I think/hope JavaFX 2.0 is the first step in the right direction but solves "only" UI problems. Apps need more than just a good UI. What about Session Handling, Security Management, simple Action handling, simple object management, predefined actions, ...
    Web frameworks has most problems solved but Desktop apps are different.

    The Java application framework (JSR-296) was a good idea but they had a problem with use-cases or whatever? There is a fork called BSAF from Illya Yalovyy.

    A full-stack application framework for app creation is available with JVx (Apache 2.0). It defines a technology independent UI and has implementations for Swing/QT Jambi and extGWT, solves MVC problems. It has client/server communication, security managers, a persistence API, lifecycle management and much more. It works as RIA and Desktop app without changes...

    ReplyDelete
  10. I totally agree, java can only live,with its vibrant open source community and new products rolling out and stability it gives. We have released http://weaverfx.com called weaverfx which is based on java. The unique thing about weaverfx is once a standalone java application is built it can be moved to web with the same code base and it is extremely lightweight

    ReplyDelete
  11. WeaverFx ist not open source - only the runtime is free. Looks not very professional and some links return 404...

    ReplyDelete
  12. Java is dead : ) Everything is migrating to what the web is providing HTML+CSS+JS for simplicity ... therefore, I believe, JS on the server is something that will be the next big thing (=>nodejs)... If you are able to build desktop apps with web technologies - why do we need Desktop specific apps? If it sounds like a duck and looks like a duck - it becomes a duck!

    ReplyDelete
  13. I agree. There should be an own operating system like jnode.org but more advanced. And an application market using java webstart...

    sadly enough that there isn't much advanced support for multimedia: there isn't even a CDROM/DVD support for playing music or video!

    shame on Sun/Oracle...

    ReplyDelete
  14. How about Java on the web similar to what Adobe does with Flex. A lot of people have invested a lot in java swing desktop systems. It would be great if these systems can be put on the web without major investment in development. Java applets will not work as they are not designed to contain large complex GUI.

    ReplyDelete