SlideShare a Scribd company logo
1 of 23
Thomas Bouldin
@inilned
Twilio and Parse
Rich Experiences in & out of Native Clients
What is an App?
Think outside the 4” box
Modern apps are in the cloud
The cloud has no home button
The cloud never sleeps
The cloud is complicated
Your App Here
What is Parse?
Data Social Push
AnalyticsHostingCloud Code
Parse is Everywhere
Twilio + Parse
Cross platform clouds are awesome
Cross-media clouds are awesomer
Twilio provides reach, delivery, and events
Parse provides persistence, logic, and native
apps
SMS or App
Apps have a custom experience
Apps are bespoke
Apps have high acquisition costs
SMS is universal
SMS is far reaching
SMS is guaranteed
Four different ways
SMS or App
Exclusive SMS is the App
Hybrid Apps require SMS for core features
Parity SMS or App are portals to the same
experience
Segmentation Different roles have different
environments
AnyQs: A Twilio + Parse app to handle Q&A
Building a Segmented App
A quick afternoon hack on Twilio + Parse
Audience members ask questions via SMS
Web app allows moderators to approve or reject
Native app for presenter to review questions
Data Model
Pending
Class Structure State Machine
RejectedAccepted
Answere
d
Question
to: string
from: string
prompt: string
state: string
Cloud Code in Depth
Data HostingCloud Modules
Functions Background Jobs
Asking Questions
How is
babby
formed
?
Get a Parse Sub-Domain (opt)
Asking Questions
Within your Parse App’s settings
Tell Twilio Where to Send Messages
Asking Questions
Within the settings of your Twilio number:
Set up Twilio and Express
Asking Questions
var twilio = require("twilio");
twilio.initialize(account SID, auth token);
var Question = Parse.Object.extend("Question");
var express = require("express");
var app = express();
app.use(express.bodyParser);
app.listen();
app.post("/questions", function(request, response) {
// TODO: stuff... (next slide)
});
Implementing /questions
Asking Questions
var question = new Question({
from: request.body.From,
to: request.body.To,
status: "pending",
prompt: request.body.Body
});
question.save().then(function() {
response.send("");
}, function(error) {
response.status(500);
response.send(error);
});
Moderating Questions
Simple Web App UI
Moderating Questions
Get Pending Questions
Moderating Questions
var Question = Parse.Object.extend("Question");
var query = new Parse.Query(Question);
query.equalTo("status", "pending");
query.find().then(function(results) {
table.empty();
_.each(results, function(question) {
addRow(question.id, question.get("prompt"));
});
});
Modifying Questions
Moderating Questions
function updateQuestion(id, status) {
}
var row = $("#question" + id);
row.children("button").attr("disabled", "disabled");
var question = new Question();
question.id = id;
question.set("status", status);
question.save().then(function() {
row.remove();
});
Responding to Users
Moderating Questions
Parse.Cloud.beforeSave("Question", function(req, resp) {
var q = request.object;
var promise = Parse.Promise.as(); // already fulfilled
if (q.dirty("status") &&
q.get("status") === "rejected") {
promise = twilio.sendSMS({
From: q.get("to"),
To: q.get("from"),
Body: "Being off topic makes me a sad panda."
});
}
promise.then(function() { resp.success(); },
function(error) { resp.error(error) });
});
Answering Questions
Thomas Bouldin
@inilned
Concluding with a Demo
AKA Q&A
Hack Ideas
Push + SMS chatroom
SMS password reset
SMS alerts on data streams
SMS voting + Parse Analytics

More Related Content

Viewers also liked (9)

سياحة
سياحةسياحة
سياحة
 
Red Hat and Microsoft Partnership
Red Hat and Microsoft PartnershipRed Hat and Microsoft Partnership
Red Hat and Microsoft Partnership
 
Transition
TransitionTransition
Transition
 
Google informative speech
Google informative speechGoogle informative speech
Google informative speech
 
Kachita spell presentation
Kachita spell presentationKachita spell presentation
Kachita spell presentation
 
Trabajo 1 segundo básico
Trabajo 1 segundo básico Trabajo 1 segundo básico
Trabajo 1 segundo básico
 
