SlideShare a Scribd company logo
1 of 20
Download to read offline
5分でわかったつもりになる
Parse.com
Parse is the cloud app platform for
iOS, Android, JavaScript, Windows 8,
Windows Phone 8, and OS X.
Parse は BaaS ( Backend as a Service)
モバイルアプリ開発のサーバサイド部分を肩代わ
りしてくれる
1.ユーザ管理機能
2.サーバサイド実装
3.サードパーティとの連携
ユーザ管理機能
データのread/writeが簡単
String, Number, Boolean, Date, File, GeoPoint,
Array, Object, Pointer, Relation が保存できる
// Saving Object
PFObject *gameScore = [PFObject objectWithClassName:@"GameScore"];
[gameScore setObject:[NSNumber numberWithInt:1337] forKey:@"score"];
[gameScore setObject:@"Kenta TSUJI" forKey:@"playerName"];
[gameScore setObject:[NSNumber numberWithBool:NO] forKey:@"cheatMode"];
[gameScore saveInBackground];
// Query
PFQuery *query = [PFQuery queryWithClassName:@"GameScore"];
[query whereKey:@"playerName" equalTo:@"Kenta TSUJI"];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
   if (!error) {
     NSLog(@"Successfully retrieved %d scores.", objects.count);
   } else {
     NSLog(@"Error: %@ %@", error, [error userInfo]);
  }
}];
ブラウザからデータの確認ができる
-データの追加、書き換えも可能
データのread/writeが簡単
objectId	 	 	 	 	 	 	 :	 識別子
cheatMode	 	 	 	 	 	 :	 追加したカラム
playerName	 	 	 	 	 :	 追加したカラム
score	 	 	 	 	 	 	 	 	 	 :	 追加したカラム
createdAt	 	 	 	 	 	 :	 オブジェクトの生成日時(GMT)
updatedAt	 	 	 	 	 	 :	 オブジェクトの最終変更日時(GMT)
ACL	 	 	 	 	 	 	 	 	 	 	 	 :	 アクセスコントロール
ユーザ登録・ログインが簡単
// Signing up
PFUser *user = [PFUser user];
user.username = @"username"; // required
user.password = @"password"; // required
user.email = @"email@example.com"; // optional
[user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (!error) {
// success
    }
}];
// Logging in
[PFUser logInWithUsernameInBackground:@"username"
password:@"password"
  block:^(PFUser *user, NSError *error) {
    if (user) {
// Do stuff after successful login.
    }
}];
Facebook/twitter連携が簡単
// Linking
if (![PFFacebookUtils isLinkedWithUser:user]) {
    [PFFacebookUtils linkUser:user
permissions:nil
block:^(BOOL succeeded, NSError *error) {
        if (succeeded) {
            NSLog(@"Woohoo, user logged in with Facebook!");
        }
    }];
}
// Linking
if (![PFTwitterUtils isLinkedWithUser:user]) {
    [PFTwitterUtils linkUser:user
block:^(BOOL succeeded, NSError *error) {
        if ([PFTwitterUtils isLinkedWithUser:user]) {
            NSLog(@"Woohoo, user logged in with Twitter!");
        }
    }];
}
アクセスコントロール設定が簡単
{"userId":{"read":true,"write":true}}
すべてのオブジェクトに対して、
user/roleごとにread/writeのアクセス権限が設定できる
メール認証が簡単
Userテーブルのデフォルトカラム
objectId	 	 	 	 	 	 	 :	 識別子
username	 	 	 	 	 	 	 :	 ユーザ名(required)
password	 	 	 	 	 	 	 :	 パスワード(required)
authData	 	 	 	 	 	 	 :	 Facebook/twitterの認証情報
emailVerified	 	 :	 メール認証フラグ
email	 	 	 	 	 	 	 	 	 	 :	 メールアドレス
createdAt	 	 	 	 	 	 :	 ユーザの生成日時(GMT)
updatedAt	 	 	 	 	 	 :	 ユーザの最終変更日時(GMT)
ACL	 	 	 	 	 	 	 	 	 	 	 	 :	 アクセスコントロール
設定画面から Verifying user emails を ON にするだけ
1.emailVerified が false のユーザはログインできない
2.サインアップ時にメールが届く
3.リンクをタップすると emailVerified が true になる
プッシュ通知が簡単
// Find devices associated with these users
PFQuery *pushQuery = [PFInstallation query];
[pushQuery whereKey:@"user" matchesQuery:userQuery];
 
