Upgrade to Pro — share decks privately, control downloads, hide ads and more …

From Ruby to Rubymotion

From Ruby to Rubymotion

Valencia.rb 7/22

Marco Alacot

July 22, 2014
Tweet

Other Decks in Programming

Transcript

  1. Valencia.rb 7/22
    From Ruby to
    Rubymotion

    View Slide

  2. malacot
    Marco Alacot
    Developer @ peerTransfer
    marcoalacot
    Mostly Ruby,
    NO previous experience with
    mobile development

    View Slide

  3. What is this all about?
    Show how it’s like opening the box of
    Rubymotion from the perspective of a Ruby
    developer.

    Enumerate the possibilities and the biggest
    challenges

    Explain how it works showing some internals
    and some code.

    View Slide

  4. How I met with RubyMotion?

    View Slide

  5. Why Rubymotion?
    We wanted to do a spike of a mobile app

    No iOS nor Android developers

    No time nor willing to learn Objective C

    Many Ruby developers...

    View Slide

  6. RubyMotion it’s a
    toolchain from Hipbyte

    It was created after MacRuby by an ex-Apple
    employee

    it allows to develop native apps for iOS and
    OS X (Android coming soon) using Ruby.
    What is Rubymotion?
    COMMERCIAL

    View Slide

  7. Ok… It’s a commercial
    product, but…

    How much it cost?
    iOS developer license: 99$ per year
    Rubymotion: 199$
    TOTAL: 298$

    View Slide

  8. Also, you said that

    I only need to know
    Ruby, right??

    View Slide

  9. Also, you said that I
    only need to know
    Ruby right??

    View Slide

  10. initWithNib
    UIControl
    didFinishLaunchingWithOptions:launchOptions
    NSSetUncaughtExceptionHandler
    UIEdgeInsetsMake(0, inset, 0, 0)
    Also, you said that I
    only need to know
    Ruby right??

    View Slide

  11. First challenge:

    You will need to

    know the platform
    API’s.

    View Slide

  12. Main features

    View Slide

  13. Ruby statically compiled

    View Slide

  14. Runtime

    View Slide

  15. Rake based toolchain

    View Slide

  16. REPL

    View Slide

  17. No Xcode!

    View Slide

  18. Keep your own editor!

    View Slide

  19. Rspec like testing
    framework

    View Slide

  20. View Slide

  21. Second challenge:

    How MVC applies to
    a mobile application?

    View Slide

  22. MVC?

    View Slide

  23. MVC?

    View Slide

  24. MVC?

    View Slide

  25. We said that we need to
    know the iOS API´s
    But, is there a way to
    “rubify” a little bit it’s
    syntax?

    View Slide

  26. Bubblewrap

    View Slide

  27. Alternatives to
    Rubymotion?

    View Slide

  28. Alternatives to
    Rubymotion
    MobiRuby
    Ruboto

    View Slide

  29. Android support

    View Slide

  30. Ruby Statically compiled

    Terminal based toolchain

    No need to use Eclipse (Keep your
    favourite editor!)

    Rspec like testing framework

    Easy debugging with REPL
    Same features:

    View Slide

  31. Ok, that looks good,

    but we have Swift now..

    View Slide

  32. Swift VS Rubymotion
    “Your customers care about what’s on the surface of your app:
    does it look, interact, and feel like an iOS app? If you can do
    that, the language doesn’t matter.

    !
    There is no right answer to this question. Choose what the
    language that speaks to you and then go build something
    awesome.”

    !
    Justin Williams, Learning How To Make Sausage

    View Slide

  33. Conclusions
    Rubymotion it’s not only the possibility to
    use Ruby for develop iOS and Android apps

    The framework API’s have always been the
    secret sauce. Whether you’re using
    Objective-C, Swift, C#, or Ruby you’re still
    going to have to learn how to use a
    UIButton or a UITableView.

    Swift, Ruby or Objective C are only tools,
    you can do great thinks with any, choose
    what tool you love the most!

    View Slide

  34. Where can I find help?
    Rubymotion Documentation

    Rubymotion Google user group (very active)

    Motioninmotion.tv

    View Slide

  35. Thank you!!!

    View Slide