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

RubyMotion: The sleeper has awakened!

RubyMotion: The sleeper has awakened!

Why RubyMotion is awesome, the story behind Basecamp for iPhone, and more. Beta tested at WNYRuby, given at #inspect and PGH.rb.

Nick Quaranto

March 28, 2013
Tweet

More Decks by Nick Quaranto

Other Decks in Programming

Transcript

  1. RubyMotion:
    The sleeper has
    awakened!
    Nick Quaranto - @qrush

    View Slide

  2. Buffalo, NY

    View Slide

  3. 37signals

    View Slide

  4. <3 RubyMotion!

    View Slide

  5. Basecamp for iPhone

    View Slide

  6. awakening

    View Slide

  7. I kept getting stuck.

    View Slide

  8. View Slide

  9. TORONTO DRIFT

    View Slide

  10. Break the cycle!

    View Slide

  11. Files - the first app

    View Slide

  12. View Slide

  13. View Slide

  14. and got rejected
    Rejected.

    View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. View Slide

  19. I could not have
    done this without
    RubyMotion

    View Slide

  20. was a roadblock

    View Slide

  21. View Slide

  22. FREEDOM.

    View Slide

  23. +

    View Slide

  24. +

    View Slide

  25. what awakened?

    View Slide

  26. style

    View Slide

  27. I write to learn
    about software,
    and I learn
    software by
    writing it.

    View Slide

  28. snake_case
    def foo_bar(a, b)
    camelCase
    def fooBar(a, b: c)

    View Slide

  29. classic
    dialect

    View Slide

  30. ruby dialect

    View Slide

  31. eventmachine dialect

    View Slide

  32. jruby
    dialect

    View Slide

  33. objective-c dialect

    View Slide

  34. community

    View Slide

  35. RubyMotion Google Group

    View Slide

  36. github.com/rubymotion

    View Slide

  37. RubyMotion YARDocs

    View Slide

  38. github.com/HipByte/RubyMotion-Samples

    View Slide

  39. gem 'bubble-wrap'

    View Slide

  40. HTTP requests
    NSNotificationCenter
    Quick persistence
    Lots of shortcuts
    gem 'bubble-wrap'

    View Slide

  41. HTTP requests
    NSNotificationCenter
    Quick persistence
    App.run_after
    Device.screen
    gem 'bubble-wrap'

    View Slide

  42. gem 'motion-settings-bundle'

    View Slide

  43. # in your Rakefile
    require 'motion-settings-bundle'
    Motion::SettingsBundle.setup do |app|
    app.text "Version", key: "version", default: "1.0.0"
    app.toggle "Awesome?", key: "awesomeOn", default: true
    app.child "Acknowledgements" do |ack|
    ack.child "AwesomeOSSLibrary" do |lic|
    lic.group "Copyright 2013 AwesomeOSSContributor"
    lic.group "A bunch of legal stuff"
    end
    end
    end

    View Slide

  44. View Slide

  45. View Slide

  46. View Slide

  47. # horizontal
    "|-10-[switch]-10-|"
    "|-10-[help]-10-|"
    # vertical
    "|-15-[switch]-10-[help(==switch)]-15-|"

    View Slide

  48. DSL for NSLayoutConstraint
    iOS6+ Only
    Extracted from Basecamp.app
    No tests, but examples!
    gem 'motion-layout'

    View Slide

  49. Motion::Layout.new do |lay|
    lay.view self.view.tableFooterView
    lay.subviews "switch" => @switch, "help" => @help
    lay.vertical "|-15-[switch]-10-[help(==switch)]-15-|"
    lay.horizontal "|-10-[switch]-10-|"
    lay.horizontal "|-10-[help]-10-|"
    end

    View Slide

  50. resource

    View Slide

  51. View Slide

  52. View Slide

  53. View Slide

  54. +

    View Slide

  55. yours?

    View Slide

  56. thanks

    View Slide