SlideShare ist ein Scribd-Unternehmen logo
1 von 95
Downloaden Sie, um offline zu lesen
@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

Weitere ähnliche Inhalte

Ähnlich wie API Jones and the Wireframes of Doom

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

Ähnlich wie 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
 

Mehr von Michele Titolo

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

Mehr von 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
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

API Jones and the Wireframes of Doom