Slide 1

Slide 1 text

Parse Matt Gamache-Asselin James Yu & Monday, July 15, 13

Slide 2

Slide 2 text

mobile apps are HARD Monday, July 15, 13

Slide 3

Slide 3 text

Database Monday, July 15, 13

Slide 4

Slide 4 text

Database REST API Z Z Z + Monday, July 15, 13

Slide 5

Slide 5 text

Database REST API Z Z Z Server + + + users + security Monday, July 15, 13

Slide 6

Slide 6 text

Database REST API Z Z Z Server + + + users + security Networking Monday, July 15, 13

Slide 7

Slide 7 text

Database REST API Z Z Z Server + + + users + security Caching Networking + Monday, July 15, 13

Slide 8

Slide 8 text

Database REST API Z Z Z Server + + + users + security Caching Networking + + The fun stuff! Monday, July 15, 13

Slide 9

Slide 9 text

Database REST API Z Z Z Server + + + users + security Caching Networking + + The fun stuff! Monday, July 15, 13

Slide 10

Slide 10 text

Database REST API Z Z Z Server + + + users + security Caching Networking + + The fun stuff! no no no no no yes! Monday, July 15, 13

Slide 11

Slide 11 text

Android OS X WP8 Win 8 .NET Cloud Code REST JavaScript Monday, July 15, 13

Slide 12

Slide 12 text

Monday, July 15, 13

Slide 13

Slide 13 text

Monday, July 15, 13

Slide 14

Slide 14 text

Users Monday, July 15, 13

Slide 15

Slide 15 text

Users Facebook & Twitter Monday, July 15, 13

Slide 16

Slide 16 text

Users Facebook & Twitter Comments & Likes Monday, July 15, 13

Slide 17

Slide 17 text

Users Facebook & Twitter Comments & Likes Location Monday, July 15, 13

Slide 18

Slide 18 text

Users Facebook & Twitter Pictures Comments & Likes Location Monday, July 15, 13

Slide 19

Slide 19 text

Users Facebook & Twitter Pictures Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 20

Slide 20 text

Users Facebook & Twitter Follow Pictures Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 21

Slide 21 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 22

Slide 22 text

USERS The in your app Monday, July 15, 13

Slide 23

Slide 23 text

Sign up a user PFUser *user = [PFUser user]; [user setUsername:@"Apps"]; [user setPassword:@"r0ck"]; [user signUpInBackground:...]; Monday, July 15, 13

Slide 24

Slide 24 text

Sign up a user PFUser *user = [PFUser user]; [user setUsername:@"Apps"]; [user setPassword:@"r0ck"]; [user signUpInBackground:...]; Login a user [PFUser logInWithUsernameInBackground:@"Apps" password:@"r0ck" block:...]; Monday, July 15, 13

Slide 25

Slide 25 text

Sign up a user PFUser *user = [PFUser user]; [user setUsername:@"Apps"]; [user setPassword:@"r0ck"]; [user signUpInBackground:...]; Login a user [PFUser logInWithUsernameInBackground:@"Apps" password:@"r0ck" block:...]; [PFUser currentUser]; Monday, July 15, 13

Slide 26

Slide 26 text

What about sharing on Facebook? Monday, July 15, 13

Slide 27

Slide 27 text

Facebook Users [PFFacebookUtils linkUser:[PFUser currentUser] permissions:permissions block:...]; Monday, July 15, 13

Slide 28

Slide 28 text

Facebook Users [PFFacebookUtils logInWithPermissions:permissions block:...]; [PFFacebookUtils linkUser:[PFUser currentUser] permissions:permissions block:...]; Monday, July 15, 13

Slide 29

Slide 29 text

Facebook Users [PFFacebookUtils logInWithPermissions:permissions block:...]; ...even Twitter Users [PFTwitterUtils logInWithBlock:...]; [PFFacebookUtils linkUser:[PFUser currentUser] permissions:permissions block:...]; [PFTwitterUtils linkUser:[PFUser currentUser] block:...]; Monday, July 15, 13

Slide 30

Slide 30 text

