Francois Orsini's Blog

Embedding Derby in Mozilla Firefox

Tuesday Dec 13, 2005

Today, during Tim Bray's keynote address at ApacheCon, I had the opportunity to present a Derby demo on which I've been working recently.

The application demonstrates the use of an embedded database (in this case Apache Derby) in a browser (in this case Mozilla Firefox). As soon as I get the time, I'll be writing more about the details of this demo. At this point, I'd simply like to thank Ted Leung for his brief description.

I do plan to release this demo to the open source community and will be announcing the details very soon on this blog.

[3] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg
Comments:

Thank! Your demo let me see new apertures motivating and justifying the use of hidden Java Applets in the WEB 2.0 paradigm.

I'm testing on IE 6.0 and it works like a breeze.

Since a bit of modification is needed, I post here on your BLOG what's going to let IE users test your web application demo.

First of all we need SARISSA; a cross-browser ECMAScript library that offer a unified XMLHttpRequest/XML/XSLT/XPath along with some bonus utility methods.

Please visit Sarissa on SourceForge and add <script type="text/javascript" src="js/sarissa.js"></script> exactly after META tags in your index.html page.

In the second place I've exchanged the deprecated APPLET tag with a crossbrowser nested OBJECT solution.

Code example follow, just substitute and run the application.

<object name="ClientStoreService" type="application/x-java-applet" width="0" height="0" hidden="true"> <!-- MSIE (Microsoft Internet Explorer) will use inner object and 1.5.0 Java Plug-in at least --> <!--[if IE]> <object name="ClientStoreService" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" type="application/x-java-applet" width="0" height="0" hidden="true"> <![endif]--> <param name="code" value="derby.embedded.ClientStoreService.class"> <!-- The following PARAM gives dependencies directive --> <param name="archive" value="demo.jar, derby.jar"> <param name="codebase" value="./Java"> <param name="scriptable" value="true"> <param name="mayscript" value="true"> <strong> This browser does not have a Java Plug-in. <br /> <a href="http://java.sun.com/products/plugin/downloads/index.html"> Get the latest Java Plug-in here.</a> </strong> <!--[if IE]> </object> <![endif]--> </object>

Nothing more to add, it works!

Mozilla remains the more stable platform and do not have nasty crash simulating unexpected silly user behaviours.

Best regards, GA.

Posted by Giorgio Arata on November 28, 2006 at 02:36 PM PST #

Thanks for posting these instructions Giorgio - Am going to highlight them in a separate blog entry. I was not aware of Sarissa but now I do ;-)

Posted by Francois Orsini on November 28, 2006 at 03:59 PM PST #

You know, sometime IE stubbornly freeze on particular combinations of nested tags. I won't go into details on all the dead-ends I ran into; avoiding scripted user agent queries with an alternative and functional solution to copy and paste (and mutate..) into your code as you please make the difference sometime.

<!--[if !IE]> --> <object name="ClientStoreService" type="application/x-java-applet" width="0" height="0" hidden="true"> <!-- <![endif]--> <!--[if IE]> <object name="ClientStoreService" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" type="application/x-java-applet" width="0" height="0" hidden="true"> <!--><!----> <param name="code" value="derby.embedded.ClientStoreService.class"> <param name="archive" value="demo.jar, derby.jar"> <param name="codebase" value="./Java"> <param name="scriptable" value="true"> <param name="mayscript" value="true"> <strong> This browser does not have a Java Plug-in. <br /> <a href="http://java.sun.com/products/plugin/downloads/index.html"> Get the latest Java Plug-in here. </a></strong> </object> <!-- <![endif]-->

Posted by Giorgio Arata on November 28, 2006 at 07:39 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed