Much as been made recently of the potential availability of a scripting language for Symbian OS, but there is one already available – at least if you want to provide scripting in your application
Back in January Lee Epting, Nokia's VP of Developer Relations was reported by The Register to be suggesting that Nokia would make Perl available for Series 60. The reason for doing that was that the other language options, C++ and Java, are "overkill for simple forms-based applications that are typically knocked up by business managers, rather than developers" according to The Register. Subsequently Nokia changed tack slightly and suggested Python is its scripting language of choice.
Regardless of the relative merits of Perl and Python the implications of these reports was that developers would want scripting capabilities on a Series 60 phone, let alone one based on UIQ, would have to wait. However that is not strictly true, as since March 2003 the open source scripting language Simkin has been available for Symbian OS.
Simkin started life in 1995. At that time Lateral Arts' Simon Whiteside was involved in the development of "Animals of Farthing Wood" an adventure game being produced by the BBC. Simon was asked to produce the game code. "When I started the project it became clear that while the games designers had clear objectives for what they were trying to achieve the detail of much of the game were not defined," says Simon. "Faced with the prospect of rewriting section of the games as the design progressed, which written in C running on Windows 3.0, I realized was going to be time consuming, I looked for some alternative solutions." Simon's initial solution was to allow the game to be manipulated using configuration files, but as time progressed the need for an expression evaluator was identified and later the loops were added to give greater control and flexibility and so the scripting language emerged.
From the Farthing Wood project Simon took this technology with him to a project for Sibelius the best selling music notation application. The developers of Sibelius wanted to add a macro language, to provide Sibelius with a macro capability similar to the facilities available in a word processor. Simon created this feature using Simkin to provide the Sibelius plug-in.
When Simon left Sibelius in 1997 he decided to make Simkin available as a product and after productizing it spent about 6 months working on licensing the product. In that period he sold a couple of licenses but eventually realized that his core interest was in bespoke applications development. Rather than let the product die Simon made the decision to release it as an open source project. So in 1999 it was released through Sourceforge. "Simkin certainly gained interest as an open source product," says Simon. "I received a lot of feed back and several bug fixes so I was happy that open source was the right way to go with Simkin."
Since Simon open sourced Simkin he has developed Java and XML versions as well as pilot J2ME version.
The Symbian version started with an inquiry from Hewlett-Packard in early 2002. Hewlett-Packard Research Laboratories, Europe were running the Bristol Wearable Computing Project in partnership with Bristol University. The project involves looking at various applications for wearable computing devices from applications such as games to guides. One application provides a guide to the works in the city art gallery fed with information from wireless access points, which had been set up around Bristol. As part of the project HP wanted to build an interactive game to run on the HP iPAQ. To provide the games with a simple mechanism to customize it, they approached Simon to port Simkin to the iPAQ and so provide the ability to use XML schemas to describe elements of the game.
"Once we had done that HP wanted to extend the project to use phones," says Simon. "They had identified Symbian OS phones as the emerging technology in this arena and they asked me to do a port." Through contacts Simon approached Symbian who provided comprehensive support in porting Simkin. However HP did not proceed with the use of Symbian phones in the wearables project, although Simon notes that there has been a fair amount of interest from Symbian developers since the port was made available through Sourceforge.
In porting to Symbian Simon wanted to retain source code compatibility with the other versions of Simkin. "Maintaining compatibility created two main challenges due to the fact that Symbian C++ does not include the ability to process C++ exceptions and you cannot use the Symbian leave process in a C++ constructor," says Simon. "I managed to overcome most of these problems by using C++ macros, part of which I had started for the HP port as Windows CE also lacked support for exceptions. In the most part this approached worked but still there were some placed that needed particular code for Symbian."
Simkin is not a language that can be used to develop applications from scratch. As Simon describes it "Simkin is a language that can be used to configure application behavior, I call it an embeddable scripting language. So it bolts onto an application to allow a script to make the final decisions about the applications behavior or allows users to control aspects of what the application does, but the real functionality is still in the host application." Simon believes Simkin is well suited to games, where performance is an issue, as the intrinsic games functions can be developed in C or C++ but then controlled by the light weight Simkin. "Using a conventional scripting language would simply not be possible for that type of application," says Simon.
Sample Simkin Text Adventure game running on the Nokia 6600.
Another potentially useful application is in creating configurable user interfaces where Simkin allows the application layout and function to be controlled with an XML file. Simon created a simple calculator application using this technique which generated significant interest when Simon demonstrated it at Exposium, Symbian's annual conference, last year.
Sample configurable calculator running on a Sony Ericsson P900.
The calculator application, along with a simple text adventure games, both for UIQ and Series 60 are available from the Simkin web site.
Another not entirely obvious use is testing. "If a developer builds Simkin into their application from the start it's possible to give testers a simple way of scripting regression test suites without the need for a separate testing tool," says Simon.
The future of Simkin for Symbian OS is now very much in the hands of the open source community. Although Simon now spends most of his time working on bespoke development projects commonly convergent project blending web, desktop and wireless he would clearly be interested in developing an optimized Symbian port of Simkin "if there was some funding available."
Simkin potentially offers the mobile developer and "business manger" much more than a conventional scripting language. In environments where computer resources are constrained the ability to deliver intrinsic functionality in C++ or Java and then allow it to be manipulated by a light weight language like Simkin could provide the ideal balance between performance and flexibility.
Web: www.simkin.co.uk |