Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NCMBの紹介とParse.comとの相違点について

 NCMBの紹介とParse.comとの相違点について

残り半年!Parse.comからNCMBへのmBaaS移行セミナー - http://ncmb.connpass.com/event/37190/ での発表資料です。

Atsushi Nakatsugawa

August 31, 2016
Tweet

More Decks by Atsushi Nakatsugawa

Other Decks in Technology

Transcript

  1. Copyright @ NIFTY Corporation All Rights ࣗݾ঺հ  !NPPOHJGU GCNFNPPOHJGUGBO

    த௡઒ಞ࢘ גࣜձࣾ.00/(*'5୅දऔక໾ χϑςΟΫϥ΢υNPCJMFCBDLFOE ɹɹɹɹɹɹɹɹɹɹΤϰΝϯδΣϦετ ೥݄ΑΓΦʔϓϯιʔεɾιϑτ΢ΣΞΛຖ ೔঺հ͢Δϒϩά.00/(*'5ΛӡӦɻ IUUQXXXNPPOHJGUKQ
  2. Copyright @ NIFTY Corporation All Rights χϑςΟΫϥ΢υNPCJMFCBDLOFOE ʹ͍ͭͯ  !OJGUZDMPVE@NC

    GCNFOJGUZDMPVENC χϑςΟΫϥ΢υNPCJMFCBDLFOE χϑςΟגࣜձࣾͷఏڙ͢ΔN#BB4 εϚʔτϑΥϯ8FCΞϓϦͷόοΫΤϯυʢαʔ όαΠυʣͷ࢓૊ΈΛҰׅఏڙ IUUQNCDMPVEOJGUZDPN
  3. Copyright @ NIFTY Corporation All Rights 5 ::::::::        ┌─────────────── ┐ ::::::::        | Parse.comがやられようだな…

       │ :::::   ┌───└───────────v───┬┘ :::::   |フフフ…奴は四天王の中でも最強 …最強?│ ┌──└────────v─┬────────┘ | このタイミングで辞めるとは │ | mBaaSの面汚しよ        │ └────v────────┘   |ミ,  /  `ヽ /!    ,.──、   |彡/二Oニニ|ノ    /三三三!,       |!   `,' \、、_,|/-ャ    ト `=j r=レ     /ミ !彡 T 爪| / / ̄|/´__,ャ  |`三三‐/     |`=、|,='| /人 ヽ ミ='/|`:::::::/イ__ ト`ー く__,-,  、 _!_ / /  `ー─'" |_,.イ、 | |/、   Y  /| | | j / ミ`┴'彡\     NCMB        某社       某社
  4. Copyright @ NIFTY Corporation All Rights       ,、L,,,,,,,,,,,,,,,,,,,,,,,,-‐‐‐''''"~´_____,,,,、、-‐'r゛   , -‐'    ________,,,,,,,、、、-=;;''''ヽ| ,,、-‐''"  < ―‐'''!'''''''h''T'''廿'i= .r廿´| {

    r~    ̄ ̄ |⌒i r ヽ-- '   |i‐‐‐'  }|       |λ|{        ヽ    .| .      |ヽi |       , r.'    |       lV r            |  Parse.comは大変なものを盗んでいきました。       `、 !   ‐‐''''''''"""'   !        ヽト     ""     /          あなたの信頼です。          |\         ,.!        ,,、rl  '''''''ー‐_"''''""_´└ 、      // __`-‐''""~   /    丶-、__
  5. Copyright @ NIFTY Corporation All Rights ࠓޙͷબ୒ࢶ 8 ଓ͚Δ ଓ͚ͳ͍

    ৐Γ׵͑Δ ࣗྗͰߏங 1BSTF4FSWFS "84 "[VSF /$.#
  6. Copyright @ NIFTY Corporation All Rights Ҡߦʹ͍ͭͯ ϓογϡ௨஌͸྆4%,Λ࢖ͬͨঢ়ଶͰঃʑʹ ΫϥεˠσʔλετΞ Ϣʔβσʔλˠύεϫʔυ͕ʜ

    Ϋϥ΢υίʔυˠεΫϦϓτ 8FC)PPLTˠχϑςΟΫϥ΢υͷ.255 "OESPJEͰ4FOEFS*%Λద༻͍ͯ͠ͳ͍৔߹͸ແཧ
  7. Copyright @ NIFTY Corporation All Rights 1BSTFDPNͱ/$.#ͷҧ͍ 21 1BSTF /$.#

    ର৅ ελʔτΞοϓ େखʙݸਓ։ൃऀ ՝ۚମܥ ैྔ՝ۚ ֹ݄ఆֹ ੒௕͢Δͱʜ ଔۀ Ξ΢τιʔε ฼ମ 'BDFCPPL ෋࢜௨χϑςΟΫϥ΢ υ
  8. Copyright @ NIFTY Corporation All Rights 24 /$.#4DSJQUTDSJQUOFX/$.#4DSJQU UFTU4DSJQUKT 

    /$.#4DSJQU.FUIPE5ZQF(&5  +40/0CKFDURVFSZOFX+40/0CKFDU \OBNF/$.#^  TDSJQUFYFDVUF*O#BDLHSPVOE OVMM OVMM RVFSZ OFX&YFDVUF4DSJQU$BMMCBDL \ !0WFSSJEF QVCMJDWPJEEPOF CZUF<>SFTVMU /$.#&YDFQUJPOF \ JG FOVMM \ࣦഊ ^FMTF\ ੒ޭ ^ ^ ^ 
  9. Copyright @ NIFTY Corporation All Rights 26 PFObject *gameScore =

    [PFObject objectWithClassName:@"GameScore"]; gameScore[@"score"] = @1337; gameScore[@"playerName"] = @"Sean Plott"; gameScore[@"cheatMode"] = @NO; [gameScore saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) { if (succeeded) { // The object has been saved. } else { // There was a problem, check error.description } }]; QBSTFDPNͷ৔߹
  10. Copyright @ NIFTY Corporation All Rights NCMBobject *gameScore = [NCMBobject

    objectWithClassName:@"GameScore"]; [gameScore setobject:@"1337" forKey:@"score"]; [gameScore setobject:@"Sean Plott" forKey:@"playerName"]; [gameScore setobject:@NO forKey:@"cheatMode"]; //データストアへの登録を実施 [gameScore saveInBackgroundWithBlock:^(NSError *error) { if (error){ //保存に失敗した場合の処理 } else { //保存に成功した場合の処理 } }]; /$.#ͷ৔߹
  11. Copyright @ NIFTY Corporation All Rights 28 PFQuery *query =

    [PFQuery queryWithClassName:@"GameScore"]; [query whereKey:@"playerName" equalTo:@"Dan Stemkoski"]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { // The find succeeded. NSLog(@"Successfully retrieved %d scores.", objects.count); // Do something with the found objects for (PFObject *object in objects) { NSLog(@"%@", object.objectId); } } else { // Log details of the failure NSLog(@"Error: %@ %@", error, [error userInfo]); } }]; NCMBQuery *query = [NCMBQuery queryWithClassName:@"GameScore"]; [query whereKey:@"playerName" equalTo:@"Dan Stemkoski"]; [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { // 取得成功 } else { // エラー処理 } }]; ݕࡧ 1BSTFDPN /$.#
  12. Copyright @ NIFTY Corporation All Rights 29 ParseObject gameScore =

    new ParseObject("GameScore"); gameScore.put("score", 1337); gameScore.put("playerName", "Sean Plott"); gameScore.saveInBackground(new SaveCallback() { public void done(ParseException e) { // ここは保存完了後に呼び出される。 if (e == null) { System.out.println("保存成功"); } else { System.out.println("保存失敗"); } } }); NCMBObject gameScore = new NCMBObject("GameScore"); gameScore.put("score", 1337); gameScore.put("playerName", "Sean Plott"); gameScore.saveInBackground(new DoneCallback() { @Override public void done(NCMBException e) { if (e != null) { //エラー発生時の処理 } else { //成功時の処理 } } }); "OESPJEͷ৔߹ 1BSTFDPN /$.#
  13. Copyright @ NIFTY Corporation All Rights ParseQuery<ParseObject> query = ParseQuery.getQuery("GameScore");

    query.getInBackground("xWMyZ4YEGZ", new GetCallback<ParseObject>() { public void done(ParseObject object, ParseException e) { if (e == null) { // object will be your game score } else { // something went wrong } } }); NCMBObject obj = new NCMBObject("TestClass"); obj.setObjectId("getTestObjectId"); obj.fetchInBackground(new FetchCallback<NCMBObject>() { @Override public void done(NCMBObject object, NCMBException e) { if (e != null) { //エラー時の処理 } else { //取得成功時の処理 } } }); "OESPJEͰݕࡧ
  14. Copyright @ NIFTY Corporation All Rights 39 ·ͱΊ  J04"OESPJE6OJUZ+BWB4DSJQUʹରԠ

     αʔόαΠυͷ։ൃ͕ෆཁɻΞϓϦ։ൃΛߴ଎Խ  ແྉ͔Β࢖͍࢝ΊΒΕΔ