DATA Saving stuff in the Monday, July 15, 13

Slide 31

Slide 31 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; Monday, July 15, 13

Slide 32

Slide 32 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:@"Great pic!" forKey:@"text"]; Monday, July 15, 13

Slide 33

Slide 33 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:@"Great pic!" forKey:@"text"]; [comment setObject:[PFUser currentUser] forKey:@"user"]; Monday, July 15, 13

Slide 34

Slide 34 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:@"Great pic!" forKey:@"text"]; [comment saveInBackground]; [comment setObject:[PFUser currentUser] forKey:@"user"]; Monday, July 15, 13

Slide 35

Slide 35 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:@"Great pic!" forKey:@"text"]; [comment saveInBackground]; [comment setObject:[PFUser currentUser] forKey:@"user"]; Monday, July 15, 13

Slide 36

Slide 36 text

So what about locations? Monday, July 15, 13

Slide 37

Slide 37 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:@"Great pic!" forKey:@"text"]; [comment saveInBackground]; [comment setObject:[PFUser currentUser] forKey:@"user"]; [comment setObject:point forKey:@"location"]; PFGeoPoint *point = [PFGeoPoint geoPointWithLatitude:40.0 longitude:-30.0]; Monday, July 15, 13

Slide 38

Slide 38 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:@"Great pic!" forKey:@"text"]; [comment saveInBackground]; [comment setObject:[PFUser currentUser] forKey:@"user"]; [comment setObject:point forKey:@"location"]; PFGeoPoint *point = [PFGeoPoint geoPointWithLatitude:40.0 longitude:-30.0]; Monday, July 15, 13

Slide 39

Slide 39 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:@"Great pic!" forKey:@"text"]; [comment saveInBackground]; [comment setObject:[PFUser currentUser] forKey:@"user"]; [comment setObject:point forKey:@"location"]; PFGeoPoint *point = [PFGeoPoint geoPointWithLatitude:40.0 longitude:-30.0]; Monday, July 15, 13

Slide 40

Slide 40 text

And ? Pictures Monday, July 15, 13

Slide 41

Slide 41 text

PFObject *picture = [PFObject objectWithClassName:@"Picture"]; [picture setObject:@"Seoul nightlife" forKey:@"title"]; [picture saveInBackground]; NSData *imageData = UIImagePNGRepresentation(image); PFFile *imageFile = [PFFile fileWithData:imageData]; [imageFile saveInBackground]; [picture setObject:imageFile forKey:@"image"]; Monday, July 15, 13

Slide 42

Slide 42 text

PFObject *picture = [PFObject objectWithClassName:@"Picture"]; [picture setObject:@"Red Hot Chili Peppers!" forKey:@"title"]; [picture saveInBackground]; NSData *imageData = UIImagePNGRepresentation(image); PFFile *imageFile = [PFFile fileWithData:imageData]; [imageFile saveInBackground]; [picture setObject:imageFile forKey:@"image"]; Monday, July 15, 13

Slide 43

Slide 43 text

PFObject *picture = [PFObject objectWithClassName:@"Picture"]; [picture setObject:@"Red Hot Chili Peppers!" forKey:@"title"]; [picture saveInBackground]; NSData *imageData = UIImagePNGRepresentation(image); PFFile *imageFile = [PFFile fileWithData:imageData]; [imageFile saveInBackground]; [picture setObject:imageFile forKey:@"image"]; Monday, July 15, 13

Slide 44

Slide 44 text

THE DATA BROWSER What’s a command line for anyway? Monday, July 15, 13

Slide 45

Slide 45 text

Monday, July 15, 13

Slide 46

Slide 46 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 47

Slide 47 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 48

Slide 48 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 49

Slide 49 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 50

Slide 50 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 51

Slide 51 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 52

Slide 52 text

QUERIES Getting stuff from the Monday, July 15, 13

Slide 53

Slide 53 text

PFQuery *query = [PFQuery queryForClass:@"Picture"]; Monday, July 15, 13

Slide 54

Slide 54 text

