InfoQ

News

Android Gets Scripting Support with Python, Lua, Beanshell; Ruby planned

Posted by Werner Schuster on Jun 30, 2009

Community
Java,
Ruby
Topics
Scripting ,
JRuby ,
Dynamic Languages
Tags
JRuby ,
Android

The Android Scripting Environment (ASE) add scripting capabilities to Android devices. By installing the ASE, it's possible to write scripts on the device and execute them.

While there are many tools to help with developing Android apps, writing scripts straight on the device allows quick experimentation and prototyping directly on the device, without having to load up the IDE, compile, deploy etc.

The ASE uses two approaches to access Android APIs. Currently, Python and Lua runtimes can be used to run scripts using ASE. These runtimes are native applications, and they access the APIs via JSON RPC.

As Android's based on Java, there's also the option of running JVM languages. Currently, BeanShell, a dynamic version of the Java language, is available. The JVM-based interpreters are simply launched inside ASE, and don't need the indirection of the RPC calls.
The ASE adds a new incentive to get more JVM Languages to work on Android. While JRuby has initial support for running on Android, there remain problems. One issue is Android's use of the Dalvik VM (Android apps are compiled into Dalvik VM bytecodes).

A look at the SVN repository of ASE shows the first signs of JSON RPC based Ruby support.

Another way to use Ruby on Android devices is Rhodes.

It'll be interesting to see how ASE continues to develop. Unlike the iPhone, which doesn't permit applications that bring interpreters to the platform, with ASE, Android devices can now be extended with scripts, which can be created and edited by the user.

No comments

Watch Thread Reply

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.