41
1.31.2014 - WWW.QUBOP.COM API Design, Development and Enterprise Apps RENAISSANCE 2014 SAN FRANCISCO, CA JANUARY 31, 2014

API Design and Enterprise Mobile Apps

Embed Size (px)

DESCRIPTION

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

Citation preview

Page 1: 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

Page 2: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Evan KirchhoffCOO, Qubop [email protected]: @theevank

www.qubop.com

Hello!

twitter: @qubopinc

Page 3: API Design and Enterprise Mobile Apps

Page 4: API Design and Enterprise Mobile Apps

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

Page 5: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

IN A GOOD MOBILE APP,

API DESIGN IS DERIVED

FROM UI DESIGN

Page 6: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

IN MOBILE, YOUR UI

DESIGN DETERMINES

YOUR BUSINESS MODEL*

* SLIGHTLY CONTROVERSIAL TO CLIENTS

Page 7: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

What is Salesforce?

1.31.2014 - WWW.QUBOP.COM

Page 8: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Mobile Back-end as a Service (MBaaS)

= ?!

Page 9: API Design and Enterprise Mobile Apps

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)

Page 10: API Design and Enterprise Mobile Apps

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

Page 11: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Default apps running on a general-purpose

database platform with common APIs

=

The Salesforce architecture & APIs

Page 12: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Different APIs=

= Different APIs

The Salesforce architecture & APIs

Page 13: API Design and Enterprise Mobile Apps

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

Page 14: API Design and Enterprise Mobile Apps

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

Page 15: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Salesforce for iOS Developers

1.31.2014 - WWW.QUBOP.COM

Page 16: API Design and Enterprise Mobile Apps

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

Page 17: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Default Salesforce web paradigm

Page 18: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

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

(NOT THAT MUCH, SO FAR)

Page 19: API Design and Enterprise Mobile Apps

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

Page 20: API Design and Enterprise Mobile Apps

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: $$$

Page 21: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Sales Organization Manager (live demo)

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

Page 22: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

API Design for Enterprise Apps

1.31.2014 - WWW.QUBOP.COM

Page 23: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Design the app UI first!

Page 24: API Design and Enterprise Mobile Apps

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

Page 25: API Design and Enterprise Mobile Apps

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

Page 26: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Don’t be satisfied with the stock APIs

THIS USUALLY MEANS THAT YOU’LL NEED TO WRITE MIDDLEWARE

Page 27: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Sales Organization Manager:our custom API calls from iOS

Page 28: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Example: Opportunities Heatmap UI

Page 29: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Example: Opportunities Heatmap UI

Page 30: API Design and Enterprise Mobile Apps
Page 31: API Design and Enterprise Mobile Apps
Page 32: API Design and Enterprise Mobile Apps

(1) iOS connection to custom Apex endpoint

Page 33: API Design and Enterprise Mobile Apps

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

1.31.2014 - WWW.QUBOP.COM

(MASHES UP LEAD AND OPPORTUNITY OBJECT DATA)

Page 34: API Design and Enterprise Mobile Apps

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

1.31.2014 - WWW.QUBOP.COM

Page 35: API Design and Enterprise Mobile Apps

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)

Page 36: API Design and Enterprise Mobile Apps

Where should your code live?your code live?

1.31.2014 - WWW.QUBOP.COM

Page 37: API Design and Enterprise Mobile Apps

Business logicvs. presentation logic?

Data vs.documents?

1.31.2014 - WWW.QUBOP.COM

Page 38: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Example: Documents + server-based email = API

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

Page 39: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Standard solution: use the iPhone native email client

SALESFORCEDOCUMENTSTORAGE

Page 40: API Design and Enterprise Mobile Apps

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

Page 41: API Design and Enterprise Mobile Apps

1.31.2014 - WWW.QUBOP.COM

Evan KirchhoffCOO, Qubop [email protected]: @theevank

Thanks!

www.qubop.comtwitter: @qubopinc