PFQuery *query = [PFQuery queryForClass:@"Picture"]; [query whereKey:@"user" equalTo:[PFUser currentUser]]; [query whereKey:@"createdAt" greaterThan:dateOneWeekAgo]; Monday, July 15, 13

Slide 55

Slide 55 text

PFQuery *query = [PFQuery queryForClass:@"Picture"]; [query whereKey:@"user" equalTo:[PFUser currentUser]]; [query whereKey:@"createdAt" greaterThan:dateOneWeekAgo]; [query findObjectsInBackgroundWithBlock:...]; Monday, July 15, 13

Slide 56

Slide 56 text

PFQuery *query = [PFQuery queryForClass:@"Picture"]; [query whereKey:@"user" equalTo:[PFUser currentUser]]; [query whereKey:@"createdAt" greaterThan:dateOneWeekAgo]; [query findObjectsInBackgroundWithBlock: ^(NSArray *objects, NSError *error) { if (!error) { // The find succeeded. NSLog(@"Successfully retrieved objects!”); } else { // Log details of the failure NSLog(@"Error: %@ %@", error, [error userInfo]); } } ]; Monday, July 15, 13

Slide 57

Slide 57 text

... [query whereKey:@"createdAt" greaterThan:dateOneWeekAgo]; Monday, July 15, 13

Slide 58

Slide 58 text

[query setCachePolicy:kPFCachePolicyCacheThenNetwork]; ... [query whereKey:@"createdAt" greaterThan:dateOneWeekAgo]; Monday, July 15, 13

Slide 59

Slide 59 text

[query setCachePolicy:kPFCachePolicyCacheThenNetwork]; ... [query whereKey:@"createdAt" greaterThan:dateOneWeekAgo]; kPFCachePolicyCacheElseNetwork kPFCachePolicyNetworkElseCache kPFCachePolicyCacheOnly kPFCachePolicyNetworkOnly kPFCachePolicyIgnoreCache Monday, July 15, 13

Slide 60

Slide 60 text

RELATIONS It’s better together Monday, July 15, 13

Slide 61

Slide 61 text

Monday, July 15, 13

Slide 62

Slide 62 text

PFObject *comment = [PFObject objectWithClassName:@"Comment"]; [comment setObject:[PFUser currentUser] forKey:@"user"]; Monday, July 15, 13

Slide 63

Slide 63 text

Monday, July 15, 13

Slide 64

Slide 64 text

PFUser *user = [PFUser currentUser]; Monday, July 15, 13

Slide 65

Slide 65 text

PFUser *user = [PFUser currentUser]; PFRelation *relation = [user relationForKey:@"following"]; Monday, July 15, 13

Slide 66

Slide 66 text

PFUser *user = [PFUser currentUser]; PFRelation *relation = [user relationForKey:@"following"]; [relation addObject:newFriend]; Monday, July 15, 13

Slide 67

Slide 67 text

PFUser *user = [PFUser currentUser]; PFRelation *relation = [user relationForKey:@"following"]; [relation addObject:newFriend]; [relation addObject:anotherFriend]; Monday, July 15, 13

Slide 68

Slide 68 text

PFUser *user = [PFUser currentUser]; PFRelation *relation = [user relationForKey:@"following"]; [relation addObject:newFriend]; [user saveInBackground]; [relation addObject:anotherFriend]; Monday, July 15, 13

Slide 69

Slide 69 text

PUSH Saying Monday, July 15, 13

Slide 70

Slide 70 text

[PFPush subscribeToChannelInBackground:@"MobileDevCon"]; Push to Channels Monday, July 15, 13

Slide 71

Slide 71 text

[PFPush sendPushMessageToChannel:@"MobileDevCon" withMessage:@"Parse talk starting in 5!"]; [PFPush subscribeToChannelInBackground:@"MobileDevCon"]; Push to Channels Monday, July 15, 13

Slide 72

Slide 72 text

PFInstallation *inst = [PFInstallation currentInstallation]; [inst setObject:[PFUser currentUser] forKey:@"owner"]; Push to Query Monday, July 15, 13

Slide 73

Slide 73 text

PFQuery *query = [PFInstallation query]; [query whereKey:@"owner" matchesQuery:peopleNearConf63]; PFInstallation *inst = [PFInstallation currentInstallation]; [inst setObject:[PFUser currentUser] forKey:@"owner"]; Push to Query Monday, July 15, 13

Slide 74

Slide 74 text

PFQuery *query = [PFInstallation query]; [query whereKey:@"owner" matchesQuery:peopleNearConf63]; [PFPush sendPushMessageToQuery:query withMessage:@"Mobile Dev Con Today!" error:error]; PFInstallation *inst = [PFInstallation currentInstallation]; [inst setObject:[PFUser currentUser] forKey:@"owner"]; Push to Query Monday, July 15, 13

Slide 75

Slide 75 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 76

Slide 76 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 77

Slide 77 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 78

Slide 78 text

Users Facebook & Twitter Follow Pictures Push Noti cation Comments & Likes Location Displaying all this data Monday, July 15, 13

Slide 79

Slide 79 text

01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100110001010101010001011000110 10011001010011110001110010101110001110001010101011010001010100101010 01011110010100110110110101011001001000100110101010101110101101100001 10101011100110001010101010001011000110011100010011001010011110001110 10001110001010101011010001010100101010101010101011110010100110110110 01001000100110101010101110101101100001001001010101011100110001010101 11000110011100010011001010011110001110010101110001110001010101011010 00101010101010101011110010100110110110101011001001000100110101010101 01100001001001010101011100110001010101010001011000110011100010011001 10001110010101110001110001010101011010001010100101010101010101011110 10110110101011001001000100110101010101110101101100001001001010101011 01010101010001011000110011100010011001010011110001110010101110001110 01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100101010111010110110000100100 01110011000101010101000101100011001110001001100101001111000111001010 11000101010101101000101010010101010101010101111001010011011011010101 It’s code in the Monday, July 15, 13

Slide 80

Slide 80 text

01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100110001010101010001011000110 10011001010011110001110010101110001110001010101011010001010100101010 01011110010100110110110101011001001000100110101010101110101101100001 10101011100110001010101010001011000110011100010011001010011110001110 10001110001010101011010001010100101010101010101011110010100110110110 01001000100110101010101110101101100001001001010101011100110001010101 11000110011100010011001010011110001110010101110001110001010101011010 00101010101010101011110010100110110110101011001001000100110101010101 01100001001001010101011100110001010101010001011000110011100010011001 10001110010101110001110001010101011010001010100101010101010101011110 10110110101011001001000100110101010101110101101100001001001010101011 01010101010001011000110011100010011001010011110001110010101110001110 01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100101010111010110110000100100 01110011000101010101000101100011001110001001100101001111000111001010 11000101010101101000101010010101010101010101111001010011011011010101 It’s JavaScript in the Cloud Monday, July 15, 13

Slide 81

Slide 81 text

01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100110001010101010001011000110 10011001010011110001110010101110001110001010101011010001010100101010 01011110010100110110110101011001001000100110101010101110101101100001 10101011100110001010101010001011000110011100010011001010011110001110 10001110001010101011010001010100101010101010101011110010100110110110 01001000100110101010101110101101100001001001010101011100110001010101 11000110011100010011001010011110001110010101110001110001010101011010 00101010101010101011110010100110110110101011001001000100110101010101 01100001001001010101011100110001010101010001011000110011100010011001 10001110010101110001110001010101011010001010100101010101010101011110 10110110101011001001000100110101010101110101101100001001001010101011 01010101010001011000110011100010011001010011110001110010101110001110 01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100101010111010110110000100100 01110011000101010101000101100011001110001001100101001111000111001010 11000101010101101000101010010101010101010101111001010011011011010101 Parse.Cloud.define("averageLikes", function(request, response) { }); var query = new Parse.Query("Photo"); query.equalTo("user", Parse.User.current()); query.find({ }); error: function() { response.error("Oops, something went wrong."); } success: function(results) { var sum = 0; for (var i = 0; i < results.length; ++i) { sum += results[i].get("likes"); } response.success(sum / results.length); }, Monday, July 15, 13

Slide 82

Slide 82 text

01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100110001010101010001011000110 10011001010011110001110010101110001110001010101011010001010100101010 01011110010100110110110101011001001000100110101010101110101101100001 10101011100110001010101010001011000110011100010011001010011110001110 10001110001010101011010001010100101010101010101011110010100110110110 01001000100110101010101110101101100001001001010101011100110001010101 11000110011100010011001010011110001110010101110001110001010101011010 00101010101010101011110010100110110110101011001001000100110101010101 01100001001001010101011100110001010101010001011000110011100010011001 10001110010101110001110001010101011010001010100101010101010101011110 10110110101011001001000100110101010101110101101100001001001010101011 01010101010001011000110011100010011001010011110001110010101110001110 01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100101010111010110110000100100 01110011000101010101000101100011001110001001100101001111000111001010 11000101010101101000101010010101010101010101111001010011011011010101 Is that it...? Monday, July 15, 13

Slide 83

Slide 83 text

01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100110001010101010001011000110 10011001010011110001110010101110001110001010101011010001010100101010 01011110010100110110110101011001001000100110101010101110101101100001 10101011100110001010101010001011000110011100010011001010011110001110 10001110001010101011010001010100101010101010101011110010100110110110 01001000100110101010101110101101100001001001010101011100110001010101 11000110011100010011001010011110001110010101110001110001010101011010 00101010101010101011110010100110110110101011001001000100110101010101 01100001001001010101011100110001010101010001011000110011100010011001 10001110010101110001110001010101011010001010100101010101010101011110 10110110101011001001000100110101010101110101101100001001001010101011 01010101010001011000110011100010011001010011110001110010101110001110 01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100101010111010110110000100100 01110011000101010101000101100011001110001001100101001111000111001010 11000101010101101000101010010101010101010101111001010011011011010101 Parse.Cloud.beforeSave("Comment", function(request, response) { }); var text = request.object.get("text"); if (text.length > 140) { request.object.set("text",text.substring(0,137 + "..."); } response.success(); Monday, July 15, 13

Slide 84

Slide 84 text

01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100110001010101010001011000110 10011001010011110001110010101110001110001010101011010001010100101010 01011110010100110110110101011001001000100110101010101110101101100001 10101011100110001010101010001011000110011100010011001010011110001110 10001110001010101011010001010100101010101010101011110010100110110110 01001000100110101010101110101101100001001001010101011100110001010101 11000110011100010011001010011110001110010101110001110001010101011010 00101010101010101011110010100110110110101011001001000100110101010101 01100001001001010101011100110001010101010001011000110011100010011001 10001110010101110001110001010101011010001010100101010101010101011110 10110110101011001001000100110101010101110101101100001001001010101011 01010101010001011000110011100010011001010011110001110010101110001110 01011010001010100101010101010101011110010100110110110101011001001000 01010101110101101100001001001010101011100101010111010110110000100100 01110011000101010101000101100011001110001001100101001111000111001010 11000101010101101000101010010101010101010101111001010011011011010101 What about 3rd party APIs? Monday, July 15, 13

Slide 85

Slide 85 text

01010111010110110000100100101010101110011000101010101000101100011001 01100101001111000111001010111000111000101010101101000101010010101010 01111001010011011011010101100100100010011010101010111010110110000100 10101110011000101010101000101100011001110001001100101001111000111001 00111000101010101101000101010010101010101010101111001010011011011010 00100010011010101010111010110110000100100101010101110011000101010101 00011001110001001100101001111000111001010111000111000101010101101000 10101010101010101111001010011011011010101100100100010011010101010111 10000100100101010101110011000101010101000101100011001110001001100101 00111001010111000111000101010101101000101010010101010101010101111001 11011010101100100100010011010101010111010110110000100100101010101110 01010101000101100011001110001001100101001111000111001010111000111000 01101000101010010101010101010101111001010011011011010101100100100010 01010111010110110000100100101010101110010101011101011011000010010010 11001100010101010100010110001100111000100110010100111100011100101011 00010101010110100010101001010101010101010111100101001101101101010110 01001101010101011101011011000010010010101010111001 Parse.Cloud.httpRequest({ url: 'http://www.parse.com/', success: function(httpResponse) { console.log(httpResponse.text); }, error: function(httpResponse) { console.error('Request failed: ' + httpResponse.status); } }); Monday, July 15, 13

Slide 86

Slide 86 text

PARSE HOSTING Overview Static Hosting Dynamic Hosting An Example Monday, July 15, 13

Slide 87

Slide 87 text

A Mobile First Platform Monday, July 15, 13

Slide 88

Slide 88 text

The Spectrum Monday, July 15, 13

Slide 89

Slide 89 text

The Spectrum Monday, July 15, 13

Slide 90

Slide 90 text

The Spectrum PARSE HOSTING Monday, July 15, 13

Slide 91

Slide 91 text

Static Hosting Monday, July 15, 13

Slide 92

Slide 92 text

Static Hosting • Choose a domain: myapp.parseapp.com (or custom) Monday, July 15, 13

Slide 93

Slide 93 text

Static Hosting • Choose a domain: myapp.parseapp.com (or custom) • Initialize your parse directory Monday, July 15, 13

Slide 94

Slide 94 text

Static Hosting • Choose a domain: myapp.parseapp.com (or custom) • Initialize your parse directory • Create public/helloword.html Monday, July 15, 13

Slide 95

Slide 95 text

Static Hosting • Choose a domain: myapp.parseapp.com (or custom) • Initialize your parse directory • Create public/helloword.html • Type parse deploy Monday, July 15, 13

Slide 96

Slide 96 text

Static Hosting • Choose a domain: myapp.parseapp.com (or custom) • Initialize your parse directory • Create public/helloword.html • Type parse deploy • Your web page is live Monday, July 15, 13

Slide 97

Slide 97 text

Dynamic Hosting Monday, July 15, 13

Slide 98

Slide 98 text

Dynamic Hosting express.js Monday, July 15, 13

Slide 99

Slide 99 text

express.js • Web framework built for node • Now with Cloud Code + Parse JS SDK • Simple but expressive Monday, July 15, 13

Slide 100

Slide 100 text

Directory Structure -cloud/ main.js Cloud Code app.js Express code -views/ View templates hello.ejs -public/ example.html Static HTML files -stylesheets/ CSS stylesheets style.css Monday, July 15, 13

Slide 101

Slide 101 text

Hello World app.get('/', function(req, res) { res.send('hello world'); }); app.js Monday, July 15, 13

Slide 102

Slide 102 text

Hello World + Template app.get('/', function(req, res) { res.render('hello'); }); app.js Monday, July 15, 13

Slide 103

Slide 103 text

Hello World + Template Sample App

Hello World

hello.ejs Monday, July 15, 13

Slide 104

Slide 104 text

Hello World + Dynamic Template app.get('/', function(req, res) { res.render('hello', { message: 'hi' }); }); app.js Monday, July 15, 13

Slide 105

Slide 105 text

Hello World + Dynamic Template Sample App

<%= message %>

hello.ejs Monday, July 15, 13

Slide 106

Slide 106 text

Hello World + Dynamic Template app.get('/', function(req, res) { res.render('hello', { message: req.query.msg }); }); app.js http://myapp.parseapp.com/?msg=hi Monday, July 15, 13

Slide 107

Slide 107 text

Live Demo: A Landing Page Monday, July 15, 13

Slide 108

Slide 108 text

What Else? • Full blown web apps • Admin interfaces • Web hooks • Cloud Modules: send emails, texts charge cc’s, etc Monday, July 15, 13

Slide 109

Slide 109 text

Further Reading • Guide: parse.com/docs/cloud_code_guide • Express: expressjs.com • Anymeme: www.anymeme.org • Anyblog: github.com/ParsePlatform/AnyBlog Monday, July 15, 13

Slide 110

Slide 110 text

Monday, July 15, 13

Slide 111

Slide 111 text

Anypic Anywall ParseStore Monday, July 15, 13

Slide 112

Slide 112 text

Thank You! Monday, July 15, 13