Talks

The future of Ruby is in motion!

http://rubykaigi.org/2015/presentations/lrz

In this presentation we will give a quick and gentle introduction to RubyMotion, a Ruby toolchain to write cross-platform apps for iOS and Android. Then, we will cover 3 of its latest features: Apple Watch, Apple TV and a cross-platform game engine. We will do live demos and coding.

RubyKaigi 2015

00:00:05.569 Hello, everyone! Konnichiwa! My name is Laurent Sansonetti.
00:00:16.680 I'm here to talk to you about RubyMotion, a toolchain for writing cross-platform apps using Ruby.
00:00:23.240 For a while, I had trouble getting it right. But I believe we can dive into RubyMotion together today.
00:00:40.350 First, let me apologize for my awkward jokes. Now, let's move on.
00:00:46.650 Now, I can see the next slide. So, I will speak English. I must admit that my style of English is influenced by my French background, which makes it somewhat different.
00:01:09.119 I started learning Japanese about 11 years ago, in 2004. To be fluent, you need to learn around 2,500 kanji. However, I only know about 100 so far. Learning kanji is really challenging.
00:01:28.049 Based on my progress, I calculated that it would take me an additional 264 years to learn all the kanji.
00:01:35.340 According to my calculations, I'd be ready to give a talk in Japanese in the year 2279! By then, I hope Ruby on Rails will have matured as well.
00:01:46.650 Now, to introduce myself: I'm the founder of a software company and I focus on programming. As you see, I have a mix of business and programming expertise.
00:02:28.300 I was a Perl programmer until 2002 when I discovered Ruby. Ruby became my favorite language, leading me to work at Apple for about eight years.
00:02:53.130 At Apple, I worked on many projects, including applications like iCal, iPhoto, and many others. I also worked with UNIX and the Darwin operating system, which is the foundation for iOS and Mac OS X.
00:03:15.220 I integrated Ruby with Objective-C, creating the Ruby Cocoa bridge to bring Ruby into Mac OS X. After 2012, I decided to start my own company: RubyMotion.
00:03:41.710 In RubyMotion, we simplified the toolchain to help Ruby developers build apps. I also co-founded the 'Orville Club', which proudly believes that Orville is the best beer in the world!
00:04:02.200 We have a website about it that I developed myself, although I'm not an expert web programmer. Anyway, I'm excited to tell you about some RubyMotion features.
00:04:58.840 RubyMotion provides a toolchain for creating native applications in Ruby, allowing you to write applications for iOS and Android easily. It's designed for Ruby developers, making them feel at home.
00:05:30.090 You can use your favorite text editor alongside the terminal without needing to learn new languages or switch between IDEs.
00:06:10.060 RubyMotion builds on a consistent experience across platforms and allows you to write native apps without requiring different toolsets for iOS and Android.
00:06:38.070 Currently, cross-platform native development is fragmented, requiring multiple languages and IDEs, but with RubyMotion, you can unify this into a single workflow.
00:07:24.810 RubyMotion introduces unified runtimes for iOS and Android, allowing Ruby objects to behave as Objective-C or Java objects, respectively. This eliminates the need for a bridge, making for a more efficient development process.
00:08:11.790 For native iOS development, RubyMotion rewrites Ruby on top of an existing Objective-C runtime, enabling Ruby objects to interact with Objective-C directly.
00:08:57.990 Similarly, for Android, RubyMotion leverages the JNI (Java Native Interface) to connect Ruby with Java objects. This allows full access to Android's APIs from Ruby.
00:09:54.690 In terms of implementation, both iOS and Android applications in RubyMotion can utilize all available framework APIs and maintain an idiomatic syntax.
00:10:33.700 We combined Ruby's expressiveness with native platform capabilities, allowing Ruby developers to write high-performance mobile apps.
00:11:09.760 RubyMotion also streamlines static compilation, producing native binaries directly, without an intermediate bytecode. This results in enhanced performance for runtime applications.
00:11:41.600 Using LLVM, we compile Ruby scripts into native executable code, enabling direct execution on devices, thus ensuring efficient application performance.
00:12:15.590 RubyMotion apps are built as native executables that work seamlessly on both iOS and Android, with detailed configuration available through a command-line interface.
00:12:53.440 You can create your projects using simple command-line commands without relying on traditional IDEs, and the setup allows you to run your app quickly on physical devices.
00:13:25.920 Moreover, deploying to app stores like the Apple App Store or Google Play is straightforward, and RubyMotion has built-in support for generating the necessary packages.
00:14:03.970 We are also partnered with JetBrains, whose IDE, RubyMine, offers great support for RubyMotion development, enhancing the coding experience with smart auto-completion and debugging features.
00:15:07.630 Additionally, RubyMotion recently introduced a free version called 'RubyMotion Starter'. This version is fully featured and allows for community engagement with RubyMotion development.
00:15:53.360 However, it includes a splash screen unless you opt for a subscription to remove it. The latest version of iOS supported by RubyMotion is iOS 9.0.2, and we're always quick to support new releases.
00:17:06.170 RubyMotion also supports new features such as development for Apple Watch and Apple TV. The Apple Watch now runs apps natively, which allows for better interaction and experiences.
00:18:10.000 Here’s a RubyMotion example showing a simple app that displays Bitcoin's latest value. This concept could help you manage your investments effectively.
00:18:38.040 Moving on to the Apple TV—Apple TV apps are built on iOS's architecture. RubyMotion makes it easy to develop games and apps for Apple TV, which was excitingly announced recently.
00:19:19.200 We support the new Apple TV SDK and have implemented frameworks for efficient development on the platform, with full RubyMotion capabilities for building exciting TV applications.
00:20:04.010 El Capitan, the latest OS, is also supported by RubyMotion. Application developers can target this version to leverage new macOS capabilities directly from Ruby.
00:20:40.370 Regarding iOS app submissions, we now meet Apple's new requirements, enabling developers to submit directly from their RubyMotion workflows.
00:21:20.800 Our static navigation operator offers added safety, and we've ported critical features to strengthen RubyMotion's toolchain.
00:21:51.590 Now let’s talk about RubyMotion Game, a project that allows for cross-platform game development. It utilizes existing frameworks like Cocos2D, ensuring efficient performance for both iOS and Android.
00:22:57.500 I will quickly show you a demo of our newly invented game called 'Flappy Sushi.' This example showcases the ease of game development with RubyMotion.
00:23:47.400 In this demo, I'll demonstrate how to create backgrounds and sprites in the game interface. You can see how straightforward it is to manipulate game elements.
00:24:44.560 As I continue to build the game, I'll introduce physics properties and interactions, such as rotating our bird character based on its movements.
00:25:29.220 By using RubyMotion, we can create complex behaviors, such as detecting collisions and animating sprites. I’m rapidly implementing features to enhance gameplay.
00:26:53.290 I will quickly show you how this game works on Android, illustrating the cross-platform capabilities of our codebase. The same code structure runs seamlessly across devices.
00:28:05.250 Next, I’ll demonstrate the game on Apple TV. It's remarkable to see how efficiently it runs on different platforms, proving RubyMotion's versatility in app development.
00:29:20.120 Despite time constraints, I've been excited to show how that you can use RubyMotion for game development across platforms seamlessly and how simple it is to push updates.
00:30:30.020 As RubyMotion is released next week, it will be open source and free software. You can start exploring 'gem install motion game' at the launch date.
00:32:01.780 Please download RubyMotion at the URL provided. Thank you for your attention today!