You Are Here:

Community: Blogs

Jacek Wojciechowski's Forum Nokia Blog

Open source scripting for mobile phones (part 2)

jack44 | 08 September, 2007 12:14

Last time I wrote about TCL based language - HECL. Now, let's go back in time. I believe you still remember DOS and its scripting language (also available in "visual" version in current Windows platforms).

This time I will focus on QBasic language, which is also available for mobiles (Java ME). It's called CellularBASIC and it's an open source project. The scripting language is a dialect of QBASIC 1.1, supporting more than 90 keywords, along with some special features (64-floating point arithmetic, trigonometric, screen I/O, file I/O, SMS sending, network programming, graphics...). The project has good documentation (command reference, keywords with examples).


If you would like to play a little with old QBasic 1.1, you can download it from Microsoft pages or play with CellularBasic directly on the device (editing of code is supported) or PC. For these of you who are not familiar or don't remember the language, the simplest Hello World code is as following:

PRINT "Hello World by Jacek Wojciechowski!"


I wish I had a FDD to read my very old 5.25" floppy disk with my old QBasic apps, but this task is not very easy nowadays ;-)

Open source scripting for mobile phones (part 1)

jack44 | 06 September, 2007 16:48

If you had to create a prototype of mobile application quickly, many of you would probably choose Python - someone may justify this choice by pointing out that you can write and run the code (script) immediately on the device and that other similar solutions aren't so integrated with smartphone's advanced functions. For simpler tasks you can choose Perl, Ruby, Opl (or some others). Such solutions have one substantial drawback - they need operating system to work on, in this case - Symbian. Recently, I've found interesting Java based option (it works with J2ME, MIDP + CLDC based devices). It's called HECL and it's an open source project.


Hecl derives simple, flexible, command based approach from Tcl and it's easy to learn even for people who aren't programmers. Of course, Hecl isn't a 'replacement for Java', but I find it as a complementary approach to Java. It's unlikely that an entire software would be written only in Hecl, so it's interesting how you can integrate Hecl and Java. Generally, there are two ways of doing this:

  • calling Hecl from Java - to utilize Hecl code from Java, you need to initialize the interpreter and then use it to evaluate the code
  • creating Java Extensions for Hecl - write your program in Hecl and add Java extensions to perform specific tasks. This model is very popular with mature languages like Tcl, Ruby and Python, where the scripting language contains all the functionality necessary to write a fully functioning system, and extensions (usually written in C) are needed only to deal with specific tasks.

You can use Hecl for example to script some configuration, automatically get the updates of the application just by downloading a text file (self-updatable script); one interesting thing is that you may have more than one of the interpreters at a time (in java code).


Thus, you don't have to wait for JavaFX Script to appear, you may try similar idea today.

 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZrelationQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX qdcZrelationQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e59E2eowlX qdcZtitleQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qdcZtitleQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qdcZtypeQUqfnZE44istributionQ qdcZtypeQUqfnZSiteQ qdcZtypeQUqvocZTermQ qdcZtypeQUqvocZVocabularyConstructQ qdcZtypeQUqwebZSiteQ qdcZtypeQUqrdfsZE52esourceQ qswZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX quriE71aZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX qvocZpartOfQUqfnZPublicationQ qwebZserviceQUxhttpE3aE2fE2fswE2enokiaE2ecomE2furiE71aX qrdfZtypeQUqfnZE44istributionQ qrdfZtypeQUqfnZSiteQ qrdfZtypeQUqvocZTermQ qrdfZtypeQUqvocZVocabularyConstructQ qrdfZtypeQUqwebZSiteQ qrdfZtypeQUqrdfsZE52esourceQ qrdfsZisE44efinedByQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX qrdfsZisE44efinedByQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e59E2eowlX qrdfsZlabelQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qrdfsZlabelQSxForumE20NokiaE20BlogsE20WebE20SiteXLen qrdfsZseeAlsoQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e58E2eowlX qrdfsZseeAlsoQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fschemasE2fnokiaE2fFNE2d1E2e59E2eowlX