SlideShare une entreprise Scribd logo
1  sur  20
Building Web Services
   for Mobile Apps
   Brent Simmons @brentsimmons
     Nick Bradbury @nbradbury
     Brian Reischl @brianreischl
      Nick Harris @nick_harris

           @SepiaLabs
           @Glassboard
Introductions

Brent Simmons: NetNewsWire and Mars Edit
Nick Bradbury: HomeSite, TopStyle, FeedDemon.
Brian Reischl: 5+ years at NewsGator
Nick Harris: 5+ years at NewsGator
Glassboard

- Private Group Messaging
- Available on iOS, Android and WP7
History

- Idea formally born in December 2010
- Development began in January 2011
- First beta in mid-May
- Second beta in July
- Initial Release August 2011
Platform Details

- Built on Microsoft Windows Azure
- Both WebRoles and Worker Roles
- Table, Queue and Blob Storage
- SQL Azure for diagnostic data
Initial API Design


- REST Implementation
- JSON body content when possible
- Multi-part Form otherwise
Why REST?

- Main idea of REST is uniquely addressable objects
- Easier for client developers to understand
- Supported with basic frameworks on any platform
- Encourages more universal architecture decisions
REST API Examples:
                Boards
GET /api/boards
gets the boards for a user

POST /api/boards
creates a new board with the information supplied in the JSON body

GET /api/boards/{board_id}/statuses
gets the latest statuses for the board

GET /api/boards/{board_id}/statuses/{status_id}/comments
gets the latest comments for the status
Why REST cont...
- HTTP Status Codes
- Additional HTTP Headers
  POST /api/boards/

  RESPONSE:
  Status Code: 409 Conflict
  X-GlassboardPlatform-Exception-Code:
  200002


  **Error code 200002: A board with this name
  already exists for this chairman
Why JSON?


- Smaller “on the wire” footprint
JSON Example

{
    "AttachmentHasThumbnail":true,
    "AttachmentId":"XXX-XXXX-XXXX-XXX",
    "AttachmentType":0,
    "AuthorId":"XXX-XXXX-XXXX-XXX",
    "BoardId":"XXX-XXXX-XXXX-XXX",
    "CommentCount":0,
    "LikeCount":0,
    "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”],
    "Link":"http://www.link.com",
    "Location":"+12345 -12345",
    "PubDate":"01/01/1001",
    "Status":"Hello World",
    "StatusId":"XXX-XXXX-XXXX-XXX",
    "Updated":"XXX-XXXX-XXXX-XXX"
}
XML Output
<StatusInfo>
 <AttachmentHasThumbnail>true</AttachmentHasThumbnail>
 <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId>
 <AttachmentType>NONE</AttachmentType>
 <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId>
 <BoardId> XXX-XXXX-XXXX-XXX </BoardId>
 <CommentCount>0</CommentCount>
 <LikeCount>2</LikeCount>
 <LikedByUsers>
  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
 </LikedByUsers>
 <Link>http://www.link.com</Link>
 <Location>+12345 -12345</Location>
 <PubDate>01/01/1001</PubDate>
 <Status>Hello World</Status>
 <StatusId>XXX-XXXX-XXXX-XXX </StatusId>
 <Updated>XXX-XXXX-XXXX-XXX </Updated>
</StatusInfo>
{                                                                <StatusInfo>
    "AttachmentHasThumbnail":true,                                <AttachmentHasThumbnail>true</AttachmentHasThumbnail>
    "AttachmentId":"XXX-XXXX-XXXX-XXX",                           <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId>
    "AttachmentType":0,                                           <AttachmentType>NONE</AttachmentType>
    "AuthorId":"XXX-XXXX-XXXX-XXX",                               <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId>
    "BoardId":"XXX-XXXX-XXXX-XXX",                                <BoardId> XXX-XXXX-XXXX-XXX </BoardId>
    "CommentCount":0,                                             <CommentCount>0</CommentCount>
    "LikeCount":0,                                                <LikeCount>2</LikeCount>
    "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”],    <LikedByUsers>
    "Link":"http://www.link.com",                                  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
    "Location":"+12345 -12345",                                    <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
    "PubDate":"01/01/1001",                                       </LikedByUsers>
    "Status":"Hello World",                                       <Link>http://www.link.com</Link>
    "StatusId":"XXX-XXXX-XXXX-XXX",                               <Location>+12345 -12345</Location>
    "Updated":"XXX-XXXX-XXXX-XXX"                                 <PubDate>01/01/1001</PubDate>
}                                                                 <Status>Hello World</Status>
{                                                                 <StatusId>XXX-XXXX-XXXX-XXX </StatusId>
    "AttachmentHasThumbnail":true,                                <Updated>XXX-XXXX-XXXX-XXX </Updated>
    "AttachmentId":"XXX-XXXX-XXXX-XXX",                          </StatusInfo>
    "AttachmentType":0,                                          <StatusInfo>
    "AuthorId":"XXX-XXXX-XXXX-XXX",                               <AttachmentHasThumbnail>true</AttachmentHasThumbnail>
    "BoardId":"XXX-XXXX-XXXX-XXX",                                <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId>
    "CommentCount":0,                                             <AttachmentType>NONE</AttachmentType>
    "LikeCount":0,                                                <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId>
    "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”],    <BoardId> XXX-XXXX-XXXX-XXX </BoardId>
    "Link":"http://www.link.com",                                 <CommentCount>0</CommentCount>
    "Location":"+12345 -12345",                                   <LikeCount>2</LikeCount>
    "PubDate":"01/01/1001",                                       <LikedByUsers>
    "Status":"Hello World",                                        <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
    "StatusId":"XXX-XXXX-XXXX-XXX",                                <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
    "Updated":"XXX-XXXX-XXXX-XXX"                                 </LikedByUsers>
}                                                                 <Link>http://www.link.com</Link>
{                                                                 <Location>+12345 -12345</Location>
    "AttachmentHasThumbnail":true,                                <PubDate>01/01/1001</PubDate>
    "AttachmentId":"XXX-XXXX-XXXX-XXX",                           <Status>Hello World</Status>
    "AttachmentType":0,                                           <StatusId>XXX-XXXX-XXXX-XXX </StatusId>
    "AuthorId":"XXX-XXXX-XXXX-XXX",                               <Updated>XXX-XXXX-XXXX-XXX </Updated>
    "BoardId":"XXX-XXXX-XXXX-XXX",                               </StatusInfo>
    "CommentCount":0,                                            <StatusInfo>
    "LikeCount":0,                                                <AttachmentHasThumbnail>true</AttachmentHasThumbnail>
    "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”],    <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId>
    "Link":"http://www.link.com",                                 <AttachmentType>NONE</AttachmentType>
    "Location":"+12345 -12345",                                   <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId>
    "PubDate":"01/01/1001",                                       <BoardId> XXX-XXXX-XXXX-XXX </BoardId>
    "Status":"Hello World",                                       <CommentCount>0</CommentCount>
    "StatusId":"XXX-XXXX-XXXX-XXX",                               <LikeCount>2</LikeCount>
    "Updated":"XXX-XXXX-XXXX-XXX"                                 <LikedByUsers>
}                                                                  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
{                                                                  <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
    "AttachmentHasThumbnail":true,                                </LikedByUsers>
    "AttachmentId":"XXX-XXXX-XXXX-XXX",                           <Link>http://www.link.com</Link>
    "AttachmentType":0,                                           <Location>+12345 -12345</Location>
    "AuthorId":"XXX-XXXX-XXXX-XXX",                               <PubDate>01/01/1001</PubDate>
    "BoardId":"XXX-XXXX-XXXX-XXX",                                <Status>Hello World</Status>
    "CommentCount":0,                                             <StatusId>XXX-XXXX-XXXX-XXX </StatusId>
    "LikeCount":0,                                                <Updated>XXX-XXXX-XXXX-XXX </Updated>
    "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”],   </StatusInfo>
    "Link":"http://www.link.com",                                <StatusInfo>
    "Location":"+12345 -12345",                                   <AttachmentHasThumbnail>true</AttachmentHasThumbnail>
    "PubDate":"01/01/1001",                                       <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId>
    "Status":"Hello World",                                       <AttachmentType>NONE</AttachmentType>
    "StatusId":"XXX-XXXX-XXXX-XXX",                               <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId>
    "Updated":"XXX-XXXX-XXXX-XXX"                                 <BoardId> XXX-XXXX-XXXX-XXX </BoardId>
}                                                                 <CommentCount>0</CommentCount>
                                                                  <LikeCount>2</LikeCount>
                                                                  <LikedByUsers>
                                                                   <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
iOS Client


- Built by Brent Simmons
Android Client


- Build by Nick Bradbury
What we learned...
The Problem...
- Stringent REST implementations have limitations
- Mobile applications have their own limitations

Mobile apps need to be not only useable but useful
as soon as possible - that means new data...
The Newsfeed Solution
- Single call to get all new statuses and comments
- One out-bound request on startup
- Data body just a set of existing JSON objects
Platform API Future

- More “newsfeed like” REST hybrid calls
- Open to 3rd parties?
Q&A
(with your host @jennyblumberg
        aka @glassboard
        aka @sepialabs)

Contenu connexe

Tendances

Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Markus Lanthaler
 

Tendances (8)

Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Mongo db for c# developers
Mongo db for c# developersMongo db for c# developers
Mongo db for c# developers
 
A Semantic Description Language for RESTful Data Services to Combat Semaphobia
A Semantic Description Language for RESTful Data Services to Combat SemaphobiaA Semantic Description Language for RESTful Data Services to Combat Semaphobia
A Semantic Description Language for RESTful Data Services to Combat Semaphobia
 
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
Aligning Web Services with the Semantic Web to Create a Global Read-Write Gra...
 
NDC London 2013 - Mongo db for c# developers
NDC London 2013 - Mongo db for c# developersNDC London 2013 - Mongo db for c# developers
NDC London 2013 - Mongo db for c# developers
 
Elasticsearch Workshop
Elasticsearch WorkshopElasticsearch Workshop
Elasticsearch Workshop
 
Blockchain Technologies for Data Science
Blockchain Technologies for Data ScienceBlockchain Technologies for Data Science
Blockchain Technologies for Data Science
 
SF ElasticSearch Meetup - How HipChat Scaled to 1B Messages
SF ElasticSearch Meetup - How HipChat Scaled to 1B MessagesSF ElasticSearch Meetup - How HipChat Scaled to 1B Messages
SF ElasticSearch Meetup - How HipChat Scaled to 1B Messages
 

Similaire à Building Web Services for Mobile Apps

Semantic web support for POSH
Semantic web support for POSHSemantic web support for POSH
Semantic web support for POSH
Dinu Suman
 
Sakai customization talk
Sakai customization talkSakai customization talk
Sakai customization talk
croby
 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6
Usman Zafar Malik
 

Similaire à Building Web Services for Mobile Apps (20)

Json Persistence Framework
Json Persistence FrameworkJson Persistence Framework
Json Persistence Framework
 
(SEC303) Mastering Access Control Policies | AWS re:Invent 2014
(SEC303) Mastering Access Control Policies | AWS re:Invent 2014(SEC303) Mastering Access Control Policies | AWS re:Invent 2014
(SEC303) Mastering Access Control Policies | AWS re:Invent 2014
 
Connect Intergration Patterns: A Case Study - Patrick Streule
Connect Intergration Patterns: A Case Study - Patrick StreuleConnect Intergration Patterns: A Case Study - Patrick Streule
Connect Intergration Patterns: A Case Study - Patrick Streule
 
Semantic web support for POSH
Semantic web support for POSHSemantic web support for POSH
Semantic web support for POSH
 
shoubox script
shoubox scriptshoubox script
shoubox script
 
jQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveisjQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveis
 
OSCON 2011 CouchApps
OSCON 2011 CouchAppsOSCON 2011 CouchApps
OSCON 2011 CouchApps
 
Sakai customization talk
Sakai customization talkSakai customization talk
Sakai customization talk
 
Teaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in TitaniumTeaming up WordPress API with Backbone.js in Titanium
Teaming up WordPress API with Backbone.js in Titanium
 
best aws training in bangalore
best aws training in bangalorebest aws training in bangalore
best aws training in bangalore
 
Braces to Pixels - CSS Day 2016
Braces to Pixels - CSS Day 2016Braces to Pixels - CSS Day 2016
Braces to Pixels - CSS Day 2016
 
Forbes MongoNYC 2011
Forbes MongoNYC 2011Forbes MongoNYC 2011
Forbes MongoNYC 2011
 
Documentation 2.0: DIY Content Delivery and Feedback in Real-time
Documentation 2.0: DIY Content Delivery and Feedback in Real-timeDocumentation 2.0: DIY Content Delivery and Feedback in Real-time
Documentation 2.0: DIY Content Delivery and Feedback in Real-time
 
Ws rest
Ws restWs rest
Ws rest
 
Create online games with node.js and socket.io
Create online games with node.js and socket.ioCreate online games with node.js and socket.io
Create online games with node.js and socket.io
 
The Devil and HTML5
The Devil and HTML5The Devil and HTML5
The Devil and HTML5
 
Masting Access Control Policies
Masting Access Control PoliciesMasting Access Control Policies
Masting Access Control Policies
 
SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6SharePoint 2010 Training Session 6
SharePoint 2010 Training Session 6
 
iMasters Intercon 2016 - Identity within Microservices
iMasters Intercon 2016 - Identity within MicroservicesiMasters Intercon 2016 - Identity within Microservices
iMasters Intercon 2016 - Identity within Microservices
 
