Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The Future of Rubymotion

3,096 views

Published on

Published in: Technology
  • Be the first to comment

The Future of Rubymotion

  1. 1. the future ofRubyMotion
  2. 2. @clayallsopp- http://rubymotion-tutorial.com- http://github.com/clayallsopp/ - Formotion, Routable, and more- http://bubblewrap.io- Upcoming RubyMotion PragProgs book
  3. 3. Where are we now? May 2012 - Sept 2012- Production, award-winning apps shipping- New RM features and bugfixes weekly-ish- Awesome, active community
  4. 4. Where are we going? → Community will make or break RM
  5. 5. 1:1 ObjC → Ruby Wave 1 # NSSearchPathForDirectoriesInDomains...BubbleWrap App.documents_path # NSBundle.mainBundle.resourcePath App.resources_path # NSNotificationCenter.defaultCenter App.notification_center
  6. 6. Wrapping ObjC Wave 2 BW::Location.get do |result| p "From Lat #{result[:from].latitude}, BubbleWrap Long #{result[:from].longitude}" p "To Lat #{result[:to].latitude}, Long #{result[:to].longitude}" end Twitter::Composer.compose(tweet: Hello RubyMotion!, urls: ["http://clayallsopp.com"]) do |composer| if composer.error # ... elsif composer.cancelled? # ...Twittermotion elsif composer.done? # ... end end
  7. 7. New Metaphors Wave 3Teacup::Stylesheet.new(:some_view) do style :root, landscape: true style :field, left: 10, top: 10, class SomeController < UIViewController width: 200, stylesheet :some_view height: 50, landscape: { layout :root do width: 360 subview(UITextField, :field) } @search = subview(UITextField, :search) end style :search, extends: :field, end left: 10, top: 70, placeholder: Find something... style UITextField, textColor: UIColor.redColorend Teacup
  8. 8. New Metaphors Wave 3class User include Formotion::Formable form_property :name, :string form_property :score, :number form_property :team, :picker, items: ["Red", "Blue", "Green"] form_title "Edit User"end# ...user = User.new("Harry", 100, "Green")controller = Formotion::FormableController.alloc.initWithModel(user)self.navigationController << controller Formotion
  9. 9. New Metaphors Wave 3 class Task < Nitron::Model def self.all order("due") end endclass TaskListViewController < Nitron::TableViewController collection { Task.all }end Nitron
  10. 10. New Metaphors Wave 3[YOUR LIBRARY HERE]
  11. 11. The Killer Framework- API-driven apps are dead simple- UI scaffolding based on models- Completely abstracts the UIKit/Cocoa
  12. 12. Sources• https://github.com/rubymotion/bubblewrap• https://github.com/clayallsopp/twittermotion• https://github.com/rubymotion/teacup• https://github.com/clayallsopp/formotion• https://github.com/mattgreen/nitron• Also: http://rubymotion-wrappers.com

×