Flow

Real cross platform on Rubymotion

¿How it works?

iOS

Android

class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    alert = UIAlertView.new
    alert.message = 'Hello World'
    alert.show
    true
  end
end
class MainActivity < Android::App::Activity
  def onCreate(savedInstanceState)
    puts "Hello World!"
    super
    view = Android::Widget::TextView.new(self)
    view.text = "Hello World!"
    self.contentView = view
  end
end

Flow

Net

UI

JSON

Store

Store

Task

Net

Net.get(url) do |response|
      response_model = Response.new(response)
      response_block.call(response_model)
end

Store

Store['foo'] = 42
Store.all
#=> { 'foo' => 42 }
Store.delete('foo')

JSON

JSON.load('{"foo":"bar"}')
#=> {"foo" => "bar"}
{"foo" => "bar"}.to_json
#=> '{"foo":"bar"}'

Building a real project

Architecture

Model

Presenter

View

View

iOS

Android

Silmood

@silmood

See you space cowboy

Flow - Rubymotion

By Petter Hdz

Flow - Rubymotion

  • 512