The Design of iOS-Trello

32
Design of iOS-Trello A general purpose, open-source, iOS/Objective-C API Wrapper for the Trello Public API Vince Mansel http://slideshare.net/VinceMansel/iostrellotalk2 iOS- Trello

description

A general purpose, open-source, iOS/Objective-C API Wrapper for the Trello Public API

Transcript of The Design of iOS-Trello

Page 1: The Design of iOS-Trello

Design of iOS-TrelloA general purpose, open-source,

iOS/Objective-C API Wrapper

for the Trello Public API

Vince Mansel

http://slideshare.net/VinceMansel/iostrellotalk2

iOS-Trello

Page 2: The Design of iOS-Trello

About …

ExperienceSoftware DeveloperNetworking ConsultantSystems Engineer

Past companies/clients Juniper, Cyan, Calix, Minerva, DirecTV, Divicom,

Network Solutions, PacBell, AT&T Bell Labs

Education: MSEE - Georgia Tech, BSEE – Purdue

Fun: music, salsa, travel, hiking, AC, …

Page 3: The Design of iOS-Trello

Agenda

Drivers

Big Picture

Decision Funnel

Baseline Solution

Software Architecture

Questions

Extra: Code Samples, Software Design and Techniques

http://slideshare.net/VinceMansel/iostrellotalk2

@vincemansel Designing iOS-Trello

3

Page 4: The Design of iOS-Trello

Driver #1: ShowPlan(iOS Client)

@vincemansel Designing iOS-Trello

4

Production Design,Planning and ReferenceFor Creative People

#1 Feature:

ARRANGING&SEQUENCING

Page 5: The Design of iOS-Trello

Driver #2: Trello(web client)

@vincemansel Designing iOS-Trello

5

Collaboration andTask ManagementWeb Service

(clients available on web, iPhone,Android, etc)

#1 Feature:

CLOUDCOLLABORATION

Page 6: The Design of iOS-Trello

Big Picture(s)What is the problem that we are solving?

① Social: Bridge idea/design with real-time performance

② Technical: Allow users to share ideas with a mobile client to other clients connected via web services

How can we create a system/tool to transform creative ideas into sharable plans between collaborators?

@vincemansel Designing iOS-Trello

6

Page 7: The Design of iOS-Trello

Decision Funnel

Specific: Create a collaborative presence for the App

Use a “reflective” web service with an API

General: Allow developers to write collaborative apps Open-source

Create an API Wrapper Simple, Object-Oriented, Modular Fast & Lightweight Easy to implement & maintain

@vincemansel Designing iOS-Trello

7

Page 8: The Design of iOS-Trello

Baseline Solution

ShowPlan:

A ProductionDesign app

iOS-Trello:

An open-sourceAPI Wrapperimplementation

iOS-Trello

Trello:

A collaborationand task managementweb service

@vincemansel Designing iOS-Trello

8

API Wrapper API

https://github.com/vincemansel/ios-trello

A customized iOSTrello Client

Page 9: The Design of iOS-Trello

Object Mapping

ShowPlan -> TrelloShowFlow -> BoardScene -> ListElement -> Card

First IterationExport onlyText Only

@vincemansel Designing iOS-Trello

9

Page 10: The Design of iOS-Trello

ios-trello app architectureApplication Code

ios-trello

AFNetworkingOAuth

NSURLRequest

NSURLResponseNSURLConnection

@vincemansel Designing iOS-Trello

10

Page 11: The Design of iOS-Trello

ios-trello internals[VMTrelloApiClient sharedSession]

connect

ion

managem

ent

credenti

al

stora

ge

Act

ion

Board

Card

Check

list

List

Type

Mem

ber

Noti

fica

tion

… WRAPPERS(Objective-CCategories)

MACROS

SINGLETON

@vincemansel Designing iOS-Trello

11

Page 12: The Design of iOS-Trello

Collaboration: Today

Email

Text

@vincemansel Designing iOS-Trello

12

Page 13: The Design of iOS-Trello

Collaboration: Next Iteration

Email

Multimedia

Peer to Peer

@vincemansel Designing iOS-Trello

13

Page 14: The Design of iOS-Trello

Questions?

Page 15: The Design of iOS-Trello

Thanks!

@vincemansel

@ShowPlanApp

facebook.com/ShowPlan

Page 16: The Design of iOS-Trello

Future for ios-trello

