Amphibious Portlets

JavaFX     Combination of JavaFX and Portlet 2.0 technologies make it possible to develop portlets that can live outside of a portal page and outside of a browser and run as desktop applications. JavaFX can be used to develop very rich UI, thus can be used as client-side presentation technology. Java 6 update 10 allows to drag-n-drop applets running inside a browser to your desktop. Portlets on the other hand can execute the business logic and talk to the enterprise data services, behind the firewall, thus adding security. And most importantly, portlets allow the user to save the personal preferences on the portal.

To see the net result of this combo, watch this demo developed using Project WebSynergy, which is Sun's next generation aggregation and presentation platform built on Liferay.

The portlet implements serveResource method. The portlet view jsp includes the JavaFX widget and passes the resoruce url as an applet param. The widget makes a serve resource call and gets a JSON object from the portlet and paints the scene. After dragging onto the desktop, when asked to save, it uses jnlp persistence to save the resource url as a muffin, so next time it is invoked it can use the same url. If user wants to be remembered and be able to access the resource url without being asked for authentication again, then the remember-me and other cookies can also be saved as muffins. This is what is done in this proof of concept.

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-6466418-1"); pageTracker._trackPageview(); } catch(err) {}</script>
Comments:

Prashant,

This is really cool. This provides the functionality of the old detachable portlets in Sun PS 6/7 but with so much more functionality.

Question: does the desktop application start its own session with the portal each time it is started? Does that mean it is saving credentials somehow?

Posted by Tom Mueller on November 29, 2008 at 10:08 PM PST #

It saves the cookies. It uses the remember me cookie to avoid re-auth. But in the final implementation, it should ask the user if he wants to be remembered on this computer. Or assume so, if the user has checked the "Remember me" checkbox at the time of login. If the user has not chosen to be remembered, then login should be performed.

Posted by Prashant Dighe on November 30, 2008 at 12:01 PM PST #

Cool! I guess the application itself (jar) resides on the server so like with Java Web Start a new version will be downloaded if available?

Posted by Andre Wiik on December 03, 2008 at 08:11 PM PST #

Andre,

Thats correct, the jar will get updated via web start.

Posted by Prashant Dighe on December 04, 2008 at 07:34 AM PST #

Is there a version of this portlet that I can download and deploy in Liferay?

Posted by Gordon on February 11, 2009 at 06:36 AM PST #

can you provide the sources? Is it available in WebSpace?

Posted by Steffen Schuler on February 21, 2009 at 08:20 PM PST #

This portlet is not available in WebSpace yet but we plan to checkin the sample code into Liferay plugins soon.

Posted by Prashant Dighe on February 21, 2009 at 10:46 PM PST #

Prashanth,

We would like to use the javaFX portlet for our site which runs on websynergy. Can you provide the portlet for the same.?

Renjith

Posted by Renjith Aryaveedu on April 02, 2009 at 04:23 PM PDT #

you can download a simple javafx portlet at http://teeundsushi.de/JavaFXPortletTryout.war

This war file should run within the latest Liferay or WebSpace appserver. (I used LF 5.2.2 + glassfish).

Posted by Steffen Schuler on April 18, 2009 at 02:29 AM PDT #

you can download a simple javafx portlet at http://teeundsushi.de/JavaFXPortletTryout.war

This war file should run within the latest Liferay or WebSpace appserver. (I used LF 5.2.2 + glassfish).

Posted by Steffen Schuler on April 18, 2009 at 02:30 AM PDT #

We tried to deploy a simple JavaFX application as a portlet, but the only result we achieved was a grey box inside the portlet view. JavaFX loads but nothing happens.
There aren't any exceptions so we don't know what we did wrong.
Do you have an explanation or could you please provide the sources?

Posted by Peter Debicki on September 06, 2009 at 10:19 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Prashant Dighe

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today