Slide 1

Slide 1 text

willrax GitHub | Twitter | .com

Slide 2

Slide 2 text

AlphaSights engineering.alphasights.com

Slide 3

Slide 3 text

RedPotion

Slide 4

Slide 4 text

A Tale of Two Libraries

Slide 5

Slide 5 text

ProMotion’s Rubyification

Slide 6

Slide 6 text

App Delegate

Slide 7

Slide 7 text

App Delegate Entry Point

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

class AppDelegate < PM::Delegate status_bar true, animation: :fade def on_load(app, options) open TopicsScreen.new(nav_bar: true) end end

Slide 10

Slide 10 text

Loading Table Data

Slide 11

Slide 11 text

def tableView(table, cellForRowAtIndexPath: index_path) end def numberOfSectionsInTableView(table) end def tableView(table, numberOfRowsInSection: section) end

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Fallback to Cocoa API

Slide 14

Slide 14 text

Forms In App Purchases Maps Side Menus Many More…

Slide 15

Slide 15 text

ProMotion

Slide 16

Slide 16 text

ProMotion

Slide 17

Slide 17 text

RMQ’s UI Magic

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

ProMotion RMQ ❤

Slide 21

Slide 21 text

Commonly Used Gems

Slide 22

Slide 22 text

RMQ ProMotion CDQ AFMotion

Slide 23

Slide 23 text

Simple Structure

Slide 24

Slide 24 text

app views models stylesheets screens

Slide 25

Slide 25 text

potion create

Slide 26

Slide 26 text

Demo Time