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

Sure, I could learn Objective-C but...

October 26, 2013

Sure, I could learn Objective-C but...

By Joshua Ballanco


October 26, 2013

More Decks by Kod.io

Other Decks in Programming


  1. Sure, I could learn Objective-C but... Isn’t there something better?

  2. Joshua Ballanco @manhattanmetric https://github.com/jballanc

  3. Joshua Ballanco @manhattanmetric https://github.com/jballanc

  4. What is Objective-C? • Object Oriented • Message Passing •

    SmallTalk Inspired • Strict Superset of C
  5. Objective-C Explosion Why?

  6. Duh...

  7. Is there another option?

  8. What is Ruby? • Object Oriented • Message Passing •

    SmallTalk Inspired • Strict Superset of C RubyMotion is Ruby for iOS and OS X
  9. Learning a New Language Stage 1 I understand what you’re

    saying... but I have no idea how to reply
  10. Learning a New Language Stage 2 I know how to

    construct statements, but they are direct translations from that other language I know
  11. Learning a New Language Stage 3 I get it!

  12. How to learn RubyMotion? • If you don’t know Objective-C...

    • GREAT! Go for it!
  13. • Directly Translate • Apply Ruby Refactorings • Re-Open Core

    Types (Monkey-Patching) • Build Modules • Use Wrappers How to learn RubyMotion?
  14. JTGestureBasedTableView https://github.com/jamztang/JTGestureBasedTableViewDemo

  15. GestureTable Sample https://github.com/HipByte/RubyMotionSamples/tree/master/ios/GestureTable

  16. Direct Translation Obj-C RubyMotion

  17. Direct Translation

  18. Direct Translation

  19. Direct Translation Obj-C RubyMotion

  20. Direct Translation Obj-C RubyMotion

  21. Direct Translation Obj-C RubyMotion

  22. Direct Translation Obj-C RubyMotion

  23. Ruby Refactoring

  24. Ruby Refactoring

  25. Re-Open Core Classes

  26. Modules

  27. Modules

  28. Wrappers http://motionwrappers.com/

  29. Wrappers http://motionwrappers.com/

  30. Why should I use Objective-C • Speed • Interface directly

    with C libraries • Like long method names
  31. Why should I use RubyMotion • Development speed • Clear,

    concise business logic • Use high-level wrapper libraries
  32. Moral of the Story... Use the best tool for the

    job... and there is more than one tool!