// Send push notification to query
PFPush *push = [[PFPush alloc] init];
[push setQuery:pushQuery]; // Set our Installation query
[push setMessage:@"Free hotdogs at the Parse concession stand!"];
[push sendPushInBackground];
PFInstallation *installation = [PFInstallation currentInstallation];
[installation setObject:[PFUser currentUser] forKey:@"owner"];
[installation saveInBackground];
サーバサイド実装
サーバサイドの関数実行が簡単
Parse.Cloud.define("averageStars", function(request, response) {
   var query = new Parse.Query("Review");
   query.equalTo("movie", request.params.movie);
   query.find({
     success: function(results) {
       var sum = 0;
       for (var i = 0; i < results.length; ++i) {
         sum += results[i].get("stars");
       }
       response.success(sum / results.length);
     },
     error: function() {
       response.error("movie lookup failed");
     }
   });
});
timeout は 15 seconds
サーバサイドの関数実行が簡単
// iOS
[PFCloud callFunctionInBackground:@"averageStars"
                   withParameters:@{@"movie": @"The Matrix"}
                            block:^(NSNumber *ratings, NSError *error) {
   if (!error) {
NSLog(@"%@", ratings);
  }
}];
// Android
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("movie", "The Matrix");
ParseCloud.callFunctionInBackground(
"averageStars", params, new FunctionCallback<Float>() {
    void done(Float ratings, ParseException e) {
        if (e == null) {
         Log.d(ratings);
        }
    }
});
データ書き込み前後のトリガー実装が簡単
Parse.Cloud.beforeSave("Review", function(request, response) {
if (request.object.get("stars") < 1 || request.object.get("stars") > 5) {
     response.error();	 //	 書き込み処理が実行されない
   }
   var comment = request.object.get("comment");
   if (comment.length > 140) {
     request.object.set("comment", comment.substring(0, 137) + "...");
  }
   response.success(); 
});
timeout は 3 seconds
データ書き込み前後のトリガー実装が簡単
Parse.Cloud.afterSave("Comment", function(request) {
   query = new Parse.Query("Post");
   query.get(request.object.get("post").id, {
     success: function(post) {
       post.increment("comments");
      post.save();
     },
    error: function(error) {
       throw "Got an error " + error.code + " : " + error.message;
    }
   });
});
timeout は 3 seconds
タイムアウトするとデータの不整合が起こる可能性があ
るので afterSave は極力使わない方がいい
サードパーティとの連携
Parse + Twilioが簡単
var Twilio = require('twilio');
Twilio.initialize('myAccountSid', 'myAuthToken');	 //twilio.comで取得
Twilio.sendSMS({
   From: "+14155551212",
   To: "+14155552121",
   Body: "Hello from Cloud Code!"
}, {
  success: function(httpResponse) {
     response.success("SMS sent!");
   },
   error: function(httpResponse) {
     response.error("Uh oh, something went wrong");
   }
});
Twilioとは、WebAPIを通して通話やSMS送信が可能な
クラウド電話APIサービス
Parse + Mailgunが簡単
Mailgunとは、メール送信APIサービス
var Mailgun = require('mailgun');
Mailgun.initialize('myDomainName', 'myAPIKey');	 //mailgun.comで取得
Mailgun.sendEmail({
   to: "email@example.com",
   from: "Mailgun@CloudCode.com",
   subject: "Hello from Cloud Code!",
   text: "Using Parse and Mailgun is great!"
}, {
  success: function(httpResponse) {
    console.log(httpResponse);
     response.success("Email sent!");
   },
   error: function(httpResponse) {
     console.error(httpResponse);
     response.error("Uh oh, something went wrong");
   }
});
+ CrowdFlower Real Time Foto Moderator
- 画像ソリューション(ランキング、カテゴライズ、コンテン
ツ監視、など)
- https://crowdflower.com
+ Moment
- 日付処理のJSライブラリ
- http://momentjs.com
+ Stripe
- モバイルクレカ決済API
- https://stripe.com
+ Underscore
- ユーティリティライブラリ
- http://underscorejs.org
基本無料

More Related Content

What's hot

Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019David Buck
 
OpenStack Study#9 JOSUG
OpenStack Study#9 JOSUGOpenStack Study#9 JOSUG
OpenStack Study#9 JOSUGHideki Saito
 
Sencha TouchでHTML5アプリを作ってみる
Sencha TouchでHTML5アプリを作ってみるSencha TouchでHTML5アプリを作ってみる
Sencha TouchでHTML5アプリを作ってみるTomonori Ohba
 
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜Takahiro Inoue
 
