Movatterモバイル変換


[0]ホーム

URL:


BT

InfoQ Software Architects' Newsletter

A monthly overview of things you need to know as an architect or aspiring architect.

View an example

We protect your privacy.

QCon London (March 16-19, 2026): Gain actionable insights & strategic perspectives to tackle complex enterprise challenges. Register

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Unlock the full InfoQ experience

Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources.

Log In
or

Don't have an InfoQ account?

Register
  • Stay updated on topics and peers that matter to youReceive instant alerts on the latest insights and trends.
  • Quickly access free resources for continuous learningMinibooks, videos with transcripts, and training materials.
  • Save articles and read at anytimeBookmark articles to read whenever youre ready.

Topics

Choose your language

InfoQ HomepageNewsUsing Clojure to Build Native Android Apps

Using Clojure to Build Native Android Apps

This item injapanese

Aug 26, 20151min read

Write for InfoQ

Feed your curiosity.Help 550k+ global
senior developers
each month stay ahead.
Get in touch

Clojure development on the Android platform has been progressing remarkably in the last few years, allowing developers to use it infully fledged apps such asSwiftKey’s Clarity Keyboard. Here we will review the current status of tools that support Clojure on the Android platform.

Historically, Clojure on Android has suffered from slow startup, which could lastup to 4–10 times longer than Java’s when using standard upstream Clojure. This issue is addressed bySkummet, a Clojurefork that optimizes Clojure’s compiler so that it produces more compact, faster-to-load bytecode. Besides providing an optimizing compiler, Skummet also includes an optimized version of Clojure’s runtime that is built by the former.

Skummet aims to ensure maximum compatibility and, although there could be issues with code that relies on referencingVars directly, most Clojure code should be compatible out of the box, according to Skummet’s creatorAlex Yakushev.

Overall, Skummet is able to bring a 4x reduction in load time on a simple benchmark app’s first launch, and 2x shrinking in both APK size and heap usage. According to SwiftKey’s Adam Clements and Ben Leavett, using Skummet has allowed them to keep Clarity Keyboard’s loading time around 1.5–2 seconds, and further improvements are possible.

Other useful tools for Clojure development on Android are packed under the umbrella project ofClojure-Android Initiative and include:

  • lein-droid: a Leiningen plugin that works as a build tool for Clojure-Android projects and deals with the process of packaging resources, creating an APK file, signing it, etc.
  • Neko: a toolkit that wraps some parts of Android’s Java API to make them more idiomatic to use from Clojure.

Zach Oakes, author of theNightweb app for Android,says that Clojure can make an app’s codebase “shockingly” smaller by enabling terse idioms, as well as improve the app responsiveness by making it easier for the programmer to run asynchronous tasks.

According to SwiftKey’s engineers, the use of Clojure to build an Android app can have a huge impact on the app design. Specifically, in Clarity Keyboard’s case, it made it possible to adopt a fully “event driven” design, which coupled with the use of immutable data structure allows to easily store and “replay” any user actions. Using immutable data also helped build a highly modular app and make every operation asynchronous by default.

Rate this Article

Adoption
Style

This content is in theMobile topic

Related Topics:

The InfoQ Newsletter

A round-up of last week’s content on InfoQ sent out every Tuesday. Join a community of over 250,000 senior developers.View an example

We protect your privacy.

BT

[8]ページ先頭

©2009-2025 Movatter.jp