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
RubyMotionについて #mixiwwdc
Search
ainame
June 24, 2013
Programming
2
400
RubyMotionについて #mixiwwdc
WWDCに行ってきたけど内容については一切話せません @ mixi
にて発表
ainame
June 24, 2013
Tweet
Share
More Decks by ainame
See All by ainame
Swift 5.7で変わる正規表現を試してみよう
ainame
4
5.8k
iOSDC 2021 - App Store用スクリーンショットの自動生成をアラビア語対応してSwiftUIで実装してみた
ainame
0
5.5k
DNN/GPU with Ruby #rubykaigi
ainame
2
3k
Server Side Swift実用性評価 2017 #iosdc #b
ainame
3
4.3k
Process tons of jobs with Swift
ainame
0
1.7k
Swift on the ObjC #shibuyaswift
ainame
4
800
家族アルバムみてね 開発風景 #realm_jp
ainame
4
4k
iOSで無限バックグラウンドアップロード(に挑戦してみた話)
ainame
2
4.7k
リファクタリングとtsort
ainame
1
1.7k
Other Decks in Programming
See All in Programming
RubyLSPのマルチバイト文字対応
notfounds
0
120
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.1k
GitHub Actionsのキャッシュと手を挙げることの大切さとそれに必要なこと
satoshi256kbyte
5
430
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
260
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
180
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
940
Ethereum_.pdf
nekomatu
0
460
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
A Philosophy of Restraint
colly
203
16k
Being A Developer After 40
akosma
87
590k
How to Ace a Technical Interview
jacobian
276
23k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
How GitHub (no longer) Works
holman
310
140k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Transcript
RubyMotionʹ͍ͭͯ 2013-06-25 גࣜձࣾϛΫγΟ @ainame
RubyMotion
None
RubyMotionͱ RubyMotion is a revolutionary toolchain for iOS. It lets
you quickly develop and test native iOS applications for iPhone or iPad, all using the awesome Ruby language you know and love.
Warning
ຊൃදΛߦ͏@ainameiOS։ൃΛ ຊ֨తʹۀͰߦ͏͜ͱແ͘ ࠓͷ3݄ࠒ͔ΒRubyMotionΛܦ༝ͯ͠ iOS։ൃࣝΛಘͨͷΈͷएഐऀͰ͢ɻ ຊൃදObjective-CTitanium mobilePhoneGapΛ ᩫΊΔҙਤશ͍͘͟͝·ͤΜɻ ෆదͳൃݴ͕ग़ͯ͠·͏͜ͱ ͋Δ͔͠Ε·ͤΜ͕·͕ྃ͢͝ঝԼ͍͞ɻ
ࣗݾհ @ainame / Satoshi Namai גࣜձࣾϛΫγΟ - ϓϩάϥϚ झຯRubyͰձࣾͰPerlΛॻ͍͍ͯ·͢ ࠷ۙεϚϗΤϯδχΞͬΆ͕͞ग़͖ͯͨ
emacsͷ֦ு motion-mode.el ࡞ͬͯ·͢
ࠓͷ RubyMotionͱ ✔ ࣗݾհ ✔ RubyMotion vs Titanium mobile/Phone Gap
RubyMotion vs Objective-C RubyMotionʹΑΔiOS։ൃͷՄೳੑ ·ͱΊ
RubyMotion vs Titanium mobile/PhoneGap ͲͪΒObjective-CҎ֎ͰiOSΞϓϦॻ͚Δ ͦͦͪΌΜͱ͑Δͷʁ Titaniumͱ͔Phone GapͱԿ͕ҧ͏ͷʁ
RubyMotionͷ͕͜͜ҧ͏ Objective-CͷRuntime্ʹ࣮͞ΕͨRuby ϒϦοδͰͳ͍ ͍ Objective-CͱϦϯΫͰ͖Δ ࣮ફRubyMotion(@naoya_ito) ΑΓ https://speakerdeck.com/naoya/shi-jian-rubymotion
None
None
None
None
None
పఈൺֱ!! Έ ༻ݴޠ ։ൃڥ औΓר͘ ڥ Android ରԠ Ձ֨ RubyMotion
Titanium Mobile Phone Gap ωΠςΟϒ ΞϓϦ Ruby shell + editor or RubyMine(IDE) rubygems cocoapods ☓ $199 ϋΠϒϦο υΞϓϦ ΄΅ JavaScript Titanium Studio (Eclipseϕʔε) Appcelerator Platform ʢ༗ঈʣ ̋ $0 ༗ঈ൛ ͋Γ Webϕʔε ϋΠϒϦο υΞϓϦ HTML5 + JavaScript shell + editor deploy→Xcode jQueryMobile ͷ ϥΠϒϥϦ ̋ $0 ˎRubyMotionҎ֎ٸᬎௐͨͷͰෆਖ਼͔֬͠Ε·ͤΜ
ൺֱ·ͱΊ Pros ωΠςΟϒΞϓϦ CocoaPods͑Δʂʂʂʂʂʂ CocoaTouchΛͬͯΕॻ͚Δ JSΑΓΦϒδΣΫτࢦͰॻ͖͍͢ Cons Android͑ͳ͍ ࠷ॳ͔Β༗ྉ
ࠓͷ RubyMotionͱ ✔ ࣗݾհ ✔ RubyMotion vs Titanium mobile/Phone Gap
✔ RubyMotion vs Objective-C RubyMotionʹΑΔiOS։ൃͷՄೳੑ ·ͱΊ
RubyMotion vs Objective-C Θ͔Γ͘͢͢ΔͨΊ vs Objective-Cͱݴ͍·ͨ͠ πʔϧνΣΠϯͱݴޠͷൺֱਖ਼͘͠ͳ͍ XcodeʴObjective-CΛ༻͍ͨඪ४తͳ։ൃͱͷൺֱ ൺֱ߲ 1.
༻͢ΔݴޠɿRuby vs Objective-C 2. ։ൃڥ ɿShell + Editor vs Xcode 3. ҆৺ײɹɹɹɿϥΠϒϥϦαϙʔτͳͲ
Ruby vs Objective-Cͦͷ̍ Objective-CͰग़དྷΔ͜ͱRubyͰ΄΅ग़དྷΔ Rubyͷඪ४ΫϥεNSObjectΛϕʔεʹ࡞ΒΕͯΔ ऑࢀরɺϙΠϯλɺGCDઐ༻ΠϯλʔϑΣΠε͋Γ ϝϞϦཧ Objective-C: ARC, MRC
RubyMotion: ARC෩ͷಠࣗཧ Πϯελϯεมʹೖ͢ΔͱΧϯτ͞ΕΔ
Ruby vs Objective-Cͦͷ̎ ܕ͚ Objective-Cɿ੩తͳܕνΣοΫ͋Γ RubyɿϏϧυ࣌ͷνΣοΫͳ͍ ϝλϓϩάϥϛϯά Objective-CɿΠϯετϩϖΫγϣϯ, performSelector, method
swizzling RubyɿΠϯετϩϖΫγϣϯ, send, define_method, instance_eval, alias_method, ΦʔϓϯΫϥε, ԋࢉࢠ(=ϝιου)Φʔόʔϩʔυ,...
Ruby vs Objective-Cͦͷ̏ จࣈྻૢ࡞ Objective-Cɿେมͦ͏ Rubyɿڧྗͳϝιου͕๛
Ruby vs Objective-Cͦͷ̐ Ϧςϥϧදه Objective-CɿਐԽͯ͠Δʂ Rubyɿγϯϓϧ
ݴޠൺֱ·ͱΊʢྑ͍ॴʣ Objective-C ੩తͳܕνΣοΫ ʑਐԽͯ͠ྑ͘ͳͬͯΔ Ruby γϯϓϧͳϧʔϧͰϝϞϦཧͰ͖Δ CRuby༝དྷͷڧྗͳϝλϓϩɾΈࠐΈͷϝιου
Objective-Cͷ։ൃڥ Xcode ิόονϦ InterfaceBuilder / StoryBoard breakpoint / LLDB ߴ͍ͱΑ͘ฉ͖·͢
ʢ͋·Γͬͯͳ͍Ͱ͢...ʣ
RubyMotionͷ։ൃڥ ࣗ༝ʹΤσΟλબ emacsͳΒmotion-mode.elͰิͱ͔͍Ζ͍Ζग़དྷΔ RubyMineʢIDEʣͰϒϨʔΫϙΠϯτଧͯΔ γΣϧ rakeʢRuby൛makeʣͰϏϧυ Interactive DebuggerʢRubyMotionͷREPLʣ guardʢϑΝΠϧมߋݕgemʣͰࣗಈςετ ib
ͱ͍͏gemΛ͏ͱInterfaceBuilder͑Δʂ
҆৺ײ Objective-C ຊՈͷ։ൃڥ CocoaPodsͰίʔυ࠶ར༻ ࠔͬͨͱ͖ʹใଟ͍ RubyMotion ຊՈͰͳ͍ͷͷiOSͷΞοϓσʔτʹଈରԠ CocoaPodsʢRubyMotionઐ༻ͷʣRubygems͑Δ ϝΠϯ։ൃऀʹຊਓʢ@watson1978͞Μʣ
None
←WWDC։࠵தͷ 2013-06-12
҆৺ײʹ͍ͭͯͷॴײ Objective-Cͷ΄͏͕ѹతͳ҆৺ײ͋Δͱࢥ͏ RubyMotionΛ͓͏ͱͨ࣌ͦ͠ΕͳΓʹ͔ࣗΒใ ΛूΊΔྗΛ͠ͳ͍ͱ͍͚ͳ͍ ͨͩɺجຊతʹࠔͬͨΒObjective-CͷίʔυΛϕλҠ২ Ͱ͖ΔͷͰͦΜͳʹࠔΒͳ͍ ຊʹࠔͬͨΒαϙʔτ͔@watson1978͞Μʹ ࣭ͯ͠ΈΔ
ࠓͷ RubyMotionͱ ✔ ࣗݾհ ✔ RubyMotion vs Titanium mobile/Phone Gap
✔ RubyMotion vs Objective-C ✔ RubyMotionʹΑΔiOS։ൃͷՄೳੑ ·ͱΊ
RubyMotionͷՄೳੑ̍ ඇৗʹ؆ܿͳίʔυΛॻ͘͜ͱ͕ग़དྷΔ ίʔυྔ͕ݮΕϝϯςφϯείετݮΔ ࠶ར༻ੑߴ·Δ UIΛDSLͰએݴతʹίʔυΛॻ͘ελΠϧʁ ͦͷͨΊʹύϑΥʔϚϯεएׯ٘ਜ਼ʁ
NSUserDefaults
None
None
RubyMotionͷՄೳੑ̎ αʔόʔαΠυͱͷ૬ੑ͕ྑ͍ʁ Railsͱ͔Sinatraͱ͔ಉ͡ݴޠͰॻ͚Δ motion-resource gemActiveRecordͱಉ͡Α͏ͳ I/FͰRESTfulAPIͱͷ௨৴͕ॻ͚Δ RailsଆAPIΛॻͨ͘ΊͷϥΠϒϥϦ͕͍ͬͯ ΔͷͰׂͱ؆୯ʹαʔόʔॻ͚Δ
Modelఆٛ ௨৴ॲཧ
ࠓͷ RubyMotionͱ ✔ ࣗݾհ ✔ RubyMotion vs Titanium mobile/Phone Gap
✔ RubyMotion vs Objective-C ✔ RubyMotionʹΑΔiOS։ൃͷՄೳੑ ✔ ·ͱΊ
·ͱΊ RubyMotioniOS։ൃʹ͓͚ΔબࢶͷҰͭʂʂ ͍Ζ͍Ζ͋Δ͚ͲͦΕͧΕదࡐదॴʂ ίʔυ͕؆ܿʹॻ͚ΔͷͰϓϩτλΠϓ ࡞Γ͍͢ͷͰʂ ͖ͦ͜ͷͷ্खͳΕʂʂʂʂʂͰؤுΔ
ͦΜͳ͜ΜͳͰ
࡞ͬͨʂʂʂʂ Shiori Shiori is a bookmark manager for github. http://github.com/ainame/Shiori
ͬͨgem BubbleWrap ProMotion NanoStoreInMotion (NanoStore from cocoapods)
σϞ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·͢
ࢀߟࢿྉ RubyMotion - Ruby for iOS and OS X http://www.rubymotion.com/
࣮ફRubyMotion // Speaker Deck https://speakerdeck.com/naoya/shi-jian-rubymotion Titanium Mobile ʙຊʹ͋ͬͨ͜Θ͍ʙ http://www.slideshare.net/haradaatsea4/titanium-mobile-16371136 PhoneGapͰֶͿϚϧνεΫϦʔϯରԠϋΠϒϦουΞϓϦ։ൃ - ୈ1ճ http://itpro.nikkeibp.co.jp/article/COLUMN/20121212/443628/ RubyMotion Metaprogramming | Clay Allsopp http://clayallsopp.com/posts/rubymotion-metaprogramming/