Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
RedPotion Introduction
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
willrax
May 13, 2015
Programming
0
55
RedPotion Introduction
An introduction to using RedPotion. The power of RMQ and ProMotion.
willrax
May 13, 2015
Tweet
Share
More Decks by willrax
See All by willrax
Testing Ember with Ember CLI Mirage
willrax
1
270
HTML and CSS
willrax
0
160
SKFun
willrax
4
2.6k
iBeacons and RubyMotion
willrax
5
410
Other Decks in Programming
See All in Programming
「ブロックテーマでは再現できない」は本当か?
inc2734
0
730
Oxlint JS plugins
kazupon
1
790
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
990
MUSUBIXとは
nahisaho
0
130
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
SourceGeneratorのススメ
htkym
0
190
CSC307 Lecture 03
javiergs
PRO
1
490
組織で育むオブザーバビリティ
ryota_hnk
0
170
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
180
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
130
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
0
920
Fluid Templating in TYPO3 14
s2b
0
130
Featured
See All Featured
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
110
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Git: the NoSQL Database
bkeepers
PRO
432
66k
WENDY [Excerpt]
tessaabrams
9
36k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The Language of Interfaces
destraynor
162
26k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Transcript
willrax GitHub | Twitter | .com
AlphaSights engineering.alphasights.com
RedPotion
A Tale of Two Libraries
ProMotion’s Rubyification
App Delegate
App Delegate Entry Point
class AppDelegate def application(application, didFinishLaunchingWithOptions:launchOptions) controller = TopicsScreen.alloc.init controller.title =
"Application" controller.view.backgroundColor = UIColor.whiteColor navigation = UINavigationController.alloc .initWithRootViewController(controller) @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) @window.rootViewController = navigation @window.makeKeyAndVisible true end end
class AppDelegate < PM::Delegate status_bar true, animation: :fade def on_load(app,
options) open TopicsScreen.new(nav_bar: true) end end
Loading Table Data
def tableView(table, cellForRowAtIndexPath: index_path) end def numberOfSectionsInTableView(table) end def tableView(table,
numberOfRowsInSection: section) end
def table_data [{ title: "", cells: topics.map do |topic| {
title: topic.title, subtitle: "Last Poster: #{topic.last_poster}", action: :open_profile, arguments: { topic: topic } } end }] end
Fallback to Cocoa API
Forms In App Purchases Maps Side Menus Many More…
ProMotion
ProMotion
RMQ’s UI Magic
class UserScreenStylesheet < ApplicationStylesheet def root_view(style) style.background_color = color.white end
def name_label(style) style.frame = { top: 90, from_right: 20, right_of_previous: 20, height: 150 } style.number_of_lines = 0 style.text_alignment = :left style.line_break_mode = :word_wrapping style.font = UIFont.boldSystemFontOfSize(25.0) end end
class UserScreen < PM::Screen stylesheet UserScreenStylesheet def stylesheet build_initial_ui end
def build_initial_ui append(UIImageView, :avatar_image) append(UILabel, :name) append(UILabel, :details_title) append(UILabel, :last_seen_at) end end
ProMotion RMQ ❤
Commonly Used Gems
RMQ ProMotion CDQ AFMotion
Simple Structure
app views models stylesheets screens
potion create
Demo Time