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.7k
iOSDC 2021 - App Store用スクリーンショットの自動生成をアラビア語対応してSwiftUIで実装してみた
ainame
0
5.4k
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
go.mod、DockerfileやCI設定に分散しがちなGoのバージョンをまとめて管理する / Go Connect #3
arthur1
10
2.4k
JaSST 24 九州:ワークショップ(は除く)実践!マインドマップを活用したソフトウェアテスト+活用事例
satohiroyuki
0
260
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
macOS でできる リアルタイム動画像処理
biacco42
7
1.9k
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
570
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
WEBエンジニア向けAI活用入門
sutetotanuki
0
300
Piniaの現状と今後
waka292
5
1.5k
役立つログに取り組もう
irof
26
8.7k
現場で役立つモデリング 超入門
masuda220
PRO
13
2.9k
飲食業界向けマルチプロダクトを実現させる開発体制とリアルな現状
hiroya0601
1
390
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Agile that works and the tools we love
rasmusluckow
327
21k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Writing Fast Ruby
sferik
626
61k
The Invisible Side of Design
smashingmag
297
50k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
RailsConf 2023
tenderlove
29
880
The Cult of Friendly URLs
andyhume
78
6k
Statistics for Hackers
jakevdp
796
220k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
The Power of CSS Pseudo Elements
geoffreycrofte
72
5.3k
Adopting Sorbet at Scale
ufuk
73
9k
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/