Project Summary

by Stephane Micheloud, July 2010

[Home]
[Back]

Background

In 1996 Sun Microsystems Inc. — the innovative software and hardware company — announced the availability of the Java development environment, a non-commercial software product featuring both a new programming language and a platform-independent execution environment. The success of Java was boosted by the emergence of the World Wide Web and was definitely sealed with its adoption by the software industry as an alternative to the C/C++ mainstream language.

In 2007 Google Inc. — the ubiquitous Internet company — announced the availability of the Android development environment, a non-commercial software product supporting the well-established programming language Java and targeted to the emerging mobile device market. Indeed Google sees — as do its concurrents like Apple Inc. — in the increasing availability of wireless connections a profitable opportunity to strengthen and extend its offer of online services.

We were particularly attentive to those announcements — we were ourself involved in the development of compiler tools for Modula-2, Portal and, later, for Scala — and experimented with preliminary versions of both programming environments.

In the following we briefly expose our motivations for targeting Scala to the Android platform and summarize our experiences in developing Android applications written in Scala.

Motivations

"Programming is usually taught by examples."
Niklaus Wirth

Good code examples are essential during the learning process of a new programming environment; besides helping the programmer to familiarize himself with language features and development tools they should demonstrate its ability to support the developer in delivering effective software solutions.

The development of the Scala language started as an academic project at EPFL and the availability of good Scala examples was rather poor at its early development stages. Several reasons can explain that situation:

Our main project goal is to apply our Scala expertise to the development of Android applications. In order to facilitate our immersion into the Android environment we choose to reuse publicly available Java code examples and plan to write our own Scala code in a later project phase.

Experiences

We have experimented with Scala on the Android platform since 2007, starting with Android version 0.9 together with Scala version 2.6.x. As a member of the Scala project team we could act directly on the Scala tools to facilitate their integration with the Android platform.

In the following we resume the most relevant aspects of our experience developing Scala applications for the Android platform:

Outlook

Developing Android applications in Scala is a very enjoying task. Most development efforts in this project have focused on the software build process and its deployment on the Android emulator. Translating Java source code to Scala was mostly straightforward.

We conclude this project summary with several personal remarks about the strengths and weaknesses of Scala and Android: