API Jones and the Wireframes of Doom

Michele Titolo
Michele TitoloComputers ¯\_(ツ)_/¯ at Square
@MicheleTitolo
API Jones
and the
Wireframes of Doom
API Jones and the Wireframes of Doom
API Jones and the Wireframes of Doom
API Jones and the Wireframes of Doom
API Jones and the Wireframes of Doom
API Jones and the Wireframes of Doom
APIs & Wireframes
APIs
Wireframes
Not mockups
Wireframes
API Jones and the Wireframes of Doom
What not to do
Hey, look! A Wireframe!
API Jones and the Wireframes of Doom
Start developing!
Models
//
// Photo.h
//
@interface Photo : NSObject
@property (strong, nonatomic) User* user;
@property (strong, nonatomic) Location* location;
@property (strong, nonatomic) NSNumber* photoID;
@property (strong, nonatomic) NSDate* timestamp;
@property (strong, nonatomic) NSSet* comments;
@property (strong, nonatomic) NSURL* photoURL;
@end
//
// User.h
//
@interface User : NSObject
@property (copy, nonatomic) NSString* username;
@property (strong, nonatomic) NSNumber* userID;
@property (strong, nonatomic) NSURL* userPhotoURL;
@property (strong, nonatomic) NSSet* photos;
@property (strong, nonatomic) NSSet* comments;
@end
//
// Comment.h
//
@interface Comment : NSObject
@property (strong, nonatomic) User* user;
@property (strong, nonatomic) Photo* photo;
@property (strong, nonatomic) NSDate* timestamp;
@property (copy, nonatomic) NSString* text;
@end
PhotoCell
//
// PhotoCell.h
//
@interface PhotoCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView* userImageView;
@property (weak, nonatomic) IBOutlet UIImageView* photoImageView;
@property (weak, nonatomic) IBOutlet UILabel* userNameLabel;
@property (weak, nonatomic) IBOutlet UILabel* dateLabel;
@property (weak, nonatomic) IBOutlet UILabel* locationLabel;
@property (weak, nonatomic) IBOutlet UILabel* usersLovedLabel;
@property (weak, nonatomic) IBOutlet UILabel* userCommentLabel;
@property (strong, nonatomic) Photo* cellPhoto;
- (void)setupWithPhoto:(Photo*)photo;
@end
//
// PhotoCell.m
//
@implementation PhotoCell
- (void)setupWithPhoto:(Photo *)photo
{
self.cellPhoto = photo;
[self.userImageView setImageWithURL:photo.user.userPhotoURL];
[self.photoImageView setImageWithURL:photo.photoURL];
self.userNameLabel.text = photo.user.username;
// etc.
}
@end
//
// PhotoViewController.m
//
@implementation PhotoViewController
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:
(NSIndexPath *)indexPath
{
PhotoCell* cell = [tableView dequeueReusableCellWithIdentifier:s_cellID
forIndexPath:indexPath];
Photo* photo = [self.photos objectAtIndex:indexPath.row];
[cell setupWithPhoto:photo];
return cell;
}
@end
...several hours to several days later...
Build and Run
API Jones and the Wireframes of Doom
Time === Money
The right way
Hey, look! A Wireframe!
API Jones and the Wireframes of Doom
Annotations
photo posted date
photo
users who love photo
user picture, name
photo comments
photo location
photo posted date
photo
users who love photo
user picture, name
photo comments
photo location
tapping goes to user
profile
tapping goes to user
profile
tapping goes to location
on map
tapping user goes to
user profile
Write it down.
Photo
• location (lat/log and name)
• timestamp
• image URL
• user (name, photo, and id)
• comments (text, user name, and user id)
• users who love (name and id)
JSON
{
! "meta": {
! ! "self":"photos",
! ! "page":1,
! ! "offset":0,
! ! "total_items":282
! },
! "photos": [
{
"photo_url":"http://p3.amazons3.com/apijones/photos/124hh3b99d77dsnn.png",
"created_at":"2013-09-01T18:16:54Z",
"identifier":24435,
"user": {
"username":"karlthefog",
"identifier":6332
},
"loves": [ 5622, 4402, 9773 ],
"comments": [
{
"text":"Sorry I'm not home right now",
"user_id":24254,
"identifier":122887,
"timestamp":"2013-09-01T18:36:02Z"
},
{
"text":"I'm floating into spiderwebs",
"user_id":6332,
"identifier":122921,
"timestamp":"2013-09-01T18:42:22Z"
}
]
}
]
}
Back to the list
Photo
• location (lat/log and name)
• timestamp
• image URL
• user (name, photo, and id)
• comments (text, user name, and user id)
• users who love (name and id)(name and id)
{
! "meta": {
! ! "self":"photos",
! ! "page":1,
! ! "offset":0,
! ! "total_items":282
! },
! "photos": [
{
"photo_url":"http://p3.amazons3.com/apijones/photos/124hh3b99d77dsnn.png",
"created_at":"2013-09-01T18:16:54Z",
"identifier":24435,
"user": {
"username":"karlthefog",
"identifier":6332
},
"loves": [ 5622, 4402, 9773 ],
"comments": [
{
"text":"Sorry I'm not home right now",
"user_id":24254,
"identifier":122887,
"timestamp":"2013-09-01T18:36:02Z"
},
{
"text":"I'm floating into spiderwebs",
"user_id":6332,
"identifier":122921,
"timestamp":"2013-09-01T18:42:22Z"
}
]
}
]
}
"loves": [ 5622, 4402, 9732 ],
Congrats!
You found a problem.
Make a note,
then move along
Do this for every screen.
Measure twice, cut once
API Jones and the Wireframes of Doom
API Jones and the Wireframes of Doom
Measure twice, cut once
Communicate!
Work...uninterrupted
Tips & Tricks
Design
Pull To Refresh
To remove all data, or not to
remove all data, that is the
question
Storage
Don’t overwrite data with nil
//
// NSMutableDictionary+NilAdditions.m
//
@implementation NSMutableDictionary (NilAdditions)
- (void)setNotNilObject:(id)anObject forKey:(id<NSCopying>)key
{
if (anObject) {
[self setObject:anObject forKey:key];
}
}
@end
Infinite Scroll
Pagination
Remember your place
Drill Down
REST
GET /resources
GET /resources/:id
GET /resources/:id/nested_resources
GET /photos
GET /photos/55
GET /photos/55/comments
REST has it’s problems, too
APIs
Find Patterns
Meta information
Structures
Inconsistencies
Missing or Bad Data
Getting the Data
Batching
GET /photos/55
GET /photos/55/comments
Make sure you are actually
loading data
“comment_count”
“total_items”
Background Processing
Blocking the main thread
is bad
Process & construct where
it won’t affect performance
Caching
Core Data
NSCache
Documentation
Agile
This can be done
More communication,
faster turnaround
Define “iteration”
In Summary
Plan Ahead
Work smart, not hard
API Jones and the Wireframes of Doom
API Jones and the Wireframes of Doom
Why’d it have to be snakes?
API Jones and the Wireframes of Doom
Thank you!
@MicheleTitolo
1 of 95

