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
600
Apple HIG 正式名称クイズ結果発表 / HIG Quiz Result
usamik26
0
160
ゆめみ大技林製作委員会の立ち上げの話 / daigirin project
usamik26
0
310
@ViewLoadingプロパティラッパの紹介と自前で実装する方法 / @ViewLoading property wrapper implementation
usamik26
0
460
これからUICollectionViewを実践活用する人のためのガイド / Guide to UICollectionView
usamik26
1
720
Xcodeとの最近の付き合い方のはなし / Approach To Xcode
usamik26
2
650
UICollectionView Compositional Layout
usamik26
0
750
Coding Swift with Visual Studio Code and Docker
usamik26
0
490
Swift Extension for Visual Studio Code
usamik26
2
1k
Other Decks in Programming
See All in Programming
プログラミング教育のコスパの話
superkinoko
0
110
PHPによる"非"構造化プログラミング入門 -本当に熱いスパゲティコードを求めて- #phperkaigi
o0h
PRO
0
1k
GDG Super.init(version=6) - From Where to Wear : 모바일 개발자가 워치에서 발견한 인사이트
haeti2
0
540
Compose Navigation実装の見通しを良くする
hiroaki404
0
170
Django for Data Science (Boston Python Meetup, March 2025)
wsvincent
0
200
Windows版PHPのビルド手順とPHP 8.4における変更点
matsuo_atsushi
0
360
Devin入門と最近のアップデートから見るDevinの進化 / Introduction to Devin and the Evolution of Devin as Seen in Recent Update
rkaga
7
3.2k
CQRS+ES勉強会#1
rechellatek
0
380
NestJSのコードからOpenAPIを自動生成する際の最適解を探す
astatsuya
0
160
S3静的ホスティング+Next.js静的エクスポート で格安webアプリ構築
iharuoru
0
190
아직도 SOLID 를 '글'로만 알고 계신가요?
sh1mj1
0
350
2025/3/18 サービスの成長で生じる幅広いパフォーマンスの問題を、 AIで手軽に解決する
shirahama_x
0
160
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Music & Morning Musume
bryan
46
6.4k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
Unsuck your backbone
ammeep
669
57k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
GraphQLとの向き合い方2022年版
quramy
45
14k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
A designer walks into a library…
pauljervisheath
205
24k
For a Future-Friendly Web
brad_frost
176
9.6k
It's Worth the Effort
3n
184
28k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
8
690
YesSQL, Process and Tooling at Scale
rocio
172
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