SlideShare una empresa de Scribd logo
1 de 95
Descargar para leer sin conexión
@MicheleTitolo
API Jones
and the
Wireframes of Doom
APIs & Wireframes
APIs
Wireframes
Not mockups
Wireframes
What not to do
Hey, look! A Wireframe!
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
Time === Money
The right way
Hey, look! A Wireframe!
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
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
Why’d it have to be snakes?
Thank you!
@MicheleTitolo

Más contenido relacionado

Similar a API Jones and the Wireframes of Doom

Playing with d3.js
Playing with d3.jsPlaying with d3.js
Playing with d3.js
mangoice
 

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

Awesome Tools 2017
Awesome Tools 2017Awesome Tools 2017
Awesome Tools 2017
 
GraphQL
GraphQLGraphQL
GraphQL
 
Playing with d3.js
Playing with d3.jsPlaying with d3.js
Playing with d3.js
 
JSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked DataJSON-LD: JSON for Linked Data
JSON-LD: JSON for Linked Data
 
mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.mobile in the cloud with diamonds. improved.
mobile in the cloud with diamonds. improved.
 
Extensible RESTful Applications with Apache TinkerPop
Extensible RESTful Applications with Apache TinkerPopExtensible RESTful Applications with Apache TinkerPop
Extensible RESTful Applications with Apache TinkerPop
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
 
Advanced data modeling with apache cassandra
Advanced data modeling with apache cassandraAdvanced data modeling with apache cassandra
Advanced data modeling with apache cassandra
 
When Relational Isn't Enough: Neo4j at Squidoo
When Relational Isn't Enough: Neo4j at SquidooWhen Relational Isn't Enough: Neo4j at Squidoo
When Relational Isn't Enough: Neo4j at Squidoo
 
MongoDB
MongoDBMongoDB
MongoDB
 
Conceptos básicos. seminario web 3 : Diseño de esquema pensado para documentos
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
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)Ember.js Tokyo event 2014/09/22 (English)
Ember.js Tokyo event 2014/09/22 (English)
 
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
Back to Basics Webinar 3: Schema Design Thinking in Documents
 
Back to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in DocumentsBack to Basics Webinar 3 - Thinking in Documents
Back to Basics Webinar 3 - Thinking in Documents
 
Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012Schema Design by Example ~ MongoSF 2012
Schema Design by Example ~ MongoSF 2012
 
Building your first app with mongo db
Building your first app with mongo dbBuilding your first app with mongo db
Building your first app with mongo db
 
Montreal Sql saturday: moving data from no sql db to azure data lake
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
 
Symfony + GraphQL
Symfony + GraphQLSymfony + GraphQL
Symfony + GraphQL
 
Graphql + Symfony | Александр Демченко | CODEiD
Graphql + Symfony | Александр Демченко | CODEiDGraphql + Symfony | Александр Демченко | CODEiD
Graphql + Symfony | Александр Демченко | CODEiD
 

Más de Michele Titolo

Mastering the Project File (AltConf)
Mastering the Project File (AltConf)Mastering the Project File (AltConf)
Mastering the Project File (AltConf)
Michele Titolo
 

Más de Michele Titolo (20)

Writing Design Docs for Wide Audiences
Writing Design Docs for Wide AudiencesWriting Design Docs for Wide Audiences
Writing Design Docs for Wide Audiences
 
Beam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big DataBeam Me Up: Voyaging into Big Data
Beam Me Up: Voyaging into Big Data
 
APIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The UglyAPIs: The Good, The Bad, The Ugly
APIs: The Good, The Bad, The Ugly
 
Tackling the Big, Impossible Project
Tackling the Big, Impossible ProjectTackling the Big, Impossible Project
Tackling the Big, Impossible Project
 
No Microservice is an Island
No Microservice is an IslandNo Microservice is an Island
No Microservice is an Island
 
From iOS to Distributed Systems
From iOS to Distributed SystemsFrom iOS to Distributed Systems
From iOS to Distributed Systems
 
More than po: Debugging in LLDB
More than po: Debugging in LLDBMore than po: Debugging in LLDB
More than po: Debugging in LLDB
 
APIs for the Mobile World
APIs for the Mobile WorldAPIs for the Mobile World
APIs for the Mobile World
 
Swift Generics in Theory and Practice
Swift Generics in Theory and PracticeSwift Generics in Theory and Practice
Swift Generics in Theory and Practice
 
Protocols promised-land-2
Protocols promised-land-2Protocols promised-land-2
Protocols promised-land-2
 
Multitasking
MultitaskingMultitasking
Multitasking
 
Making friendly-microservices
Making friendly-microservicesMaking friendly-microservices
Making friendly-microservices
 
More Than po: Debugging in LLDB @ CocoaConf SJ 2015
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
 
The Worst Code
The Worst CodeThe Worst Code
The Worst Code
 
More than `po`: Debugging in lldb
More than `po`: Debugging in lldbMore than `po`: Debugging in lldb
More than `po`: Debugging in lldb
 
Can't Handle My Scale
Can't Handle My ScaleCan't Handle My Scale
Can't Handle My Scale
 
Cocoa Design Patterns in Swift
Cocoa Design Patterns in SwiftCocoa Design Patterns in Swift
Cocoa Design Patterns in Swift
 
Mastering the Project File (AltConf)
Mastering the Project File (AltConf)Mastering the Project File (AltConf)
Mastering the Project File (AltConf)
 
That's Not My Code!
That's Not My Code!That's Not My Code!
That's Not My Code!
 
APIs: The good, the bad, the ugly
APIs: The good, the bad, the uglyAPIs: The good, the bad, the ugly
APIs: The good, the bad, the ugly
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

API Jones and the Wireframes of Doom