12
the future of RubyMotion

The Future of Rubymotion

Embed Size (px)

Citation preview

Page 1: The Future of Rubymotion

the future of RubyMotion

Page 2: The Future of Rubymotion

@clayallsopp

- http://rubymotion-tutorial.com

- http://github.com/clayallsopp/

- Formotion, Routable, and more

- http://bubblewrap.io

- Upcoming RubyMotion PragProgs book

Page 3: The Future of Rubymotion

Where are we now?May 2012 - Sept 2012

- Production, award-winning apps shipping

- New RM features and bugfixes weekly-ish

- Awesome, active community

Page 4: The Future of Rubymotion

Where are we going?→ Community will make or break RM

Page 5: The Future of Rubymotion

1:1 ObjC → RubyWave 1

BubbleWrap# NSSearchPathForDirectoriesInDomains...App.documents_path

# NSBundle.mainBundle.resourcePathApp.resources_path

# NSNotificationCenter.defaultCenterApp.notification_center

Page 6: The Future of Rubymotion

Wrapping ObjCWave 2

BubbleWrap

BW::Location.get do |result| p "From Lat #{result[:from].latitude}, Long #{result[:from].longitude}" p "To Lat #{result[:to].latitude}, Long #{result[:to].longitude}"end

Twittermotion

Twitter::Composer.compose(tweet: 'Hello RubyMotion!', urls: ["http://clayallsopp.com"]) do |composer| if composer.error # ... elsif composer.cancelled? # ... elsif composer.done? # ... endend

Page 7: The Future of Rubymotion

New MetaphorsWave 3

Teacup

Teacup::Stylesheet.new(:some_view) do style :root, landscape: true

style :field, left: 10, top: 10, width: 200, height: 50, landscape: { width: 360 }

style :search, extends: :field, left: 10, top: 70, placeholder: 'Find something...'

style UITextField, textColor: UIColor.redColorend

class SomeController < UIViewController stylesheet :some_view

layout :root do subview(UITextField, :field) @search = subview(UITextField, :search) endend

Page 8: The Future of Rubymotion

New MetaphorsWave 3

Formotion

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

Page 9: The Future of Rubymotion

New MetaphorsWave 3

Nitron

class Task < Nitron::Model def self.all order("due") endend

class TaskListViewController < Nitron::TableViewController collection { Task.all }end

Page 10: The Future of Rubymotion

New MetaphorsWave 3

[YOUR LIBRARY HERE]

Page 11: The Future of Rubymotion

The Killer Framework

- API-driven apps are dead simple

- UI scaffolding based on models

- Completely abstracts the UIKit/Cocoa