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
NCMB SDK 各プラットフォームの違いを探る / ncmb sdk
Search
KOYAMA Tetsuji
February 07, 2017
Programming
0
200
NCMB SDK 各プラットフォームの違いを探る / ncmb sdk
2017年2月7日に開催されたNCMB-UG rebuildで発表した資料です。
KOYAMA Tetsuji
February 07, 2017
Tweet
Share
More Decks by KOYAMA Tetsuji
See All by KOYAMA Tetsuji
全日本PHPカンファレンス2024スタンプラリーについて/stamprally-php2024
koyhoge
0
130
日本PHPカンファレンス2024スタンプラリーとその実装/phpcon-stamprally
koyhoge
1
1.1k
日本のPHPカンファレンスの歩みと、その辺もろもろ/phpcon_japan_history
koyhoge
0
250
Inside SWOOLE: 非同期処理はどのようにして動くのか/inside_swoole
koyhoge
0
18k
映画を年300本観る技術/watch_300_movies_in_a_year
koyhoge
0
1.2k
Swooleで実装するPHP非同期処理の世界/phpcondo2019-swoole
koyhoge
3
5.1k
CloudFormation と FaaS のはざま - Kubernetes の設計思想を探る -/cf-faas-k8s
koyhoge
0
1.4k
ITイベントマニアから見る技術イベントの動向/techevent
koyhoge
0
300
Skaffoldを使ってKubernetes してみた/skaffold_k8s
koyhoge
2
1.3k
Other Decks in Programming
See All in Programming
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
nekko cloudにおけるProxmox VE利用事例
irumaru
3
420
103 Early Hints
sugi_0000
1
220
たのしいparse.y
ydah
3
120
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
660
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
670
CSC305 Lecture 25
javiergs
PRO
0
130
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
Symfony Mapper Component
soyuka
2
730
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Documentation Writing (for coders)
carmenintech
66
4.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Side Projects
sachag
452
42k
BBQ
matthewcrist
85
9.4k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
GitHub's CSS Performance
jonrohan
1030
460k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Transcript
/$.#4%, ֤ϓϥοτϑΥʔϜͷҧ͍Λ୳Δ NCMBΤόϯδΣϦετ খࢁࢤ 2017-02-07 NCMB-UG rebuild
ࢲ୭ • খࢁࢤ (koyhoge) • 20155݄ΑΓNCMBΤόϯδΣϦετ • http://koyhogetech.hatenablog.com/entry/20150507/ ncmb •
ຊUNIXϢʔβձɺຊPostgreSQLϢʔβձɺຊPHP ϢʔβձʹؔΘΔ • NCMB Android SDK v2 ͷॳظ։ൃʹࢀՃ
/$.#4%, • ֤ݴޠɺϓϥοτϑΥʔϜຖʹ༻ҙ͞Ε͍ͯΔ • ެࣜҎԼͷ4ͭ • Objective-C (iOS) • Java
(Android) • JavaScript (node, Monaca) • C# (Unity)
ݴޠ͝ͱͷҧ͍Ͳͷ͘Β͍ • ֤ݴޠͰͰ͖Δ͜ͱ͕ҧ͏ • ϓϥοτϑΥʔϜಛ༗ͷ࡞๏͋Δ • ओཁػೳʹର֤ͯ͠SDKͷҧ͍Λݟ͍ͯ͘ • ॳظԽ •
σʔλετΞ • ϢʔβϩάΠϯ • ACL
ॳظԽ J04 "OESPJE • iOS • Android [NCMB setApplicationKey:@"API_KEY", clientKey:@"CLIENT_KEY"];
public class MainActivity extends AppComaptActivity { @override protected void onCreate(Bundle savedInstanceState) { // <省略> NCMB.initialize(this, "API_KEY", "CLIENT_KEY"); }
ॳظԽ +BWB4DSJQU 6OJUZ • JavaScript • Unity • ॳظԽSDKͰࣗಈͰߦΘΕΔɻAPP_KEY, CLIENT_KEY
GUIઃఆύωϧNCMBSettingsʹ ొɻ var NCMB = NCMB || require("./lib/ncmb"); var ncmb = new NCMB("API_KEY", "CLIENT_KEY");
σʔλετΞ J04 NCMBObject *obj = [NCMBObject objectWithClassName:@“MyClass”]; [obj setObject:@"value" forKey:@"keyname"];
[obj saveInBackgroundWithBlock:^(NSError *error) { if (error) { // 失敗処理 } else { // 成功処理 } }];
σʔλετΞ "OESPJE NCMBObject obj = new NCMBObject("MyClass"); obj.put("keyname", "value"); obj.saveInBackground(new
DoneCallback() { @override public void done(NCMBException e) { if (e != null) { // 失敗処理 } else { // 成功処理 } } });
σʔλετΞ +BWB4DSJQU var MyClass = ncmb.DataStore("MyClass"); var obj = new
MyClass({keyname: "value"}); obj.save() .then(function(result) { // 成功処理 }) .catch (function(err) { // 失敗処理 });
σʔλετΞ 6OJUZ NCMBObject obj = new NCMBObject("MyClass"); obj.Add("keyname", "value"); obj.SaveAsync
((NCMBException e) => { if (e != null) { // 失敗処理 } else { // 成功処理 } });
ϢʔβϩάΠϯ J04 [NCMBUser logInWithUsernameInBackground:@"username" password:@"password" block:^(NCMBUser *user, NSError *error) {
// 省略 }];
ϢʔβϩάΠϯ "OESPJE NCMBUser.loginInBackground(username, password, new LoginCallback() { @override public void
done(NCMBUser user, NCMBException e) { // 省略 } });
ϢʔβϩάΠϯ +BWB4DSJQU ncmb.User.login("username", "password") .then(function(result) { // ログイン成功 }) .catch
(function(err) { // ログイン失敗 });
ϢʔβϩάΠϯ 6OJUZ NCMBUser.LogInAsync("username", "password", (NCMBException e) => { if (e
!= null) { // ログイン失敗 } else { // ログイン成功 } });
"$- J04 NCMBACL *acl = [NCMBACL ACL]; [acl setPublicReadAccess:YES]; NCMBObject
*obj = [NCMBObject objectWithClassName:@"aclTest"]; [obj setACL:acl]; NSError *e = nil; [obj save:&e];
"$- "OESPJE NCMBAcl acl = new NCMBAcl(); acl.setPublicReadAccess(true); NCMBObject obj
= new NCMBObject("aclTest"); obj.setAcl(acl);
"$- +BWB4DSJQU var acl = new ncmb.Acl(); acl.setPublicReadAccess(true); var obj
= ncmb.DataStore("aclTest"); obj.set("acl", acl); obj.save();
"$- 6OJUZ NCMBACL acl = new NCMBACL(); acl.PublicReadAccess = true;
NCMBObject obj = new NCMBObject("aclTest"); obj.ACL = acl;
·ͱΊ • ಉҰͷREST APIΛλʔήοτʹ͍ͯ͠ΔͷͰߟ͑ํ ಉ͡ɻ • ίʔϧόοΫख๏ͳͲʹݴޠ͝ͱͷҧ͍ • ϝιου໊Ҋ֎౷Ұ͞Ε͍ͯͳ͍