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.9k
iOSDC 2021 - App Store用スクリーンショットの自動生成をアラビア語対応してSwiftUIで実装してみた
ainame
0
5.5k
DNN/GPU with Ruby #rubykaigi
ainame
2
3.1k
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
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
Zoneless Testing
rainerhahnekamp
0
120
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
useSyncExternalStoreを使いまくる
ssssota
6
1k
バグを見つけた?それAppleに直してもらおう!
uetyo
0
170
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
110
HTTP compression in PHP and Symfony apps
dunglas
2
1.7k
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Documentation Writing (for coders)
carmenintech
66
4.5k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Scaling GitHub
holman
458
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
Gamification - CAS2011
davidbonilla
80
5.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Designing Experiences People Love
moore
138
23k
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/