Avatar as Alternative for Java Server Faces (JSF) and JavaFX? – JavaOne 2012

Project Avatar was announced at JavaOne 2011. After no further information until JavaOne 2012, some new information was announced at this year’s conference. Even a little demo was shown in the keynote. Contrary to JavaFX, Avatar offers the realization of modern web applications without requiring a browser plugin. Web applications are realized with HTML5 and JavaScript (Nashorn implementation) on client-side, and Java EE backend on server-side. Avatar is also suitable for creating mobile applications (smartphone, tablet), because it does not depend on a browser plugin.

Project Avatar was announced at JavaOne 2011. After no further information until JavaOne 2012, some new information was announced at this year’s conference. Even a little demo was shown in the keynote. Contrary to JavaFX, Avatar offers the realization of modern web applications without requiring a browser plugin. Web applications are realized with HTML5 and JavaScript (Nashorn implementation) on client-side, and Java EE backend on server-side. Avatar is also suitable for creating mobile applications (smartphone, tablet), because it does not depend on a browser plugin.

The difference to other competing HTML5 frameworks shall be the end-to-end development vom client to backend with just one Java framework. Thus, Avatar will compete with other client-side Java frameworks such as Google Web Toolkit (GWT). Avatar shall be easy to use and finally be fun to create HTML5 web applications in the Java environment. In the end, Oracle alone will offer three different alternatives for creating modern web applications: Java Server Faces (JSF) as Java EE standard, JavaFX, and Avatar.

In the meantime, this raises the question of whether JavaFX is still a good alternative for creating web applications. Because of the required browser-plugin at runtime, JavaFX is a bad decision in many use cases. Instead, JavaFX is highly recommended for creating desktop applications (as replacement for Swing), and will be a good alternative for embedded applications (where devices usually do not offer a browser).

Unfortunately, Avatar still looks like a blackbox to me – even after some days at JavaOne 2012. If you google for it, you just find information about announcements from JavaOne 2011 (e.g. http://www.theserverside.com/feature/Project-Avatar-One-HTML5-Strategy-to-Rule-Them-All). There was also a web framework panel at JavaOne 2012 with experts from JSF, Grails, Play, and Avatar. Several questions regarding Avatar could only be answered with empty phrases such as „sorry, as we are not ready for production yet, this answer cannot be answered reasonable“.

In the end, Avatar may become an interesting alternative for creating modern, plugin-independent HTML5 web applications within the Java environment… In the future! However, it is still a blackbox without a website, download, or community. So, developers probably have to wait some more time to get additional information.

If you have any other opinions, or if you can find further information about Avatar, feel free to post a comment…

UPDATE (Day 3 at JavaOne 2012):

I could take a look at some source code of an Avatar project at the Oracle booth of JavaOne 2012. Honestly, I do not like the concepts of Avatar. You write web applications by using a new declarative XML language which uses HTML5 and JavaScript inside. You define your data objects in JavaScript on client-side. You write your server-side code either in JavaScript or via JAX-RS. It’s your choice. Communication is via JSON.

So, the goal of Avatar is NOT to make developing modern HTML5 web applications more fun for Java developer, but the “new” goal is to offer a good solution for web developers (i.e. HTML5 / JavaScript experts). Nevertheless, these web developers also have to learn a new framework around the new declarative XML language.

Due to my first impressions, I would still use JSF, GWT or another web framework instead of Avatar in the future…

BTW: Even after showing some source code at JavaOne 2012, Avatar is still a blackbox because there is no product strategy yet – as one of the Oracle guys confirmed to me. Of course, this is also the reason why there is no website or download available yet.

Best regards,
Kai Wähner (Twitter: @KaiWaehner)

Dont‘ miss my next post. Subscribe!

We don’t spam! Read our privacy policy for more info.
If you have issues with the registration, please try a private browser tab / incognito mode. If it doesn't help, write me: kontakt@kai-waehner.de

2 comments
  1. Honestly, I do not like the concepts of Avatar. You write web applications by using a new declarative XML language which uses HTML5 and JavaScript inside. You define your data objects in JavaScript on client-side. You write your server-side code either in JavaScript or via JAX-RS.
     
    From my point of view, Avatar looks like an alternative to Flex programming.
    * Flex is about MXML  (for GUI definition) + ActionScript (as programming language, that is an extension of JavaScript).
    * Avatar proposes its own declarative XML-based language + JavaScript
    And both could use Java on the server-side.
     
    From my point of view, AFAIK, Oracle proposes 2 alternatives to Flex programming:
    * Avatar, which is an HTML standard-based alternative
    * JavaFX, which is a Java-based alternative : see http://www.jroller.com/dmdevito/entry/javafx_may_be_the_next
     

Leave a Reply
You May Also Like

When to use JavaFX 2 instead of HTML5 for a Rich Internet Application (RIA)?

These days, we are starting a new project for realizing a Rich Internet Application (RIA). One of the first questions is: Which technologies and frameworks shall we use? The backend will be Java or another modern JVM language, as we are mainly experienced Java developer. In most use cases, we also prefer web frameworks, which allow to code mostly in Java, as many of us just have basic knowledge regarding HTML and JavaScript. A decision has to be made for the upcoming project: Shall we use HTML5 or JavaFX 2 for realizing the web client? We took a look at pros and cons, which are listed below in this blog post.
Read More