Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RubyMotionについて #mixiwwdc

45c0e67049c82c238143b82a1660a713?s=47 ainame
June 24, 2013

RubyMotionについて #mixiwwdc

WWDCに行ってきたけど内容については一切話せません @ mixi
にて発表

45c0e67049c82c238143b82a1660a713?s=128

ainame

June 24, 2013
Tweet

Transcript

  1. RubyMotionʹ͍ͭͯ 2013-06-25 גࣜձࣾϛΫγΟ @ainame

  2. RubyMotion

  3. None
  4. 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.
  5. Warning

  6. ຊൃදΛߦ͏@ainame͸iOS։ൃΛ ຊ֨తʹۀ຿Ͱߦ͏͜ͱແ͘ ࠓ೥ͷ3݄ࠒ͔ΒRubyMotionΛܦ༝ͯ͠ iOS։ൃ஌ࣝΛಘͨͷΈͷएഐऀͰ͢ɻ ຊൃද͸Objective-C΍Titanium mobile΍PhoneGapΛ ᩫΊΔҙਤ͸શ͍͘͟͝·ͤΜɻ ෆద੾ͳൃݴ͕ग़ͯ͠·͏͜ͱ΋ ͋Δ͔΋͠Ε·ͤΜ͕·͕ྃ͢͝ঝԼ͍͞ɻ

  7. ࣗݾ঺հ @ainame / Satoshi Namai גࣜձࣾϛΫγΟ - ϓϩάϥϚ झຯRubyͰձࣾͰ͸PerlΛॻ͍͍ͯ·͢ ࠷ۙεϚϗΤϯδχΞͬΆ͕͞ग़͖ͯͨ

    emacsͷ֦ு motion-mode.el ࡞ͬͯ·͢
  8. ࠓ೔ͷ࿩୊ RubyMotionͱ͸ ✔ ࣗݾ঺հ ✔ RubyMotion vs Titanium mobile/Phone Gap

    RubyMotion vs Objective-C RubyMotionʹΑΔiOS։ൃͷՄೳੑ ·ͱΊ
  9. RubyMotion vs Titanium mobile/PhoneGap ͲͪΒ΋Objective-CҎ֎ͰiOSΞϓϦॻ͚Δ ͦ΋ͦ΋ͪΌΜͱ࢖͑Δͷʁ Titaniumͱ͔Phone Gapͱ͸Կ͕ҧ͏ͷʁ

  10. RubyMotionͷ͕͜͜ҧ͏ Objective-CͷRuntime্ʹ࣮૷͞ΕͨRuby ϒϦοδͰͳ͍ ଎͍ Objective-Cͱ௚઀ϦϯΫͰ͖Δ ࣮ફRubyMotion(@naoya_ito) ΑΓ https://speakerdeck.com/naoya/shi-jian-rubymotion

  11. None
  12. None
  13. None
  14. None
  15. None
  16. పఈൺֱ!! ࢓૊Έ ࢖༻ݴޠ ։ൃ؀ڥ औΓר͘ ؀ڥ 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Ҏ֎͸ٸᬎௐ΂ͨͷͰෆਖ਼͔֬΋͠Ε·ͤΜ
  17. ൺֱ·ͱΊ Pros ωΠςΟϒΞϓϦ CocoaPods࢖͑Δʂʂʂʂʂʂ CocoaTouchΛ஌ͬͯΕ͹ॻ͚Δ JSΑΓΦϒδΣΫτࢦ޲Ͱॻ͖΍͍͢ Cons Android͸࢖͑ͳ͍ ࠷ॳ͔Β༗ྉ

  18. ࠓ೔ͷ࿩୊ RubyMotionͱ͸ ✔ ࣗݾ঺հ ✔ RubyMotion vs Titanium mobile/Phone Gap

    ✔ RubyMotion vs Objective-C RubyMotionʹΑΔiOS։ൃͷՄೳੑ ·ͱΊ
  19. RubyMotion vs Objective-C Θ͔Γ΍͘͢͢ΔͨΊ vs Objective-Cͱݴ͍·ͨ͠ πʔϧνΣΠϯͱݴޠͷൺֱ͸ਖ਼͘͠ͳ͍ XcodeʴObjective-CΛ༻͍ͨඪ४తͳ։ൃͱͷൺֱ ൺֱ߲໨ 1.

    ࢖༻͢ΔݴޠɿRuby vs Objective-C 2. ։ൃ؀ڥ ɿShell + Editor vs Xcode 3. ҆৺ײɹɹɹɿϥΠϒϥϦ΍αϙʔτͳͲ
  20. Ruby vs Objective-Cͦͷ̍ Objective-CͰग़དྷΔ͜ͱ͸RubyͰ΄΅ग़དྷΔ Rubyͷඪ४Ϋϥε͸NSObjectΛϕʔεʹ࡞ΒΕͯΔ ऑࢀরɺϙΠϯλɺGCD΋ઐ༻ΠϯλʔϑΣΠε͋Γ ϝϞϦ؅ཧ Objective-C: ARC, MRC

    RubyMotion: ARC෩ͷಠࣗ؅ཧ Πϯελϯεม਺ʹ୅ೖ͢ΔͱΧ΢ϯτ͞ΕΔ౳
  21. Ruby vs Objective-Cͦͷ̎ ܕ෇͚ Objective-Cɿ੩తͳܕνΣοΫ͋Γ RubyɿϏϧυ࣌ͷνΣοΫ͸ͳ͍ ϝλϓϩάϥϛϯά Objective-CɿΠϯετϩϖΫγϣϯ, performSelector, method

    swizzling RubyɿΠϯετϩϖΫγϣϯ, send, define_method, instance_eval, alias_method, ΦʔϓϯΫϥε, ԋࢉࢠ(=ϝιου)Φʔόʔϩʔυ,...
  22. Ruby vs Objective-Cͦͷ̏ จࣈྻૢ࡞ Objective-Cɿେมͦ͏ Rubyɿڧྗͳϝιου͕๛෋

  23. Ruby vs Objective-Cͦͷ̐ Ϧςϥϧදه Objective-CɿਐԽͯ͠Δʂ Rubyɿγϯϓϧ

  24. ݴޠൺֱ·ͱΊʢྑ͍ॴʣ Objective-C ੩తͳܕνΣοΫ ೔ʑਐԽͯ͠ྑ͘ͳͬͯΔ Ruby γϯϓϧͳϧʔϧͰϝϞϦ؅ཧͰ͖Δ CRuby༝དྷͷڧྗͳϝλϓϩɾ૊ΈࠐΈͷϝιου

  25. Objective-Cͷ։ൃ؀ڥ Xcode ิ׬όονϦ InterfaceBuilder / StoryBoard breakpoint / LLDB ׬੒౓ߴ͍ͱΑ͘ฉ͖·͢

    ʢ͋·Γ࢖ͬͯͳ͍Ͱ͢...ʣ
  26. RubyMotionͷ։ൃ؀ڥ ࣗ༝ʹΤσΟλબ୒ emacsͳΒmotion-mode.elͰิ׬ͱ͔͍Ζ͍Ζग़དྷΔ RubyMineʢIDEʣͰϒϨʔΫϙΠϯτଧͯΔ γΣϧ rakeʢRuby൛makeʣͰϏϧυ Interactive DebuggerʢRubyMotionͷREPLʣ guardʢϑΝΠϧมߋݕ஌gemʣͰࣗಈςετ ib

    ͱ͍͏gemΛ࢖͏ͱInterfaceBuilder΋࢖͑Δʂ
  27. ҆৺ײ Objective-C ຊՈͷ։ൃ؀ڥ CocoaPodsͰίʔυ࠶ར༻ ࠔͬͨͱ͖ʹ৘ใଟ͍ RubyMotion ຊՈͰ͸ͳ͍΋ͷͷiOSͷΞοϓσʔτʹ͸ଈ೔ରԠ CocoaPods΋ʢRubyMotionઐ༻ͷʣRubygems΋࢖͑Δ ϝΠϯ։ൃऀʹ೔ຊਓʢ@watson1978͞Μʣ

  28. None
  29. ←WWDC։࠵தͷ 2013-06-12

  30. ҆৺ײʹ͍ͭͯͷॴײ Objective-Cͷ΄͏͕ѹ౗తͳ҆৺ײ͋Δͱࢥ͏ RubyMotionΛ࢖͓͏ͱͨ࣌͠͸ͦΕͳΓʹࣗ෼͔Β৘ใ ΛूΊΔ౒ྗΛ͠ͳ͍ͱ͍͚ͳ͍ ͨͩɺجຊతʹࠔͬͨΒObjective-CͷίʔυΛϕλҠ২ Ͱ͖ΔͷͰͦΜͳʹࠔΒͳ͍ ຊ౰ʹࠔͬͨΒαϙʔτ͔@watson1978͞Μʹ ࣭໰ͯ͠ΈΔ

  31. ࠓ೔ͷ࿩୊ RubyMotionͱ͸ ✔ ࣗݾ঺հ ✔ RubyMotion vs Titanium mobile/Phone Gap

    ✔ RubyMotion vs Objective-C ✔ RubyMotionʹΑΔiOS։ൃͷՄೳੑ ·ͱΊ
  32. RubyMotionͷՄೳੑ̍ ඇৗʹ؆ܿͳίʔυΛॻ͘͜ͱ͕ग़དྷΔ ίʔυྔ͕ݮΕ͹ϝϯςφϯείετ΋ݮΔ ࠶ར༻ੑߴ·Δ UIΛDSLͰએݴతʹίʔυΛॻ͘ελΠϧʁ ͦͷͨΊʹύϑΥʔϚϯε͸एׯ٘ਜ਼ʁ

  33. NSUserDefaults

  34. None
  35. None
  36. RubyMotionͷՄೳੑ̎ αʔόʔαΠυͱͷ૬ੑ͕ྑ͍ʁ Railsͱ͔Sinatraͱ͔ಉ͡ݴޠͰॻ͚Δ motion-resource gem͸ActiveRecordͱಉ͡Α͏ͳ I/FͰRESTfulAPIͱͷ௨৴͕ॻ͚Δ Railsଆ΋APIΛॻͨ͘ΊͷϥΠϒϥϦ͕੔͍ͬͯ ΔͷͰׂͱ؆୯ʹαʔόʔॻ͚Δ

  37. Modelఆٛ ௨৴ॲཧ

  38. ࠓ೔ͷ࿩୊ RubyMotionͱ͸ ✔ ࣗݾ঺հ ✔ RubyMotion vs Titanium mobile/Phone Gap

    ✔ RubyMotion vs Objective-C ✔ RubyMotionʹΑΔiOS։ൃͷՄೳੑ ✔ ·ͱΊ
  39. ·ͱΊ RubyMotion͸iOS։ൃʹ͓͚Δબ୒ࢶͷҰͭʂʂ ͍Ζ͍Ζ͋Δ͚ͲͦΕͧΕదࡐదॴʂ ίʔυ͕؆ܿʹॻ͚ΔͷͰϓϩτλΠϓ ࡞Γ΍͍͢ͷͰ͸ʂ ޷͖ͦ͜΋ͷͷ্खͳΕʂʂʂʂʂͰؤுΔ

  40. ͦΜͳ͜ΜͳͰ

  41. ࡞ͬͨʂʂʂʂ Shiori Shiori is a bookmark manager for github. http://github.com/ainame/Shiori

    ࢖ͬͨgem BubbleWrap ProMotion NanoStoreInMotion (NanoStore from cocoapods)
  42. σϞ

  43. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·͢

  44. ࢀߟࢿྉ 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/