Android Lecture #03 @PRO&BSC Inc.
Android Lecture #03 @PRO&BSC Inc.Android Lecture #03 @PRO&BSC Inc.
Android Lecture #03 @PRO&BSC Inc.Yuki Higuchi
 
Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積
Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積
Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積Takeshi Mikami
 
Parse introduction
Parse introductionParse introduction
Parse introductionTamura Koya
 
Djangoフレームワークのユーザーモデルと認証
Djangoフレームワークのユーザーモデルと認証Djangoフレームワークのユーザーモデルと認証
Djangoフレームワークのユーザーモデルと認証Shinya Okano
 
LINQソースでGO!
LINQソースでGO!LINQソースでGO!
LINQソースでGO!Kouji Matsui
 
運用構築技術者の為のPSプログラミング第1回
運用構築技術者の為のPSプログラミング第1回運用構築技術者の為のPSプログラミング第1回
運用構築技術者の為のPSプログラミング第1回Shigeharu Yamaoka
 
リナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リー
リナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リーリナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リー
リナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リーCODE BLUE
 
リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)Mariko Goda
 
Jetpack datastore入門
Jetpack datastore入門Jetpack datastore入門
Jetpack datastore入門furusin
 
WordPressと外部APIとの連携
WordPressと外部APIとの連携WordPressと外部APIとの連携
WordPressと外部APIとの連携Hidekazu Ishikawa
 

What's hot (18)

Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019
 
OpenStack Study#9 JOSUG
OpenStack Study#9 JOSUGOpenStack Study#9 JOSUG
OpenStack Study#9 JOSUG
 
Sencha TouchでHTML5アプリを作ってみる
Sencha TouchでHTML5アプリを作ってみるSencha TouchでHTML5アプリを作ってみる
Sencha TouchでHTML5アプリを作ってみる
 
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
 
Heroku Postgres
Heroku PostgresHeroku Postgres
Heroku Postgres
 
Android Lecture #03 @PRO&BSC Inc.
Android Lecture #03 @PRO&BSC Inc.Android Lecture #03 @PRO&BSC Inc.
Android Lecture #03 @PRO&BSC Inc.
 
Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積
Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積
Rails3+devise,nginx,fluent,S3構成でのアクセスログ収集と蓄積
 
Parse introduction
Parse introductionParse introduction
Parse introduction
 
Djangoフレームワークのユーザーモデルと認証
Djangoフレームワークのユーザーモデルと認証Djangoフレームワークのユーザーモデルと認証
Djangoフレームワークのユーザーモデルと認証
 
LINQソースでGO!
LINQソースでGO!LINQソースでGO!
LINQソースでGO!
 
運用構築技術者の為のPSプログラミング第1回
運用構築技術者の為のPSプログラミング第1回運用構築技術者の為のPSプログラミング第1回
運用構築技術者の為のPSプログラミング第1回
 
swooleを試してみた
swooleを試してみたswooleを試してみた
swooleを試してみた
 
Django boodoo
Django boodooDjango boodoo
Django boodoo
 
リナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リー
リナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リーリナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リー
リナックスに置ける様々なリモートエキスプロイト手法 by スクハー・リー
 
リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)リアルFacebookガジェットを作った(ロングバージョン)
リアルFacebookガジェットを作った(ロングバージョン)
 
Jetpack datastore入門
Jetpack datastore入門Jetpack datastore入門
Jetpack datastore入門
 
HTML5最新動向
HTML5最新動向HTML5最新動向
HTML5最新動向
 
WordPressと外部APIとの連携
WordPressと外部APIとの連携WordPressと外部APIとの連携
WordPressと外部APIとの連携
 

Similar to 5分でわかったつもりになるParse.com

初めての Data api cms どうでしょう - 大阪夏の陣
初めての Data api   cms どうでしょう - 大阪夏の陣初めての Data api   cms どうでしょう - 大阪夏の陣
初めての Data api cms どうでしょう - 大阪夏の陣Yuji Takayama
 
初めての Data API CMS どうでしょう - 仙台編 -
初めての Data API   CMS どうでしょう - 仙台編 -初めての Data API   CMS どうでしょう - 仙台編 -
初めての Data API CMS どうでしょう - 仙台編 -Yuji Takayama
 
初めての Data api
初めての Data api初めての Data api
初めての Data apiYuji Takayama
 
Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界Yuji Takayama
 
