backend as a service (baas) for iosfiles.meetup.com/1721611/may ios meetup - baas.pdf · backend as...
TRANSCRIPT
Deloitte Digital Jordan StoneDeloitte Digital Jordan Stone
April 16, 2013
Backend as a Service (BaaS) for iOS
Thursday, May 23, 13
Backend as a ServiceBaaS OptionsBuilding DwitterQuestions
Agenda
Thursday, May 23, 13
@”%@ as a Service”, @”Backend”
Thursday, May 23, 13The “as a service” namespace has become a fill-in-the-blank of service offerings. Software as a Service, Platform as a Service, Backend as a Service
Backends as a Service (Baas) offer a variety of features.
Cloud-based
User management
Push notifications
Social network integration
What is BaaS?
Thursday, May 23, 13
Some offer additional functionality, such as support for In-App Purchases, Passbook integration, and Analytics.
All user data lives outside of the device.
Universal applications
Users with more than one device
Data synchronization can be a concern
Cloud-Based
Thursday, May 23, 13
Easy management for account-based apps
User registration and uniqueness
Session management
Password resets
User Management
Thursday, May 23, 13
Remotely notify users of events
Send push notifications to devices
Certificate registration
Trigger programmatically or via console*
Push Notifications
Thursday, May 23, 13
* Not all BaaS providers offer this, but for those that do, it’s a nice perk
Integrate with social networks
Facebook and Twitter
OAuth / Permissions
Still need to use specific SDK to communicate with social
network
Social Integration
Thursday, May 23, 13
So many options, so little time.
Thursday, May 23, 13
AppceleratorApplicasaHeliosKinveyKumulosParseStackMob
Popular BaaS Options
Thursday, May 23, 13
A full-featured suite of services including back end APIs,
testing, and analytics
Appcelerator
Multiple services, one
provider
Appcelerator Marketplace
extensions
Pros Cons
Geared primarily towards
Titanium apps
Expensive to use
Thursday, May 23, 13
Free Titanium does not include any analytics, testing, performance management, etc. Appcelerator Public Cloud Platform is $999/month, Private Cloud is $2667/month. Both require an annual subscription.
Customers include Zipcar, Ebay, Smartwool, and RayBan
Primarily focused around in-app purchases. A great mobile
platform particularly for game developers.
Applicasa
Easy-to-use virtual store
Focused on driving revenue
A/B testing for promotions
Pros Cons
Platform focused on games
Still in private beta
Thursday, May 23, 13
Open-source backend by Mattt Thompson built on the Rack
web server interface.
Helios
Develop and test in a local
environment
Auto-generate data RESTful
services from Core Data
model
Passbook integration
Pros Cons
Setup is non-trivial compared
to other options
Multiple libraries to include
for client integration
The command line
Thursday, May 23, 13
Rack is a Ruby web server interface that frameworks such as Rails are built upon.
CargoBay for IAP, Orbiter for Push Notifications, GroundControl and SkyLab for analytics and A/B testing
A schema-less backend system that provides services through
partnerships
Kinvey
Multiple user authentication
options
Active User and API-based
pricing models
Pros Cons
Syncing with Core Data for
offline persistence is non-
trivial
Thursday, May 23, 13
Pronounced like Convey
* For instance, Push is done via a partnership with Urban Airship.
User authentication options in Kinvey, Facebook, Twitter, Google, and any other OAuth2 provider.
Provides its own CachedStore object so you don’t have to use Core Data
A backend service that allows you to write your own APIs.
Kumulos
Ability to hook into existing
MySQL databases
Only pay when you go live
Pros Cons
Custom API calls need to be
developed
Analytics are lacking
compared to competitors
Thursday, May 23, 13
Custom APIs need to be built to interact with the data in your tables. Kumulos then builds those into custom libraries for your deployment target, and you include those libraries with your project. On the plus side, you’re guaranteed to only get methods in your libraries that you need, without any filler or bloat.
An established backend service with comprehensive tutorials
and documentation.
Parse
Easy to set up
Plenty of examples/
documentation
Simple pricing model
Pros Cons
Frameworks learning curve
Thursday, May 23, 13
Provides REST APIs as well as a Core Data wrapper to easily
integrate with existing architecture.
StackMob
Free*
Marketplace for extended
functionality
Multiple environments
Pros Cons
Amazon S3 account required
for binary assets
Thursday, May 23, 13
* Enterprise or large-scale use requires special attention. Add ons can be purchased for additional functionality.
Latest version of the SDK provides wrappers and categories around Core Data to allow you to leverage the knowledge you already have instead of learning an entirely new API from scratch.
Any binary assets (e.g. images) must be managed through Amazon web services. You’d need to create and configure a separate Amazon S3 account for those assets, and manage them through Amazon instead of StackMob.
But my app is special. These don’t do everything I need!
Thursday, May 23, 13
Roll your own!
In that case...
Deloitte Digital Presentation Name
Thursday, May 23, 13
A home-grown solution built of your own volition.
Custom Backend
No API limits
Free to use
No feature restrictions
Pros Cons
Must know a backend
technology such as Rails
Startup time is much larger
Thursday, May 23, 13
BaaS Test Drives
Thursday, May 23, 13
Parse ~ 90 minutesHelios - > 8 hoursJSaaS ~ 5 hours
Dwitter Metrics
Thursday, May 23, 13
Dwitter on Parse
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
After pasting in the test code and launching the app, you can click the Test button to make sure you’re connecting to the Parse back end properly.
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Log In and Sign Up view controllers are extremely
convenient
Main thread warnings
Changing cached data
Fetching relational data
Parse
Thursday, May 23, 13
Login and Signup VC’s must be subclasses to replace the Parse theme, even just for the title.
The framework will warn you if you perform fetches on the main thread. You can add the symbolic breakpoint warnParseOperationOnMainThread to have the debugger stop when you make this call and check the stack trace for where you did it.
Changing cached data requires an explicit call to refresh. Especially important using the [PFUser currentUser] convenience method
Cannot fetch the objects at the other end of a relation in a single API call. Fetching User data for Dweets is an example.
Dwitter on Helios.
Thursday, May 23, 13
To get Helios up and running, there are a few prerequisites:
Ruby 1.9.x or greater
RubyGems
PostgreSQL 9.1 or greater
Command of the command line
Before you start...
Thursday, May 23, 13
Mac OS X comes with Ruby 1.8 installed by default. Upgrading to 1.9.x at least will also install RubyGems. This is required in order to install the helios gem and perform all other gem dependency downloading
Postgres.app is an easy way to get a Postgres server running on your mac
You do all of the setup from the command line. At least a little familiarity is useful.
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Auto-generate RESTful web services based on Core Data
model
Scoped relationships are non-trivial to create and fetch
Reliance on third party libraries
Helios
Thursday, May 23, 13
Dwitter on JSaaS
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
Thursday, May 23, 13
High level of customization
Easy to test
Server-side configuration
Value is driven by level of complexity required
JSaaS
Thursday, May 23, 13
Server side configuration: Easy to add query parameters, e.g. sortingValue: For 99% of apps, rolling your own back end won’t outweigh the benefits of using something like Parse.
Questions?
Deloitte Digital Presentation Name
Thursday, May 23, 13
Deloitte Digital Presentation Name
Thank you.
Thursday, May 23, 13
Thursday, May 23, 13