Slide 1

Slide 1 text

RUBYMOTION Introduction seanlilmateus Montag, 14. Oktober 13

Slide 2

Slide 2 text

About Me  seanlilmateus  Mateus Armando Deutsche Telekom AG MacRuby & Rubymotion enthusiastic Mobile OS Geek Montag, 14. Oktober 13

Slide 3

Slide 3 text

About Me  seanlilmateus  Montag, 14. Oktober 13

Slide 4

Slide 4 text

 seanlilmateus  What? Montag, 14. Oktober 13

Slide 5

Slide 5 text

 seanlilmateus  What? Montag, 14. Oktober 13

Slide 6

Slide 6 text

 seanlilmateus  How is this possible??? Montag, 14. Oktober 13

Slide 7

Slide 7 text

 seanlilmateus  @lrz Laurent Sansonetti The Initiator Montag, 14. Oktober 13

Slide 8

Slide 8 text

 seanlilmateus  @lrz MacRuby 7 years of experience at Apple Mac OS X IDA Pro GNOME Laurent Sansonetti RubyCocoa RubyMotion iLife The Initiator Montag, 14. Oktober 13

Slide 9

Slide 9 text

 seanlilmateus  Ruby Montag, 14. Oktober 13

Slide 10

Slide 10 text

 seanlilmateus  LLVM IR Montag, 14. Oktober 13

Slide 11

Slide 11 text

 seanlilmateus  ASSEMBLY Montag, 14. Oktober 13

Slide 12

Slide 12 text

Objective-C iOS SDK Foundation.framework Objective-C Runtime  seanlilmateus  Montag, 14. Oktober 13

Slide 13

Slide 13 text

Ruby Objective-C iOS SDK Foundation.framework Objective-C Runtime  seanlilmateus  Montag, 14. Oktober 13

Slide 14

Slide 14 text

FAST  seanlilmateus  Montag, 14. Oktober 13

Slide 15

Slide 15 text

Smalltalk Objective-C Ruby  seanlilmateus  Perl C Montag, 14. Oktober 13

Slide 16

Slide 16 text

 seanlilmateus  Open-Classes Objective-C • Objective-C is using “Categories” •Implementation : @implementation NSNumber (TimeDiff) - (NSNumber *)days { return [NSNumber numberWithInteger:([self intValue] * 24 * 60 * 60)]; } - (NSDate *)ago { return [NSDate dateWithTimeIntervalSinceNow:[self intValue]]; } @end Ruby(Motion) class Fixnum def days self * 24 * 60 60 end def ago Time.now - self end end Montag, 14. Oktober 13

Slide 17

Slide 17 text

 seanlilmateus  Mixins Objective-C • No mixins available in ObjC language • Runtime Implementation : class_addMethod(Class cls, SEL name, IMP imp, const char *types); Ruby(Motion) module CapitalNames def capitalized_name name.upcase end end class User include CapitalNames def initialize name @name = name end def name @name end end Montag, 14. Oktober 13

Slide 18

Slide 18 text

 seanlilmateus  But WHY????? Montag, 14. Oktober 13

Slide 19

Slide 19 text

Thinking In A Foreign Language Helps You Make Rational Decisions.  Science Thursday, April 26th 2012 at 3:10 pm Montag, 14. Oktober 13

Slide 20

Slide 20 text

 seanlilmateus  Do You Love Ruby? Well, now Ruby loves iOS Montag, 14. Oktober 13

Slide 21

Slide 21 text

 seanlilmateus  Ruby ways Objective-C NSFileManager *mgr = [NSFileManager defaultManager]; NSArray *paths =[mgr contentsOfDirectoryAtPath:@"/etc" error:nil]; [paths enumerateObjectsUsingBlock:^(id obj, ...) { NSLog(@"%@", obj); }]; Ruby(Motion) Dir["/etc"].each do |name| puts name end Montag, 14. Oktober 13

Slide 22

Slide 22 text

http://fuckingblocksyntax.com/ Montag, 14. Oktober 13

Slide 23

Slide 23 text

 seanlilmateus  Learning from ObjC Objective-C [string drawAtPoint:point withFont:font]; Ruby(Motion)string.drawAtPoint(point, withFont:font) Montag, 14. Oktober 13

Slide 24

Slide 24 text

REQUIREMENTS  seanlilmateus  Montag, 14. Oktober 13

Slide 25

Slide 25 text

REQUIREMENTS  seanlilmateus  Montag, 14. Oktober 13

Slide 26

Slide 26 text

 seanlilmateus  Demo! Montag, 14. Oktober 13

Slide 27

Slide 27 text

 seanlilmateus  Want to start? Montag, 14. Oktober 13

Slide 28

Slide 28 text

 seanlilmateus  Montag, 14. Oktober 13

Slide 29

Slide 29 text

 seanlilmateus  You’ll not be alone Montag, 14. Oktober 13

Slide 30

Slide 30 text

 seanlilmateus  You’ll not be alone Wrappers github opensource Meetings conferences Montag, 14. Oktober 13

Slide 31

Slide 31 text

 seanlilmateus  Thank you Montag, 14. Oktober 13

Slide 32

Slide 32 text

 seanlilmateus  Thank you Montag, 14. Oktober 13