Recommended

How To Make APIs That Don't Suck by
How To Make APIs That Don't SuckHow To Make APIs That Don't Suck
How To Make APIs That Don't SuckMichele Titolo
21.9K views23 slides
Mobile APIs by
Mobile APIsMobile APIs
Mobile APIsMichele Titolo
1.4K views34 slides
APIs: The Ugly by
APIs: The UglyAPIs: The Ugly
APIs: The UglyMichele Titolo
825 views20 slides
Can't Handle My Scale v2 by
Can't Handle My Scale v2Can't Handle My Scale v2
Can't Handle My Scale v2Michele Titolo
868 views98 slides
Practical Cocoapods by
Practical CocoapodsPractical Cocoapods
Practical CocoapodsMichele Titolo
1.3K views43 slides
Modernizes your objective C - Oliviero by
Modernizes your objective C - OlivieroModernizes your objective C - Oliviero
Modernizes your objective C - OlivieroCodemotion
740 views279 slides

More Related Content

Similar to API Jones and the Wireframes of Doom

Awesome Tools 2017 by
Awesome Tools 2017Awesome Tools 2017
Awesome Tools 2017Noel De Martin Fernandez
161 views77 slides
GraphQL by
GraphQLGraphQL
GraphQLJens Siebert
438 views23 slides
Playing with d3.js by
Playing with d3.jsPlaying with d3.js
Playing with d3.jsmangoice
1.5K views12 slides
JSON-LD: JSON for Linked Data by
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataGregg Kellogg
73.4K views50 slides
mobile in the cloud with diamonds. improved. by
mobile in the cloud with diamonds. improved.mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.Oleg Shanyuk
2.1K views33 slides
Extensible RESTful Applications with Apache TinkerPop by
Extensible RESTful Applications with Apache TinkerPopExtensible RESTful Applications with Apache TinkerPop
Extensible RESTful Applications with Apache TinkerPopVarun Ganesh
500 views55 slides