2° trabajo Segundo Básico
2° trabajo Segundo Básico 2° trabajo Segundo Básico
2° trabajo Segundo Básico
 
Как я представляю использование информационных технологий в социальной работе.
Как я представляю использование информационных технологий в социальной работе.Как я представляю использование информационных технологий в социальной работе.
Как я представляю использование информационных технологий в социальной работе.
 
Strategies for dynamic and stable markets
Strategies for dynamic and stable marketsStrategies for dynamic and stable markets
Strategies for dynamic and stable markets
 

Similar to Twilio and Parse: Rich Experiences in & out of Native Clients

Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Xamarin
 
Computer Programming for Lawyers
Computer Programming for LawyersComputer Programming for Lawyers
Computer Programming for Lawyers
Nehal Madhani
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Apps
dreamforce2006
 
User privacy in Apple iOS 8 and OS X
User privacy in Apple iOS 8 and OS XUser privacy in Apple iOS 8 and OS X
User privacy in Apple iOS 8 and OS X
Ludovic Privat
 

Similar to Twilio and Parse: Rich Experiences in & out of Native Clients (20)

Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePoint
 
API Workshop Series Part 2: The Future of Intelligent User Interactions
API Workshop Series Part 2: The Future of Intelligent User InteractionsAPI Workshop Series Part 2: The Future of Intelligent User Interactions
API Workshop Series Part 2: The Future of Intelligent User Interactions
 
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-ons
 
Swift meetup22june2015
Swift meetup22june2015Swift meetup22june2015
Swift meetup22june2015
 
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
Create a Uniform Login Experience with a Centralized Cloud Authentication Sys...
 
AI and Python: Developing a Conversational Interface using Python
AI and Python: Developing a Conversational Interface using PythonAI and Python: Developing a Conversational Interface using Python
AI and Python: Developing a Conversational Interface using Python
 
Intro to appcelerator
Intro to appceleratorIntro to appcelerator
Intro to appcelerator
 
Computer Programming for Lawyers
Computer Programming for LawyersComputer Programming for Lawyers
Computer Programming for Lawyers
 
Mobile App Development course | Learn and Build | online certification course
 Mobile App Development course | Learn and Build | online certification course Mobile App Development course | Learn and Build | online certification course
Mobile App Development course | Learn and Build | online certification course
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
 
Intro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite AppsIntro to AppExchange - Building Composite Apps
Intro to AppExchange - Building Composite Apps
 
AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You Typed
 
BSidesDC 2016 Beyond Automated Testing
BSidesDC 2016 Beyond Automated TestingBSidesDC 2016 Beyond Automated Testing
BSidesDC 2016 Beyond Automated Testing
 
Microsoft Teams - A developers perspective
Microsoft Teams - A developers perspectiveMicrosoft Teams - A developers perspective
Microsoft Teams - A developers perspective
 
Implementing SunGard Banner Voice Response
Implementing SunGard Banner Voice ResponseImplementing SunGard Banner Voice Response
Implementing SunGard Banner Voice Response
 
Resume ritesh
Resume riteshResume ritesh
Resume ritesh
 
Building Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to startBuilding Generative AI-infused apps: what's possible and how to start
Building Generative AI-infused apps: what's possible and how to start
 
User privacy in Apple iOS 8 and OS X
User privacy in Apple iOS 8 and OS XUser privacy in Apple iOS 8 and OS X
User privacy in Apple iOS 8 and OS X
 
flask.pptx
flask.pptxflask.pptx
flask.pptx
 
OpenAI-SDK101.pptx
OpenAI-SDK101.pptxOpenAI-SDK101.pptx
OpenAI-SDK101.pptx
 

Recently uploaded

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 

