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
Azure AI Foundryではじめてのマルチエージェントワークフロー
seosoft
0
170
RailsGirls IZUMO スポンサーLT
16bitidol
0
180
ふつうの技術スタックでアート作品を作ってみる
akira888
1
840
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
390
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
1
10k
Python型ヒント完全ガイド 初心者でも分かる、現代的で実践的な使い方
mickey_kubo
1
110
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
870
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
220
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
140
Deep Dive into ~/.claude/projects
hiragram
14
2.5k
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
820
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
270
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
Navigating Team Friction
lara
187
15k
A better future with KSS
kneath
238
17k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Building Adaptive Systems
keathley
43
2.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
54k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
KATA
mclloyd
30
14k
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