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

RubyMotion - How I learned to like iOS despite Objective-C

RubyMotion - How I learned to like iOS despite Objective-C

First talk of the year for Orlando Ruby User Group (ORUG)

Thom Parkin

January 10, 2013
Tweet

Other Decks in Programming

Transcript

  1. RubyMotion
    How I learned to like iOS despite Objective-C

    View full-size slide

  2. iOS Mobile Development

    View full-size slide

  3. iOS Mobile Development
    Objective-C
    ME

    View full-size slide

  4. Objective-C syntax is bizarre & strange
    Struggle with nuances of XCode
    Interface Builder is very “GUI”
    iOS follows MVC [generally]
    iOS Mobile Development

    View full-size slide

  5. iOS Mobile Development
    Objective - C

    View full-size slide

  6. iOS Mobile Development
    Objectionable-C

    View full-size slide

  7. Obtuse
    iOS Mobile Development
    Objectionable-C

    View full-size slide

  8. RubyMotion
    ‘Toolchain for iOS’ (iPhone/iPad/iPod)
    NOT PhoneGap or Rhomobile
    Creates statically compiled, native code
    Fully compliant with App Store guidelines

    View full-size slide

  9. RubyMotion
    Familiar environment
    Ruby*, MVC
    Tests (MacBacon)
    Memory Management
    Ruby Gems
    Rake
    CLI (Terminal based workflow)
    *still required to understand structure and syntax of Obj-C

    View full-size slide

  10. RubyMotion
    Debugger (introduced in 1.24)
    Read-Eval-Print-Loop (REPL)
    Huge community
    Libraries and DSLs
    Mix Objective-C and Ruby

    View full-size slide

  11. RubyMotion
    Laurent Sansonetti
    Creator and lead developer of MacRuby
    left Apple late 2011
    HipByte (small team)
    Made by Rubyists for Rubyists

    View full-size slide

  12. RubyMotion
    Match Made in Heaven?

    View full-size slide

  13. RubyMotion
    Match Made in Heaven?
    Marriage between MacRuby and iOS

    View full-size slide

  14. iOS Mobile Development
    RubyMotion
    Only ONE file (.rb)

    View full-size slide

  15. iOS Mobile Development
    RubyMotion
    NSObject is root class
    Only ONE file (.rb)

    View full-size slide

  16. iOS Mobile Development
    RubyMotion
    NSObject is root class
    implicit return
    Only ONE file (.rb)

    View full-size slide

  17. iOS Mobile Development
    RubyMotion
    NSObject is root class
    Duck typing
    implicit return
    Only ONE file (.rb)

    View full-size slide

  18. iOS Mobile Development
    RubyMotion
    NSObject is root class
    Duck typing
    “sensible”
    dot notation
    implicit return
    Only ONE file (.rb)

    View full-size slide

  19. RubyMotion
    ENOUGH TALK
    LET’S CODE iOS in RUBY!!

    View full-size slide

  20. RubyMotion
    No `eval` (statically compiled)
    No proc#binding
    No define_method
    Named Parameters
    RVM / Bundler / Gems
    is NOT pure Ruby

    View full-size slide

  21. RubyMotion
    Learning Objective-C
    slow
    painful
    Ruby
    familiar
    fun
    Conclusion

    View full-size slide

  22. RubyMotion
    Purchase RubyMotion (~$200)*
    license key
    1 year software updates
    1 year private ticket system
    “How Do I Get Started?!”
    * 10% discount code

    View full-size slide

  23. RubyMotion
    Google Group
    GitHub
    HipByte/RubyMotion
    ParkinT/RubyMotion_Life/wiki
    ParkinT/RubyMotionSamples
    ParkinT/F1rstUse
    Resources

    View full-size slide

  24. RubyMotion
    Book
    Clay Allsopp
    Wiki
    Tutorials
    Official Samples repo
    MotionCasts
    Conference #inspect
    Resources

    View full-size slide