Twilio and Parse: Rich Experiences in & out of Native Clients

  • 1. Thomas Bouldin @inilned Twilio and Parse Rich Experiences in & out of Native Clients
  • 2. What is an App? Think outside the 4” box Modern apps are in the cloud The cloud has no home button The cloud never sleeps The cloud is complicated Your App Here
  • 3. What is Parse? Data Social Push AnalyticsHostingCloud Code
  • 5. Twilio + Parse Cross platform clouds are awesome Cross-media clouds are awesomer Twilio provides reach, delivery, and events Parse provides persistence, logic, and native apps
  • 6. SMS or App Apps have a custom experience Apps are bespoke Apps have high acquisition costs SMS is universal SMS is far reaching SMS is guaranteed
  • 7. Four different ways SMS or App Exclusive SMS is the App Hybrid Apps require SMS for core features Parity SMS or App are portals to the same experience Segmentation Different roles have different environments
  • 8. AnyQs: A Twilio + Parse app to handle Q&A Building a Segmented App A quick afternoon hack on Twilio + Parse Audience members ask questions via SMS Web app allows moderators to approve or reject Native app for presenter to review questions
  • 9. Data Model Pending Class Structure State Machine RejectedAccepted Answere d Question to: string from: string prompt: string state: string
  • 10. Cloud Code in Depth Data HostingCloud Modules Functions Background Jobs
  • 12. Get a Parse Sub-Domain (opt) Asking Questions Within your Parse App’s settings
  • 13. Tell Twilio Where to Send Messages Asking Questions Within the settings of your Twilio number:
  • 14. Set up Twilio and Express Asking Questions var twilio = require("twilio"); twilio.initialize(account SID, auth token); var Question = Parse.Object.extend("Question"); var express = require("express"); var app = express(); app.use(express.bodyParser); app.listen(); app.post("/questions", function(request, response) { // TODO: stuff... (next slide) });
  • 15. Implementing /questions Asking Questions var question = new Question({ from: request.body.From, to: request.body.To, status: "pending", prompt: request.body.Body }); question.save().then(function() { response.send(""); }, function(error) { response.status(500); response.send(error); });
  • 17. Simple Web App UI Moderating Questions
  • 18. Get Pending Questions Moderating Questions var Question = Parse.Object.extend("Question"); var query = new Parse.Query(Question); query.equalTo("status", "pending"); query.find().then(function(results) { table.empty(); _.each(results, function(question) { addRow(question.id, question.get("prompt")); }); });
  • 19. Modifying Questions Moderating Questions function updateQuestion(id, status) { } var row = $("#question" + id); row.children("button").attr("disabled", "disabled"); var question = new Question(); question.id = id; question.set("status", status); question.save().then(function() { row.remove(); });
  • 20. Responding to Users Moderating Questions Parse.Cloud.beforeSave("Question", function(req, resp) { var q = request.object; var promise = Parse.Promise.as(); // already fulfilled if (q.dirty("status") && q.get("status") === "rejected") { promise = twilio.sendSMS({ From: q.get("to"), To: q.get("from"), Body: "Being off topic makes me a sad panda." }); } promise.then(function() { resp.success(); }, function(error) { resp.error(error) }); });
  • 23. Hack Ideas Push + SMS chatroom SMS password reset SMS alerts on data streams SMS voting + Parse Analytics

Editor's Notes

  1. Parse is a Backend as a Service, which is fancy speak for “a cloud you can rent.” What is the cloud? A great cloud breaks platform boundaries, which we do
  2. Exclusive: Group chat. Very broad reach but potentially limited. Parse provides logic. Hybrid: 2-factor authentication, log-in by SMS secret. Really cool ideas, but often too niche for us to walkthrough Parity: A chat client that has SMS or native apps, Facebook and Twitter are both accessible by SMS Segmentation: * Internet of Things (auto-SMS, passive or active clients) * Call center * TV voting
  3. User sends an SMS to a Twilio number Twilio sends POST to our RESTful API hosted by Cloud Code Cloud Hosting (Could use simpler method, but then we need credentials in the URI) stores the question into Parse Data
  4. Execute a Query for Parse Data List all Questions where state == “pending” Click on buttons to set state to “accepted” or “rejected” Cloud Code afterSave trigger tells rejected users they were rejected via the Twilio Cloud Code Module In a swanky app, afterSave trigger would send a push to speakers when the question is accepted
  5. Execute a Query for Parse Data List all Questions where state == “pending” Click on buttons to set state to “accepted” or “rejected” Cloud Code afterSave trigger tells rejected users they were rejected via the Twilio Cloud Code Module In a swanky app, afterSave trigger would send a push to speakers when the question is accepted