A First Look at Nokia WRT Plug-in for Aptana Studio 2.0

Published by at

The Nokia WRT Plug-in for Aptana Studio was first released earlier this year. The current version includes support for the WRT 1.0 API and previewing full screen widgets. The next version builds on solid foundations to add support for the Platform Services API and Nokia N97 home screen widget previewing.

It is possible to create WRT widgets with any web authoring package and a zip tool – they are after all simply a collection of standard web content files - HTML, CSS, JavaScript, and images - along with a configuration file that are all packaged in a zip. However, a tool could certainly streamline the process and this is where the Nokia WRT Plug-in for Aptana Studio comes in.

Nokia has a wealth of experience with the Eclipse platform, from the development of Carbide.c++ and Carbide.ui. As Aptana Studio already has a reputation as a powerful web authoring environment and is based on Eclipse, focusing on this tool for the first WRT widget development tool is a logical move. Given the number of web authoring tools in use, a plug-in approach (rather than developing, say, Carbide.wrt) may signal that Nokia is considering support for other tools too.

The current WRT widget plug-in is available from within Aptana Studio, by opening My Aptana, selecting Plugins, and clicking Get it against the Nokia WRT Plug-in for Aptana Studio (currently the last plug-in in the list). Once installed the plug-in is easy to use – particularly if you have looked at the Forum Nokia QuickStart page or downloaded the QuickStart Guide.

In summary, the current plug-in offers features to create a new widget (that can be based on flickr or RSS feed templates) and import an existing widget project. Code completion is supported for the WRT API 1.0 JavaScript extensions. Then there are features for widget previewing, debugging, packaging, and deployment.

The 2.0 version of the plug-in builds on these features incrementally, so any existing user should be instantly comfortable with the update. 

The first new feature allows WRT widgets to be imported directly from a *.wgz installation file (in addition to the existing ‘project’ based import). A handy feature, particularly if you want to take a look at how others have created their widgets.

Importing directly from a widget package

The next new feature is full support for the WRT API 1.1 JavaScript extensions in Aptana’s code completion facility. This means hints and descriptions for the Platform Services APIs are provided, a feature which is particularly helpful in learning the APIs.

Code completion for WRT API 1.1

There have been significant improvements when it comes to previewing widgets. In line with the WRT API 1.1 support in code completion, the preview now provides simulation of Platform Service data, so a widget can read a set of sample data (provided in editable JavaScript files) and save any entered data for the duration of the preview (there is no permanent storage). This feature means developers are given enough capability to test a widget’s interaction with Platform Services, without having to rely on an S60 SDK or device.

The preview now includes a home screen mock-up for widgets that include a ‘miniview’ for the Nokia N97 home screen. At first sight this addition is not obvious as every preview opens in the full screen and nothing on the preview shows how to open the home screen view. However, when the widget’s exit option is selected the preview changes to the home screen (or, for widgets without a ‘miniview’, the display shows the application menu icon and description.) The full screen can then be reopened by clicking the ‘Return to full view’ button or application menu icon. A ‘show home screen view’ button might have made this new feature more obvious, but once learnt it is simple enough to use.

Preview of full screen and home screen widgets

The last major change in the preview is that the current toolbar, which provides a list of devices, has been replaced by a more generic settings dialogue. This dialogue enables the selection of a supported screen resolution and its orientation, as well as the WRT API version to be used. It is doubtful that any widgets would be targeted at a specific device, so this change seems sensible. It also overcomes the need to update the plug-in each time a new device is released.

New settings dialogue

The same preview is also available if the option to run a widget in an external browser is chosen. The advantage of an external preview is that a WebKit based browser, such as Safari or Chrome can be used, which should offer rendering closer to that of an S60 device.

The main challenge that remains is that of full PC based testing. At the moment this relies on downloading one of the all-in-one S60 SDKs. The issue here is that the SDKs are large and have an installation process that involves some additional manual steps. This makes the SDKs a little cumbersome and complex compared to the simplicity of widget development. It is possible, in most cases, to skip straight to a device for testing, but that’s not yet possible for any Nokia N97 home screen widgets. At least the Nokia N97 SDK eliminates the harmless, but worrying, error message issued when a widget is installed on the emulator.

The plug-in is currently in beta and still has a number of features that are not final, however, the new features worked well. Overall 2.0 is a good step forward in supporting widget developers with a comprehensive set of tools.

For the next month or so you will need to be a member of the Forum Nokia Pro, Launchpad, or Champions programs to get a copy of the 2.0 plug-in.