Enrique Zamudio

chochosmx
chochos
Biography

Enrique Zamudio is a professional programmer since 1994, based in Mexico City. He has specialized in server-side development with Java since 2000, focusing on backend applications, such as transactional switches for e-commerce and payment platforms. He is the author of the open source projects jAlarms, j8583 and ScalaSQL. Enrique joined the Ceylon Language development core team on January 2012, where he’s contributed to the language module, the web IDE and the JVM compiler, and is the lead developer of the Ceylon-to-JavaScript compiler.

Developing Android applications with Ceylon

You can write Android applications in Ceylon, using the standard Android tools. This has many advantages, since you can use all the language features available for the other platforms that Ceylon targets, such as:

  • Union and intersection types
  • Top-level and higher-order functions
  • Tuples
  • Comprehensions
  • Typesafe metamodel (Ceylon’s version of Java reflection, with additional type safety)

The purpose of this tutorial is to write a simple Android application that covers some of the most painful aspects of using Java on this platform (using and defining generics, iterating over collections, anonymous classes and objects, using exceptions for well-defined use cases, etc), so you can really appreciate Ceylon’s features and how you can accomplish more with less code, while keeping it readable.

The application will cover the following Ceylon features:

Using comprehensions to iterate, filter and transform elements of a collection
Creating top-level and higher-order functions
Creating singletons
Using the metamodel to inspect a type’s members in a typesafe manner
Defining a method that uses union types instead of exceptions to indicate expected errors
Interop with the standard Android APIs

The purpose of this tutorial is to show the audience that anything that can be done in Android using Java, can also be done in Ceylon, and it’s usually easier and requires less code.