<span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" class="toc-secnum">&#160;</span>ForewordForeword – RubyMotion


Foreword

A long time ago, Ruby replaced Perl as my favorite high-level language. I have always been a low-level programmer, writing C code on a daily basis, but I was convinced from the beginning that high-level languages such as Ruby were better suited for application development.

For a long time, application development meant desktop applications. I spent a good amount of time trying to make Ruby a first-class citizen for desktop development, working on the Ruby-GNOME, RubyCocoa, and MacRuby projects. While I can’t say I achieved the success I expected, at least I tried, and it made Ruby programmers happy.

In March 2008, Apple released the first version of the iOS SDK, allowing developers to finally write custom iPhone applications in Objective-C. That day, as an Apple employee, I dreamt of the day when developers would be able to use Ruby to write iOS apps.

You are holding this book, so you know the story. I left Apple and created RubyMotion. But why on Earth would you want to use Ruby for app development?

There are many practical reasons that make Ruby a much better alternative to lower-level languages for app development, but for me, the main advantage of Ruby is that it triggers creativity.

Ruby as a language allows the creation of layered abstractions, often called domain-specific languages, within the language itself. This feature is definitely not unique to Ruby (I say this as a huge fan of Lisp), but Ruby programmers really seem to like creating abstractions for some reason.

Ruby has dozens of test libraries. Rails comes with several small languages defined within the framework. And just a week after RubyMotion was available, there were already several abstraction libraries for it.

Ruby programmers often call themselves code artists because they can feel the process of creativity when they program in Ruby. If you have programmed in Ruby, you know what I mean, because you have felt it too.

This is why Ruby matters. And this is why writing iOS apps in Ruby matters.

Laurent Sansonetti
Liege, Belgium, December 2012