|
» Two things that go well together: Web Runtime and Java » Photos from JavaOne08 » Performance discussion at JavaOne » Ready at the JavaOne conference » What I like about WidSets |
|
» June 2008 » May 2008 » April 2008 » February 2008 » January 2008 » December 2007 » November 2007 » October 2007 » September 2007 » August 2007 |
|
|
Subscribe RSS 2.0 feed |
Subscribe Atom feed If you wish to receive email notification, please here » |
|
» All About Symbian » Symbian One » My-Symbian » Symbian.com » S60 Tips » S60 Freeware » Symbian Freak |
» Darla Mack! » Mobile Jones » MobHappy » The Mobile Weblog » Gadgets 4 Fun » Christian Lindholm |
Web Runtime and Java makes a delicious combination. They are the milk and cookies of S60 runtimes, tasty when consumed alone but delicious when together. Why should not they be, Java provides access to almost all the local device features today and web runtime brings all the goodness of the Web 2.0 applications and web based UIs.
I know you think that Java and Web Runtime does not have any built-in interoperability today, and this is almost true. So what is the catch? How can you create a widget that uses java APIs?
Starting with the S60 Feature Pack 2, java runtime introduced the new UI toolkit for Java, namely eSWT. eSWT includes an amazing component called Browser. Browser is one of the ~40 components of eSWT and its purpose is to provide access to the platform's native web browser. In our case, this is the S60 Browser Control. Using eSWT's Browser you can embed a browser into your Midlet. The end result is a Midlet that hosts S60's WebKit based Browser. Although it is not the purpose you can actually create your personal Browser with it, there is is a simple example on Forum Nokia wiki demonstrating this.
So what is the web runtime connection? Just like eSWT's Browser, the heart and soul of Web Runtime is S60 Browser. When eSWT initializes its Browser component, eSWT pretty much enables similar functionality to Web Runtime. As a result, all the AJAX programming available with Web Runtime is available but this time embedded inside a Midlet. Of course being embedded into a Midlet has advantages. Your web widget can now access all the local resources, use APIs like location and PIM and generate the content with the help of these Java APIs and set it to the Browser. It is even possible to mash up the local data with the online services, (Google Maps, Flickr etc.)