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
190
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
120
日本PHPカンファレンス2024スタンプラリーとその実装/phpcon-stamprally
koyhoge
1
1k
日本のPHPカンファレンスの歩みと、その辺もろもろ/phpcon_japan_history
koyhoge
0
240
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.2k
Other Decks in Programming
See All in Programming
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
960
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Outline View in SwiftUI
1024jp
1
330
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
Contemporary Test Cases
maaretp
0
140
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
Better Code Design in PHP
afilina
PRO
0
130
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
最新TCAキャッチアップ
0si43
0
190
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Building Your Own Lightsaber
phodgson
103
6.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
We Have a Design System, Now What?
morganepeng
50
7.2k
How STYLIGHT went responsive
nonsquared
95
5.2k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Adopting Sorbet at Scale
ufuk
73
9.1k
Six Lessons from altMBA
skipperchong
27
3.5k
Done Done
chrislema
181
16k
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Λλʔήοτʹ͍ͯ͠ΔͷͰߟ͑ํ ಉ͡ɻ • ίʔϧόοΫख๏ͳͲʹݴޠ͝ͱͷҧ͍ • ϝιου໊Ҋ֎౷Ұ͞Ε͍ͯͳ͍