実行時のために最適なデータ構造を作成しよう
実行時のために最適なデータ構造を作成しよう実行時のために最適なデータ構造を作成しよう
実行時のために最適なデータ構造を作成しようHiroki Omae
 
Building React, Flutter and Blazor development and debugging environment with...
Building React, Flutter and Blazor development and debugging environment with...Building React, Flutter and Blazor development and debugging environment with...
Building React, Flutter and Blazor development and debugging environment with...Shotaro Suzuki
 
[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~
[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~
[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~de:code 2017
 
Html5 Web Applications
Html5  Web ApplicationsHtml5  Web Applications
Html5 Web Applicationstotty jp
 
Azure で Serverless 初心者向けタッチ&トライ
Azure で Serverless 初心者向けタッチ&トライAzure で Serverless 初心者向けタッチ&トライ
Azure で Serverless 初心者向けタッチ&トライMasanobu Sato
 
ソーシャルアプリ勉強会(第一回資料)配布用
ソーシャルアプリ勉強会(第一回資料)配布用ソーシャルアプリ勉強会(第一回資料)配布用
ソーシャルアプリ勉強会(第一回資料)配布用Yatabe Terumasa
 
Djangoフレームワークの紹介
Djangoフレームワークの紹介Djangoフレームワークの紹介
Djangoフレームワークの紹介Shinya Okano
 
Infrastructure as code for azure
Infrastructure as code for azureInfrastructure as code for azure
Infrastructure as code for azureKeiji Kamebuchi
 
Windows azure mobile services による mobile + cloud アプリケーション超高速開発
Windows azure mobile services による mobile + cloud アプリケーション超高速開発Windows azure mobile services による mobile + cloud アプリケーション超高速開発
Windows azure mobile services による mobile + cloud アプリケーション超高速開発Shotaro Suzuki
 
文字コードの脆弱性はこの3年間でどの程度対策されたか?
文字コードの脆弱性はこの3年間でどの程度対策されたか?文字コードの脆弱性はこの3年間でどの程度対策されたか?
文字コードの脆弱性はこの3年間でどの程度対策されたか?Hiroshi Tokumaru
 
Selenium webdriver使ってみようず
Selenium webdriver使ってみようずSelenium webdriver使ってみようず
Selenium webdriver使ってみようずOda Shinsuke
 
ホット・トピック・セミナー「Metro」
ホット・トピック・セミナー「Metro」ホット・トピック・セミナー「Metro」
ホット・トピック・セミナー「Metro」Kohsuke Kawaguchi
 

Similar to 5分でわかったつもりになるParse.com (20)

初めての Data api cms どうでしょう - 大阪夏の陣
初めての Data api   cms どうでしょう - 大阪夏の陣初めての Data api   cms どうでしょう - 大阪夏の陣
初めての Data api cms どうでしょう - 大阪夏の陣
 
初めての Data API CMS どうでしょう - 仙台編 -
初めての Data API   CMS どうでしょう - 仙台編 -初めての Data API   CMS どうでしょう - 仙台編 -
初めての Data API CMS どうでしょう - 仙台編 -
 
初めての Data api
初めての Data api初めての Data api
初めての Data api
 
Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界Data apiで実現 進化するwebの世界
Data apiで実現 進化するwebの世界
 
実行時のために最適なデータ構造を作成しよう
実行時のために最適なデータ構造を作成しよう実行時のために最適なデータ構造を作成しよう
実行時のために最適なデータ構造を作成しよう
 
後期03
後期03後期03
後期03
 
Building React, Flutter and Blazor development and debugging environment with...
Building React, Flutter and Blazor development and debugging environment with...Building React, Flutter and Blazor development and debugging environment with...
Building React, Flutter and Blazor development and debugging environment with...
 
20170703_05 IoTビジネス共創ラボ
20170703_05 IoTビジネス共創ラボ20170703_05 IoTビジネス共創ラボ
20170703_05 IoTビジネス共創ラボ
 
[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~
[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~
[DI10] IoT を実践する最新のプラクティス ~ Azure IoT Hub 、SDK 、Azure IoT Suite ~
 
Html5 Web Applications
Html5  Web ApplicationsHtml5  Web Applications
Html5 Web Applications
 
Azure で Serverless 初心者向けタッチ&トライ
Azure で Serverless 初心者向けタッチ&トライAzure で Serverless 初心者向けタッチ&トライ
Azure で Serverless 初心者向けタッチ&トライ
 
ソーシャルアプリ勉強会(第一回資料)配布用
ソーシャルアプリ勉強会(第一回資料)配布用ソーシャルアプリ勉強会(第一回資料)配布用
ソーシャルアプリ勉強会(第一回資料)配布用
 
Heroku Postgres
Heroku PostgresHeroku Postgres
Heroku Postgres
 
後期02
後期02後期02
後期02
 
Djangoフレームワークの紹介
Djangoフレームワークの紹介Djangoフレームワークの紹介
Djangoフレームワークの紹介
 
Infrastructure as code for azure
Infrastructure as code for azureInfrastructure as code for azure
Infrastructure as code for azure
 
Windows azure mobile services による mobile + cloud アプリケーション超高速開発
Windows azure mobile services による mobile + cloud アプリケーション超高速開発Windows azure mobile services による mobile + cloud アプリケーション超高速開発
Windows azure mobile services による mobile + cloud アプリケーション超高速開発
 
文字コードの脆弱性はこの3年間でどの程度対策されたか?
文字コードの脆弱性はこの3年間でどの程度対策されたか?文字コードの脆弱性はこの3年間でどの程度対策されたか?
文字コードの脆弱性はこの3年間でどの程度対策されたか?
 
Selenium webdriver使ってみようず
Selenium webdriver使ってみようずSelenium webdriver使ってみようず
Selenium webdriver使ってみようず
 
ホット・トピック・セミナー「Metro」
ホット・トピック・セミナー「Metro」ホット・トピック・セミナー「Metro」
ホット・トピック・セミナー「Metro」
 

Recently uploaded

Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 

Recently uploaded (9)

Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 

5分でわかったつもりになるParse.com

  • 1. 5分でわかったつもりになる Parse.com Parse is the cloud app platform for iOS, Android, JavaScript, Windows 8, Windows Phone 8, and OS X.
  • 2. Parse は BaaS ( Backend as a Service) モバイルアプリ開発のサーバサイド部分を肩代わ りしてくれる 1.ユーザ管理機能 2.サーバサイド実装 3.サードパーティとの連携
  • 4. データのread/writeが簡単 String, Number, Boolean, Date, File, GeoPoint, Array, Object, Pointer, Relation が保存できる // Saving Object PFObject *gameScore = [PFObject objectWithClassName:@"GameScore"]; [gameScore setObject:[NSNumber numberWithInt:1337] forKey:@"score"]; [gameScore setObject:@"Kenta TSUJI" forKey:@"playerName"]; [gameScore setObject:[NSNumber numberWithBool:NO] forKey:@"cheatMode"]; [gameScore saveInBackground]; // Query PFQuery *query = [PFQuery queryWithClassName:@"GameScore"]; [query whereKey:@"playerName" equalTo:@"Kenta TSUJI"]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {    if (!error) {      NSLog(@"Successfully retrieved %d scores.", objects.count);    } else {      NSLog(@"Error: %@ %@", error, [error userInfo]);   } }];
  • 5. ブラウザからデータの確認ができる -データの追加、書き換えも可能 データのread/writeが簡単 objectId : 識別子 cheatMode : 追加したカラム playerName : 追加したカラム score : 追加したカラム createdAt : オブジェクトの生成日時(GMT) updatedAt : オブジェクトの最終変更日時(GMT) ACL : アクセスコントロール
  • 6. ユーザ登録・ログインが簡単 // Signing up PFUser *user = [PFUser user]; user.username = @"username"; // required user.password = @"password"; // required user.email = @"email@example.com"; // optional [user signUpInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if (!error) { // success     } }]; // Logging in [PFUser logInWithUsernameInBackground:@"username" password:@"password"   block:^(PFUser *user, NSError *error) {     if (user) { // Do stuff after successful login.     } }];
  • 7. Facebook/twitter連携が簡単 // Linking if (![PFFacebookUtils isLinkedWithUser:user]) {     [PFFacebookUtils linkUser:user permissions:nil block:^(BOOL succeeded, NSError *error) {         if (succeeded) {             NSLog(@"Woohoo, user logged in with Facebook!");         }     }]; } // Linking if (![PFTwitterUtils isLinkedWithUser:user]) {     [PFTwitterUtils linkUser:user block:^(BOOL succeeded, NSError *error) {         if ([PFTwitterUtils isLinkedWithUser:user]) {             NSLog(@"Woohoo, user logged in with Twitter!");         }     }]; }
  • 9. メール認証が簡単 Userテーブルのデフォルトカラム objectId : 識別子 username : ユーザ名(required) password : パスワード(required) authData : Facebook/twitterの認証情報 emailVerified : メール認証フラグ email : メールアドレス createdAt : ユーザの生成日時(GMT) updatedAt : ユーザの最終変更日時(GMT) ACL : アクセスコントロール 設定画面から Verifying user emails を ON にするだけ 1.emailVerified が false のユーザはログインできない 2.サインアップ時にメールが届く 3.リンクをタップすると emailVerified が true になる
  • 10. プッシュ通知が簡単 // Find devices associated with these users PFQuery *pushQuery = [PFInstallation query]; [pushQuery whereKey:@"user" matchesQuery:userQuery];   // Send push notification to query PFPush *push = [[PFPush alloc] init]; [push setQuery:pushQuery]; // Set our Installation query [push setMessage:@"Free hotdogs at the Parse concession stand!"]; [push sendPushInBackground]; PFInstallation *installation = [PFInstallation currentInstallation]; [installation setObject:[PFUser currentUser] forKey:@"owner"]; [installation saveInBackground];
  • 12. サーバサイドの関数実行が簡単 Parse.Cloud.define("averageStars", function(request, response) {    var query = new Parse.Query("Review");    query.equalTo("movie", request.params.movie);    query.find({      success: function(results) {        var sum = 0;        for (var i = 0; i < results.length; ++i) {          sum += results[i].get("stars");        }        response.success(sum / results.length);      },      error: function() {        response.error("movie lookup failed");      }    }); }); timeout は 15 seconds
  • 13. サーバサイドの関数実行が簡単 // iOS [PFCloud callFunctionInBackground:@"averageStars"                    withParameters:@{@"movie": @"The Matrix"}                             block:^(NSNumber *ratings, NSError *error) {    if (!error) { NSLog(@"%@", ratings);   } }]; // Android HashMap<String, Object> params = new HashMap<String, Object>(); params.put("movie", "The Matrix"); ParseCloud.callFunctionInBackground( "averageStars", params, new FunctionCallback<Float>() {     void done(Float ratings, ParseException e) {         if (e == null) {          Log.d(ratings);         }     } });
  • 14. データ書き込み前後のトリガー実装が簡単 Parse.Cloud.beforeSave("Review", function(request, response) { if (request.object.get("stars") < 1 || request.object.get("stars") > 5) {      response.error(); // 書き込み処理が実行されない    }    var comment = request.object.get("comment");    if (comment.length > 140) {      request.object.set("comment", comment.substring(0, 137) + "...");   }    response.success();  }); timeout は 3 seconds
  • 15. データ書き込み前後のトリガー実装が簡単 Parse.Cloud.afterSave("Comment", function(request) {    query = new Parse.Query("Post");    query.get(request.object.get("post").id, {      success: function(post) {        post.increment("comments");       post.save();      },     error: function(error) {        throw "Got an error " + error.code + " : " + error.message;     }    }); }); timeout は 3 seconds タイムアウトするとデータの不整合が起こる可能性があ るので afterSave は極力使わない方がいい
  • 17. Parse + Twilioが簡単 var Twilio = require('twilio'); Twilio.initialize('myAccountSid', 'myAuthToken'); //twilio.comで取得 Twilio.sendSMS({    From: "+14155551212",    To: "+14155552121",    Body: "Hello from Cloud Code!" }, {   success: function(httpResponse) {      response.success("SMS sent!");    },    error: function(httpResponse) {      response.error("Uh oh, something went wrong");    } }); Twilioとは、WebAPIを通して通話やSMS送信が可能な クラウド電話APIサービス
  • 18. Parse + Mailgunが簡単 Mailgunとは、メール送信APIサービス var Mailgun = require('mailgun'); Mailgun.initialize('myDomainName', 'myAPIKey'); //mailgun.comで取得 Mailgun.sendEmail({    to: "email@example.com",    from: "Mailgun@CloudCode.com",    subject: "Hello from Cloud Code!",    text: "Using Parse and Mailgun is great!" }, {   success: function(httpResponse) {     console.log(httpResponse);      response.success("Email sent!");    },    error: function(httpResponse) {      console.error(httpResponse);      response.error("Uh oh, something went wrong");    } });
  • 19. + CrowdFlower Real Time Foto Moderator - 画像ソリューション(ランキング、カテゴライズ、コンテン ツ監視、など) - https://crowdflower.com + Moment - 日付処理のJSライブラリ - http://momentjs.com + Stripe - モバイルクレカ決済API - https://stripe.com + Underscore - ユーティリティライブラリ - http://underscorejs.org