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

JXUG Conference 2 West

USAMI Kosuke
November 08, 2014

JXUG Conference 2 West

iOS エンジニアが Xamarin を始めた話

第2回 Japan Xamarin User Group Conference 西日本編
https://jxug.connpass.com/event/166449/

USAMI Kosuke

November 08, 2014
Tweet

More Decks by USAMI Kosuke

Other Decks in Technology

Transcript

  1. About Me 4 Ӊࠤݟެีʢtwitter : @usamik26ʣ 4 ϑΣϯϦϧגࣜձࣾ ڞಉ։ൃ෦ 4

    iOS ΞϓϦ։ൃ 4 ϓϥΠϕʔτ 4 OS X ΞϓϦ։ൃ : CotEditorʢςΩετΤσΟλʣ
  2. ΫϩεϓϥοτϑΥʔϜ։ൃ 4 iOS / Android ΞϓϦ։ൃ͕ڞ௨ԽͰ͖Δ 4 ͜Ε͸େ͖ͳϝϦοτ 4 ࣮຿্ɺ྆ํͷΞϓϦ։ൃ͕ฒߦͯ͠ߦΘΕΔ͜ͱ͸

    ଟ͍ 4 iOS ΞϓϦ։ൃऀͱ Android ΞϓϦ։ൃऀͱͰɺΞ ϓϦͷ࢓༷ೝࣝҧ͍Λ๷͙ͷ͸Ҋ֎͍ͨ΁Μ
  3. MVVM 4 εϚϗΞϓϦ։ൃ͕ MVVM ͰͰ͖Δ 4 ݸਓతʹܾఆଧͱͳͬͨͷ͸͜ͷ఺ 4 iOS ΞϓϦ։ൃͰ͸

    ReactiveCocoa Λ࢖͏ͱ͍͏બ ୒͕͋Δ͕ɺ·ͩϓϥΫςΟεཱ͕֬͞Ε͍ͯͳ͍ײ ͡ 4 C# / .NET จԽݍͰ͔ͭͪΘΕ͖ͯͨઃܭख๏͔ͩ ΒɺXamarin ͸૬ੑ͕Α͍
  4. MVVM (Model - View - ViewModel) 4 View ͸ϓϥοτϑΥʔϜґଘ 4

    View ͱ ViewModel ͸ Binding Ͱ࿈ܞ 4 ViewModel / Model ͕ϩδοΫ෦෼ɺϓϥοτϑΥʔϜඇ ґଘ
  5. MVVM ͱϓϥοτϑΥʔϜͷؔ܎ 4 C# / .NET จԽݍͰ͔ͭͪΘΕ͖ͯͨ 4 ౰ॳ͸ओʹ Windows

    ϓϥοτϑΥʔϜ্ͷΈͰ࢖ΘΕͯ ͍ͨʁ 4 ͔͠͠ɺViewModel ΛϓϥοτϑΥʔϜඇґଘʹͰ͖Δͨ ΊɺΫϩεϓϥοτϑΥʔϜ։ൃͱ૬ੑ͕Α͍
  6. MVVM ͱεϚϗϓϥοτϑΥʔϜ 4 View Λ֤ϓϥοτϑΥʔϜͰ։ൃ͢Δ 4 ͜ͷͨΊɺ֤ϓϥοτϑΥʔϜͷੈք؍Λେࣄʹ͢Δ͜ͱ ͕Ͱ͖Δ 4 iOS

    Β͠͞ɺAndroid Β͠͞͸େࣄ 4 ΫϩεϓϥοτϑΥʔϜ։ൃͰͦ͜ MVVM ͷྑ͕͞ੜ͖Δ ͷͰ͸ɺͱউखʹࢥ͍ͬͯΔ
  7. ·ͣ࠷ॳʹ 4 C# Θ͔Βͳ͍ 4 ৮ͬͨ͜ͱ͸͚͋ͬͨͲ C# 1.0 / 2.0

    ͘Β͍ 4 ͱΓ͋͑ͣجຊతͳจ๏Λ͞Βͬͱݟͯɺ͋ͱ͸࣮຿ͱ ฒߦͰษڧ
  8. Α͘΍Δϛε 4 Xamarin Studio ্Ͱ Objective-C ͷίʔυΛॻ͍ͯ͠· ͏ 4 [UIImage

    ima ͘Β͍·Ͱॻ͍ͯɺ͋Εิ׬͞Εͳ͍ͳ ͋ɺͱ͔ 4 ϝιου໊͕Θ͔Βͳ͘ͳΔ 4 ໋໊نଇ͕ Objective-C ෩ͱ C# ෩Ͱ͸ҧ͍ͬͯΔ
  9. ศརΫϥε 4 UITableViewSource 4 UITableViewDataSource ͱ UITableViewDelegate ͷ ౷߹ 4

    ͍ͭ͜Β͸͍͍ͩͨ͋Θͤͯ࢖͏͜ͱ͕ଟ͍ͷͰͪΐͬ ͱָʹͳΔ 4 UICollectionViewSource ΋͋Δ
  10. MvvmCross ϓϩδΣΫτߏ੒ 4 Core ϓϩδΣΫτ : Model / ViewModel 4

    Touch ϓϩδΣΫτ : iOS View 4 Droid ϓϩδΣΫτ : Android View
  11. ݒ೦఺ 4 64ϏοτରԠɾɾɾʁ 4 Xamarin ͷ Unified ͷ࢓૊Έʹ MvvmCross ͕ରԠ͠

    ͯ͘Εͳ͍ͱͭΒ͍ 4 Forms ʹҠߦͨ͠΄͏͕͍͍ͷʁ 4 Forms Ͱ iOS / Android ͦΕͧΕͷੈք؍ΛେࣄʹͰ ͖ΔͳΒ
  12. ·ͱΊ 4 Xamarin Ͱ C# / MVVM Ͱ iOS ΞϓϦ࡞Δͷؾ࣋ͪΑ͘

    ͳ͖ͬͯͨ 4 ͍·ઈࢍ Xamarin Ҋ݅๩͍͠ͷͰࢮͳͳ͍ఔ౓ʹ͕Μ͹ Δ