Similar to API Jones and the Wireframes of Doom(20)

Playing with d3.js by mangoice
Playing with d3.jsPlaying with d3.js
Playing with d3.js
mangoice1.5K views
JSON-LD: JSON for Linked Data by Gregg Kellogg
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked Data
Gregg Kellogg73.4K views
mobile in the cloud with diamonds. improved. by Oleg Shanyuk
mobile in the cloud with diamonds. improved.mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.
Oleg Shanyuk2.1K views
Extensible RESTful Applications with Apache TinkerPop by Varun Ganesh
Extensible RESTful Applications with Apache TinkerPopExtensible RESTful Applications with Apache TinkerPop
Extensible RESTful Applications with Apache TinkerPop
Varun Ganesh500 views
Beautiful REST+JSON APIs with Ion by Stormpath
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
Stormpath3.7K views
Advanced data modeling with apache cassandra by Patrick McFadin
Advanced data modeling with apache cassandraAdvanced data modeling with apache cassandra
Advanced data modeling with apache cassandra
Patrick McFadin16.3K views
When Relational Isn't Enough: Neo4j at Squidoo by Gil Hildebrand
When Relational Isn't Enough: Neo4j at SquidooWhen Relational Isn't Enough: Neo4j at Squidoo
When Relational Isn't Enough: Neo4j at Squidoo
Gil Hildebrand9.3K views
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos by MongoDB
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentosConceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
MongoDB3.9K views
Ember.js Tokyo event 2014/09/22 (English) by Yuki Shimada
Ember.js Tokyo event 2014/09/22 (English)Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)
Yuki Shimada584 views
Back to Basics Webinar 3: Schema Design Thinking in Documents by MongoDB
 Back to Basics Webinar 3: Schema Design Thinking in Documents Back to Basics Webinar 3: Schema Design Thinking in Documents
Back to Basics Webinar 3: Schema Design Thinking in Documents
MongoDB3.6K views
Back to Basics Webinar 3 - Thinking in Documents by Joe Drumgoole
Back to Basics Webinar 3 - Thinking in DocumentsBack to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in Documents
Joe Drumgoole227 views
Schema Design by Example ~ MongoSF 2012 by hungarianhc
Schema Design by Example ~ MongoSF 2012Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012
hungarianhc6K views
Building your first app with mongo db by MongoDB
Building your first app with mongo dbBuilding your first app with mongo db
Building your first app with mongo db
MongoDB4.4K views
Montreal Sql saturday: moving data from no sql db to azure data lake by Diponkar Paul
Montreal Sql saturday: moving data from no sql db to azure data lakeMontreal Sql saturday: moving data from no sql db to azure data lake
Montreal Sql saturday: moving data from no sql db to azure data lake
Diponkar Paul75 views
Graphql + Symfony | Александр Демченко | CODEiD by CODEiD PHP Community
Graphql + Symfony | Александр Демченко | CODEiDGraphql + Symfony | Александр Демченко | CODEiD
Graphql + Symfony | Александр Демченко | CODEiD

More from Michele Titolo

Writing Design Docs for Wide Audiences by
Writing Design Docs for Wide AudiencesWriting Design Docs for Wide Audiences
Writing Design Docs for Wide AudiencesMichele Titolo
94 views43 slides
Beam Me Up: Voyaging into Big Data by
Beam Me Up: Voyaging into Big DataBeam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big DataMichele Titolo
383 views90 slides
APIs: The Good, The Bad, The Ugly by
APIs: The Good, The Bad, The UglyAPIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The UglyMichele Titolo
155 views98 slides
Tackling the Big, Impossible Project by
Tackling the Big, Impossible ProjectTackling the Big, Impossible Project
Tackling the Big, Impossible ProjectMichele Titolo
534 views39 slides
No Microservice is an Island by
No Microservice is an IslandNo Microservice is an Island
No Microservice is an IslandMichele Titolo
611 views183 slides
From iOS to Distributed Systems by
From iOS to Distributed SystemsFrom iOS to Distributed Systems
From iOS to Distributed SystemsMichele Titolo
944 views101 slides