Iterate

Develop and test additional API calls in phases

Architect and develop real-time, bi-directional functionality

Expand documentation and use cases

@vincemansel Designing iOS-Trello

16

Page 17: The Design of iOS-Trello

Trello Public APIhttps://trello.com/docs/api/index.html

@vincemansel Designing iOS-Trello

17

Page 18: The Design of iOS-Trello

trello.com/docs/api

@vincemansel Designing iOS-Trello

18

Page 19: The Design of iOS-Trello

Use Case: Create a Trello Board

① User touches “Create Board” button on View

② Controller instantiates a popover with text entry UI

③ User enters some text and touches OK

④ Popover sends text as a message to its delegate (Controller)

⑤ Delegate transforms text to a board name, and sends the name parameter to the POST /1/boards Wrapper

⑥ JSON is asynchronously returned to caller and parsed for name and ID of the created board

⑦ Caller stores board ID in Model and writes “boardName” to a tableView cell.

@vincemansel Designing iOS-Trello

19

Page 20: The Design of iOS-Trello

Delegate: send + JSON parse

@vincemansel Designing iOS-Trello

20

Page 21: The Design of iOS-Trello

WRAPPER

@vincemansel Designing iOS-Trello

21

Page 22: The Design of iOS-Trello

MACROS

@vincemansel Designing iOS-Trello

22

Page 23: The Design of iOS-Trello

Design Approach

Choose specific APIs calls and parameters required for current revision of App

Construct API calls in desktop browser

Reverse Engineer & Inspect API behavior (JSON) and network interaction (HTTP)

Code direct API calls in Objective-C

Abstract API methods into Wrapper classes

Test and iterate

@vincemansel Designing iOS-Trello

23

Page 24: The Design of iOS-Trello

Create the WRAPPER

https://trello.com/1/members/me?notifications=all&notifications_limit=5&organizations=all&organization_paid_account=true&organization_fields=name

https://trello.com/1/members/me

?

notifications=all&notifications_limit=5&organizations=all&organization_paid_account=true&organization_fields=name

REQUEST

PARAMETERS

@vincemansel Designing iOS-Trello

24

Page 25: The Design of iOS-Trello

Additional WRAPPERS

GET

POST

PUT

DELETE

@vincemansel Designing iOS-Trello

25

Page 26: The Design of iOS-Trello

Resources

Contribute to the ios-trello projecthttps://github.com/vincemansel/ios-trello

Follow the Trello API developmenthttps://trello.com/api

@vincemansel Designing iOS-Trello

26

Page 27: The Design of iOS-Trello

REST

Client-Server ShowPlan < > trello.com

Stateless CoreData store in ShowPlan

Cacheable (Client-side) JSON sent back in response to request

Layered System Server-side implementation

Code on demand (optional) NA

Uniform Interface API, JSON, URIs (board, list, card, member)

@vincemansel Designing iOS-Trello

27

Page 28: The Design of iOS-Trello

REST Resources

RESTKit (iOS)https://github.com/RestKit/RestKit

RESTful API Server – Doing it the right wayhttp://blog.mugunthkumar.com/

REST API Design Rulebook (Mark Messe)

@vincemansel Designing iOS-Trello

28

Page 29: The Design of iOS-Trello

The Target

ImplementationPerformanceDevelopment

WritersDirectorsPlannersDesignersArchitects

IdeasPlansDesign Phase

ActorsPerformersDevelopersImplementers

Page 30: The Design of iOS-Trello

“The” Answer, extended

ShowPlan:

A customized iOSTrello Client

iOS-Trello:

An open-sourceAPI Wrapperimplementation

iOS-Trello

ios4trello:

The demo projectfor API Wrapperdev and test

Trello:

A collaborationand task managementweb service

@vincemansel Designing iOS-Trello

30

API Wrapper

API Wrapper

API

Page 31: The Design of iOS-Trello

ios4trello (demo test app)

@vincemansel Designing iOS-Trello

31

API Wrapper Sandbox:Exercise, test and exploreManual test tool

http://showplan.net/ios4TrelloAtGithubhttp://bit.ly/ios4trellohttps://github.com/vincemansel/ios-trello

Open-sourceExtensible

Page 32: The Design of iOS-Trello

The Trello Tech Stack

@vincemansel Designing iOS-Trello

32

Source:http://blog.fogcreek.com/the-trello-tech-stack/