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
Realm Xamarin
Search
USAMI Kosuke
June 22, 2016
Programming
0
340
Realm Xamarin
http://kanmoba.connpass.com/event/33117/
USAMI Kosuke
June 22, 2016
Tweet
Share
More Decks by USAMI Kosuke
See All by USAMI Kosuke
Onsager代数とその周辺 / Onsager algebra tsudoi
usamik26
0
640
Apple HIG 正式名称クイズ結果発表 / HIG Quiz Result
usamik26
0
180
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
330
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
480
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
750
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
670
UICollectionView Compositional Layout
usamik26
0
790
Coding Swift with Visual Studio Code and Docker
usamik26
0
510
Swift Extension for Visual Studio Code
usamik26
2
1k
Other Decks in Programming
See All in Programming
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
390
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
270
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
1
18k
Discover Metal 4
rei315
2
130
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
410
Deep Dive into ~/.claude/projects
hiragram
14
2.5k
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
550
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
510
VS Code Update for GitHub Copilot
74th
2
640
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
250
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
72
4.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
Speed Design
sergeychernyshev
32
1k
Building Adaptive Systems
keathley
43
2.7k
Raft: Consensus for Rubyists
vanstee
140
7k
Facilitating Awesome Meetings
lara
54
6.4k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
Thoughts on Productivity
jonyablonski
69
4.7k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
740
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Transcript
Realm Xamarin USAMI Kosuke Fenrir Inc.
Xamarin
Xamarin » C# Ͱ iOS / Android ωΠςΟϒΞϓϦ։ൃ » iOS
/ Android ͰίʔυΛڞ༗Մೳ » .NET ϥΠϒϥϦ / ωΠςΟϒϥΠϒϥϦΛ༻Մೳ
ݸਓ։ൃϥΠηϯεແঈԽ » Xamarin ϥΠηϯε͕ Visual Studio ϥΠηϯεͱ౷߹ » ݸਓ։ൃϥΠηϯε͕ແঈʹʢCommunity Editionʣ
http://www.fenrir-inc.com/jp/business/app/xamarin/
Xamarin Consulting Partner
Realm
Realm » ϞόΠϧΞϓϦ͚σʔλϕʔε » Objective-C / Swift / Java /
React Native / Xamarin » ͍͘͢ɺύϑΥʔϚϯε༏ल
Realm 1.0 » Objective-C / Swift / Java ͕ beta
͔Β 1.0 » beta Ͱͳ͘ͳͬͨ͜ͱͰɺಋೖͷෑډ͕͘ͳͬͨ » React Native / Xamarin beta ʢ·ͩొ͔ͨ͠Γʣ
Introducing Realm Xamarin on 2016/05/11
Realm Xamarin
Install » NuGet Ͱ؆୯ʹಋೖͰ͖Δ
Model public class Person : RealmObject { public string Name
{ get; set; } public int Age { get; set; } }
Model ͷσʔλܕ » ֤ϓϦϛςΟϒܕʢbool,char,byte,short,int,long,float,doubleʣ » string » DateTimeOffset » Null
ڐ༰ܕʢint? ͳͲʣՄೳɺnull ༻Մೳ
getter / setter ͷࣗಈੜ » ࣗಈ࣮ϓϩύςΟɺgetter ͱ setter ͕ࣗಈੜ͞ΕΔ »
ͦͷதͰ Realm ෦ετϨʔδͱؔ࿈͚͞ΕΔ » Ignore ଐੑΛ͚ͭΔͱࣗಈੜ͞Εͳ͍ » ΧελϜ getter / setter ্ॻ͖͞Εͳ͍
ΦϒδΣΫτͷऔಘʢΫΤϦʣ public IEnumerable<Person> Persons { get; private set; } public
PersonViewModel() { var realm = Realm.GetInstance(); Persons = realm.All<Person>() }
ΦϒδΣΫτͷՃ public AddPerson() { var realm = Realm.GetInstance(); using(var transaction
= realm.BeginWrite()) { var person = realm.CreateObject<Person>(); person.Name = "Hoge"; person.Age = 20; transaction.Commit(); } // ࣗಈతʹ transaction ͕ Dispose() ͞ΕΔ }
ΦϒδΣΫτͷࣗಈߋ৽ ʢઌ΄ͲͷίʔυΛ࠶ܝʣ public PersonViewModel() { var realm = Realm.GetInstance(); Persons
= realm.All<Person>() // ΦϒδΣΫτΛՃͨ͠ΒɺPersons ͕ࣗಈతʹߋ৽͞ΕΔ // ࠶ All ΫΤϦΛ࣮ߦ͢Δඞཁͳ͍ }
LINQ ʹΑΔΫΤϦ // ϝιουߏจ Persons = realm.All<Person>() .Where(p => p.Age
< 20); // ΫΤϦࣜ Persons = from p in realm.All<Person>() where p.Age < 20 select p;
Realm Xamarin ·ͱΊ » ͱͯ؆୯ʹ͑Δ » C# ͱͯࣗ͠વʹॻ͚Δ » ࢀߟࢿྉ
» Realm Xamarin https://realm.io/jp/docs/xamarin/latest/ » Cross-Platform Development with Xamarin.Forms and Realm | Xamarin Blog