InterCon 2016 - Segurança de identidade digital levando em consideração uma a...
InterCon 2016 - Segurança de identidade digital levando em consideração uma a...InterCon 2016 - Segurança de identidade digital levando em consideração uma a...
InterCon 2016 - Segurança de identidade digital levando em consideração uma a...
 

Dernier

+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@
 

Dernier (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+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...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Building Web Services for Mobile Apps

  • 1. Building Web Services for Mobile Apps Brent Simmons @brentsimmons Nick Bradbury @nbradbury Brian Reischl @brianreischl Nick Harris @nick_harris @SepiaLabs @Glassboard
  • 2. Introductions Brent Simmons: NetNewsWire and Mars Edit Nick Bradbury: HomeSite, TopStyle, FeedDemon. Brian Reischl: 5+ years at NewsGator Nick Harris: 5+ years at NewsGator
  • 3. Glassboard - Private Group Messaging - Available on iOS, Android and WP7
  • 4. History - Idea formally born in December 2010 - Development began in January 2011 - First beta in mid-May - Second beta in July - Initial Release August 2011
  • 5. Platform Details - Built on Microsoft Windows Azure - Both WebRoles and Worker Roles - Table, Queue and Blob Storage - SQL Azure for diagnostic data
  • 6. Initial API Design - REST Implementation - JSON body content when possible - Multi-part Form otherwise
  • 7. Why REST? - Main idea of REST is uniquely addressable objects - Easier for client developers to understand - Supported with basic frameworks on any platform - Encourages more universal architecture decisions
  • 8. REST API Examples: Boards GET /api/boards gets the boards for a user POST /api/boards creates a new board with the information supplied in the JSON body GET /api/boards/{board_id}/statuses gets the latest statuses for the board GET /api/boards/{board_id}/statuses/{status_id}/comments gets the latest comments for the status
  • 9. Why REST cont... - HTTP Status Codes - Additional HTTP Headers POST /api/boards/ RESPONSE: Status Code: 409 Conflict X-GlassboardPlatform-Exception-Code: 200002 **Error code 200002: A board with this name already exists for this chairman
  • 10. Why JSON? - Smaller “on the wire” footprint
  • 11. JSON Example { "AttachmentHasThumbnail":true, "AttachmentId":"XXX-XXXX-XXXX-XXX", "AttachmentType":0, "AuthorId":"XXX-XXXX-XXXX-XXX", "BoardId":"XXX-XXXX-XXXX-XXX", "CommentCount":0, "LikeCount":0, "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”], "Link":"http://www.link.com", "Location":"+12345 -12345", "PubDate":"01/01/1001", "Status":"Hello World", "StatusId":"XXX-XXXX-XXXX-XXX", "Updated":"XXX-XXXX-XXXX-XXX" }
  • 12. XML Output <StatusInfo> <AttachmentHasThumbnail>true</AttachmentHasThumbnail> <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId> <AttachmentType>NONE</AttachmentType> <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId> <BoardId> XXX-XXXX-XXXX-XXX </BoardId> <CommentCount>0</CommentCount> <LikeCount>2</LikeCount> <LikedByUsers> <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> </LikedByUsers> <Link>http://www.link.com</Link> <Location>+12345 -12345</Location> <PubDate>01/01/1001</PubDate> <Status>Hello World</Status> <StatusId>XXX-XXXX-XXXX-XXX </StatusId> <Updated>XXX-XXXX-XXXX-XXX </Updated> </StatusInfo>
  • 13. { <StatusInfo> "AttachmentHasThumbnail":true, <AttachmentHasThumbnail>true</AttachmentHasThumbnail> "AttachmentId":"XXX-XXXX-XXXX-XXX", <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId> "AttachmentType":0, <AttachmentType>NONE</AttachmentType> "AuthorId":"XXX-XXXX-XXXX-XXX", <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId> "BoardId":"XXX-XXXX-XXXX-XXX", <BoardId> XXX-XXXX-XXXX-XXX </BoardId> "CommentCount":0, <CommentCount>0</CommentCount> "LikeCount":0, <LikeCount>2</LikeCount> "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”], <LikedByUsers> "Link":"http://www.link.com", <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> "Location":"+12345 -12345", <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> "PubDate":"01/01/1001", </LikedByUsers> "Status":"Hello World", <Link>http://www.link.com</Link> "StatusId":"XXX-XXXX-XXXX-XXX", <Location>+12345 -12345</Location> "Updated":"XXX-XXXX-XXXX-XXX" <PubDate>01/01/1001</PubDate> } <Status>Hello World</Status> { <StatusId>XXX-XXXX-XXXX-XXX </StatusId> "AttachmentHasThumbnail":true, <Updated>XXX-XXXX-XXXX-XXX </Updated> "AttachmentId":"XXX-XXXX-XXXX-XXX", </StatusInfo> "AttachmentType":0, <StatusInfo> "AuthorId":"XXX-XXXX-XXXX-XXX", <AttachmentHasThumbnail>true</AttachmentHasThumbnail> "BoardId":"XXX-XXXX-XXXX-XXX", <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId> "CommentCount":0, <AttachmentType>NONE</AttachmentType> "LikeCount":0, <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId> "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”], <BoardId> XXX-XXXX-XXXX-XXX </BoardId> "Link":"http://www.link.com", <CommentCount>0</CommentCount> "Location":"+12345 -12345", <LikeCount>2</LikeCount> "PubDate":"01/01/1001", <LikedByUsers> "Status":"Hello World", <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> "StatusId":"XXX-XXXX-XXXX-XXX", <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> "Updated":"XXX-XXXX-XXXX-XXX" </LikedByUsers> } <Link>http://www.link.com</Link> { <Location>+12345 -12345</Location> "AttachmentHasThumbnail":true, <PubDate>01/01/1001</PubDate> "AttachmentId":"XXX-XXXX-XXXX-XXX", <Status>Hello World</Status> "AttachmentType":0, <StatusId>XXX-XXXX-XXXX-XXX </StatusId> "AuthorId":"XXX-XXXX-XXXX-XXX", <Updated>XXX-XXXX-XXXX-XXX </Updated> "BoardId":"XXX-XXXX-XXXX-XXX", </StatusInfo> "CommentCount":0, <StatusInfo> "LikeCount":0, <AttachmentHasThumbnail>true</AttachmentHasThumbnail> "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”], <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId> "Link":"http://www.link.com", <AttachmentType>NONE</AttachmentType> "Location":"+12345 -12345", <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId> "PubDate":"01/01/1001", <BoardId> XXX-XXXX-XXXX-XXX </BoardId> "Status":"Hello World", <CommentCount>0</CommentCount> "StatusId":"XXX-XXXX-XXXX-XXX", <LikeCount>2</LikeCount> "Updated":"XXX-XXXX-XXXX-XXX" <LikedByUsers> } <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> { <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string> "AttachmentHasThumbnail":true, </LikedByUsers> "AttachmentId":"XXX-XXXX-XXXX-XXX", <Link>http://www.link.com</Link> "AttachmentType":0, <Location>+12345 -12345</Location> "AuthorId":"XXX-XXXX-XXXX-XXX", <PubDate>01/01/1001</PubDate> "BoardId":"XXX-XXXX-XXXX-XXX", <Status>Hello World</Status> "CommentCount":0, <StatusId>XXX-XXXX-XXXX-XXX </StatusId> "LikeCount":0, <Updated>XXX-XXXX-XXXX-XXX </Updated> "LikedByUsers":["XXX-XXXX-XXXX-XXX", “XXX-XXXX-XXXX-XXX”], </StatusInfo> "Link":"http://www.link.com", <StatusInfo> "Location":"+12345 -12345", <AttachmentHasThumbnail>true</AttachmentHasThumbnail> "PubDate":"01/01/1001", <AttachmentId> XXX-XXXX-XXXX-XXX </AttachmentId> "Status":"Hello World", <AttachmentType>NONE</AttachmentType> "StatusId":"XXX-XXXX-XXXX-XXX", <AuthorId> XXX-XXXX-XXXX-XXX </AuthorId> "Updated":"XXX-XXXX-XXXX-XXX" <BoardId> XXX-XXXX-XXXX-XXX </BoardId> } <CommentCount>0</CommentCount> <LikeCount>2</LikeCount> <LikedByUsers> <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> XXX-XXXX-XXXX-XXX </string>
  • 14. iOS Client - Built by Brent Simmons
  • 15. Android Client - Build by Nick Bradbury
  • 17. The Problem... - Stringent REST implementations have limitations - Mobile applications have their own limitations Mobile apps need to be not only useable but useful as soon as possible - that means new data...
  • 18. The Newsfeed Solution - Single call to get all new statuses and comments - One out-bound request on startup - Data body just a set of existing JSON objects
  • 19. Platform API Future - More “newsfeed like” REST hybrid calls - Open to 3rd parties?
  • 20. Q&A (with your host @jennyblumberg aka @glassboard aka @sepialabs)

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n