Successfully reported this slideshow.
Your SlideShare is downloading. ×

The Future of Rubymotion

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

The Future of Rubymotion

  1. 1. the future of RubyMotion
  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 3 Teacup::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.redColor end Teacup
  8. 8. New Metaphors Wave 3 class 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 end class 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

×