API Design and Enterprise Mobile Apps

Post on 22-Nov-2014

1.337 views 0 download

description

From Renaissance 2014, how to design APIs for enterprise mobile apps, and how to approach the Salesforce platform as native iOS developers.

Transcript of API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

API Design, Development and Enterprise Apps

RENAISSANCE 2014SAN FRANCISCO, CA

JANUARY 31, 2014

1.31.2014 - WWW.QUBOP.COM

Evan KirchhoffCOO, Qubop Inc.evan@qubop.comtwitter: @theevank

www.qubop.com

Hello!

twitter: @qubopinc

1.31.2014 - WWW.QUBOP.COM

What is Salesforce?

Salesforce for native iOS developers

API design for enterprise apps

OUTLINE

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

IN A GOOD MOBILE APP,

API DESIGN IS DERIVED

FROM UI DESIGN

1.31.2014 - WWW.QUBOP.COM

IN MOBILE, YOUR UI

DESIGN DETERMINES

YOUR BUSINESS MODEL*

* SLIGHTLY CONTROVERSIAL TO CLIENTS

1.31.2014 - WWW.QUBOP.COM

What is Salesforce?

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

Mobile Back-end as a Service (MBaaS)

= ?!

1.31.2014 - WWW.QUBOP.COM

The “Big 4” Salesforce elementsfrom a mobile app developer’s point of view

1.31.2014 - WWW.QUBOP.COM

(BASED ON MARKETING TERMS THAT YOUR CLIENTS WILL KNOW)

1.31.2014 - WWW.QUBOP.COM

Our job is to “flatten” the platform into a minimal set of APIs

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

Default apps running on a general-purpose

database platform with common APIs

=

The Salesforce architecture & APIs

1.31.2014 - WWW.QUBOP.COM

Different APIs=

= Different APIs

The Salesforce architecture & APIs

1.31.2014 - WWW.QUBOP.COM

Lead Objects & Opportunity Objects

Example: the Sales Cloud technology stack

SOQL

Apex

VisualForce / HTML5

DATABASE TABLES

QUERY LANGUAGE

SERVER MIDDLEWARE CODE

WEB UI AND PRESENTATION

1.31.2014 - WWW.QUBOP.COM1.31.2014 - WWW.QUBOP.COM

The Salesforce developer community is primarily a web development community

...and extremely seperate from the iOS developer community

1.31.2014 - WWW.QUBOP.COM

Salesforce for iOS Developers

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

SALES LEAD

SALES OPPORTUNITY

PROSPECTING (10%)QUALIFICATION (20%)

PROPOSAL (50%)NEGOTIATION (80%)

WON! or CLOSED

Typical Salesforce “sales pipeline” model

1.31.2014 - WWW.QUBOP.COM

Default Salesforce web paradigm

1.31.2014 - WWW.QUBOP.COM

Does Salesforce 1 (Nov 2013) affect the world of native iOS developers?

(NOT THAT MUCH, SO FAR)

1.31.2014 - WWW.QUBOP.COM

The “Salesforce 1 app” (hybrid platform)

3RD PARTY WEB-TECHNOLOGY APPS PLUG INTO THE LEFT SIDE MENU

BUILT-IN ACCESS TO STANDARD SALESFORCE DATA TYPES

1.31.2014 - WWW.QUBOP.COM

Salesforce platform: what is interesting to native iOS developers

Native SDK (OAuth, communication stack)

Rapid back end development

Automatic server-side optimization

Lots of free general business logic

Authentication, security, user roles

Valuable clients: $$$

1.31.2014 - WWW.QUBOP.COM

Sales Organization Manager (live demo)

NATIVE IPAD APP USING ALL OF THE “BIG 4” SALESFORCE ELEMENTS

1.31.2014 - WWW.QUBOP.COM

API Design for Enterprise Apps

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

Design the app UI first!

The world’s smartest dumb terminal

EVEN IF BUSINESS LOGIC LIVES ON THE SERVER, THE CLIENT IS “THICK” AND MAY CONTAIN SUBSTANTIAL UI LOGIC

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

Don’t design the UI based on the data structure

X

THE USER DOESN’T PERCEIVE THE APP THE WAY YOU PERCEIVE THE DATA

...AND THE SCREEN IS VERY SMALL

1.31.2014 - WWW.QUBOP.COM

Don’t be satisfied with the stock APIs

THIS USUALLY MEANS THAT YOU’LL NEED TO WRITE MIDDLEWARE

1.31.2014 - WWW.QUBOP.COM

Sales Organization Manager:our custom API calls from iOS

1.31.2014 - WWW.QUBOP.COM

Example: Opportunities Heatmap UI

1.31.2014 - WWW.QUBOP.COM

Example: Opportunities Heatmap UI

(1) iOS connection to custom Apex endpoint

(2) Apex class written specifically to feed this heatmap UI

1.31.2014 - WWW.QUBOP.COM

(MASHES UP LEAD AND OPPORTUNITY OBJECT DATA)

(3) JSON response from Apex, converted to NSDictionary in iOS

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

(4) Finally: render the circles and columns in iOS

“AMOUNT” = NUMBER OF DEALS IN THE COLUMN (DETERMINES CIRCLE RADIUS)

Where should your code live?your code live?

1.31.2014 - WWW.QUBOP.COM

Business logicvs. presentation logic?

Data vs.documents?

1.31.2014 - WWW.QUBOP.COM

1.31.2014 - WWW.QUBOP.COM

Example: Documents + server-based email = API

GOAL: THE SALESPERSON WANTS TO ATTACH COLLATERAL FROM SALESFORCE TO EMAIL

1.31.2014 - WWW.QUBOP.COM

Standard solution: use the iPhone native email client

SALESFORCEDOCUMENTSTORAGE

1.31.2014 - WWW.QUBOP.COM

Better solution: create an API to send email + attachments from the server

ALLOWS FOR QUEUEING LOGIC, LOW BANDWIDTH, OFFLINE CASE HANDLING

SALESFORCEDOCUMENTSTORAGE

1.31.2014 - WWW.QUBOP.COM

Evan KirchhoffCOO, Qubop Inc.evan@qubop.comtwitter: @theevank

Thanks!

www.qubop.comtwitter: @qubopinc