More from Michele Titolo(20)

Writing Design Docs for Wide Audiences by Michele Titolo
Writing Design Docs for Wide AudiencesWriting Design Docs for Wide Audiences
Writing Design Docs for Wide Audiences
Michele Titolo94 views
Beam Me Up: Voyaging into Big Data by Michele Titolo
Beam Me Up: Voyaging into Big DataBeam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big Data
Michele Titolo383 views
APIs: The Good, The Bad, The Ugly by Michele Titolo
APIs: The Good, The Bad, The UglyAPIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The Ugly
Michele Titolo155 views
Tackling the Big, Impossible Project by Michele Titolo
Tackling the Big, Impossible ProjectTackling the Big, Impossible Project
Tackling the Big, Impossible Project
Michele Titolo534 views
No Microservice is an Island by Michele Titolo
No Microservice is an IslandNo Microservice is an Island
No Microservice is an Island
Michele Titolo611 views
From iOS to Distributed Systems by Michele Titolo
From iOS to Distributed SystemsFrom iOS to Distributed Systems
From iOS to Distributed Systems
Michele Titolo944 views
More than po: Debugging in LLDB by Michele Titolo
More than po: Debugging in LLDBMore than po: Debugging in LLDB
More than po: Debugging in LLDB
Michele Titolo2.6K views
Swift Generics in Theory and Practice by Michele Titolo
Swift Generics in Theory and PracticeSwift Generics in Theory and Practice
Swift Generics in Theory and Practice
Michele Titolo1.8K views
Making friendly-microservices by Michele Titolo
Making friendly-microservicesMaking friendly-microservices
Making friendly-microservices
Michele Titolo1.1K views
More Than po: Debugging in LLDB @ CocoaConf SJ 2015 by Michele Titolo
More Than po: Debugging in LLDB @ CocoaConf SJ 2015More Than po: Debugging in LLDB @ CocoaConf SJ 2015
More Than po: Debugging in LLDB @ CocoaConf SJ 2015
Michele Titolo761 views
More than `po`: Debugging in lldb by Michele Titolo
More than `po`: Debugging in lldbMore than `po`: Debugging in lldb
More than `po`: Debugging in lldb
Michele Titolo9.1K views
Cocoa Design Patterns in Swift by Michele Titolo
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in Swift
Michele Titolo9.1K views
Mastering the Project File (AltConf) by Michele Titolo
Mastering the Project File (AltConf)Mastering the Project File (AltConf)
Mastering the Project File (AltConf)
Michele Titolo1.8K views
APIs: The good, the bad, the ugly by Michele Titolo
APIs: The good, the bad, the uglyAPIs: The good, the bad, the ugly
APIs: The good, the bad, the ugly
Michele Titolo8K views

Recently uploaded

Microsoft Power Platform.pptx by
Microsoft Power Platform.pptxMicrosoft Power Platform.pptx
Microsoft Power Platform.pptxUni Systems S.M.S.A.
61 views38 slides
Unit 1_Lecture 2_Physical Design of IoT.pdf by
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdfStephenTec
15 views36 slides
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensorssugiuralab
23 views15 slides
"Surviving highload with Node.js", Andrii Shumada by
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada Fwdays
33 views29 slides
SAP Automation Using Bar Code and FIORI.pdf by
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdfVirendra Rai, PMP
25 views38 slides
PRODUCT PRESENTATION.pptx by
PRODUCT PRESENTATION.pptxPRODUCT PRESENTATION.pptx
PRODUCT PRESENTATION.pptxangelicacueva6
18 views1 slide

Recently uploaded(20)

Unit 1_Lecture 2_Physical Design of IoT.pdf by StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec15 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab23 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays33 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
STPI OctaNE CoE Brochure.pdf by madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10345 views
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays24 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn26 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
Piloting & Scaling Successfully With Microsoft Viva by Richard Harbridge
Piloting & Scaling Successfully With Microsoft VivaPiloting & Scaling Successfully With Microsoft Viva
Piloting & Scaling Successfully With Microsoft Viva
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson126 views

API Jones and the Wireframes of Doom