Skip to content

Instantly share code, notes, and snippets.

@scottpersinger
scottpersinger / rest_db.md
Last active August 29, 2015 14:00
REST DB - strawman

Simple RESTful Storage API

We need a simple, schemaless REST-based storage API for use by Javascript and native mobile apps. This "backend as a service" should provide a simple mechanism for storing state for thick-client apps that don't want to invest, at least initially, in server-side logic.

Parse is the best known example of this kind of service. A service like Parse enables this kind of simple app dev workflow:

def salesforce_oauth(s, oauth_url, username=None, password=None):
"""s should be a requests session"""
r = s.get(oauth_url)
params = urlparse.parse_qs(urlparse.urlparse(r.url).query)
data = {"un":username,
"width":2560,
"height":1440,
"hasRememberUn":True,
"startURL":params['startURL'],
@scottpersinger
scottpersinger / gist:6118327
Last active December 20, 2015 10:49
try this one

cloudconnect is an add-on that connects your Salesforce account to your Heroku app.

Cloudconnect creates a relational database containing your Salesforce data, and synchronizes data changes in both directions to that database.

By using cloudconnect, you can interact with your Salesforce data by connecting to a PostgresSQL or Mysql database using your favorite language or web framework like Rails, Django, or PHP.

Provisioning the add-on