SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
Building Client/Server
Applications for iOS
Joe Goullaud
joe@raizlabs.com
ADN/Twitter: @jgoullaud
Example iOS App
http://github.com/joe-goullaud/Github-iOS
Don’t forget to grab the submodules:
$> git submodule update --init --recursive
Overview
• How to Leverage Web Services inYour App
• iOS Patterns Overview
• Example App
• Mobile API Best Practices
Leveraging Web Services
Leveraging Web Services
• Content
• Images
• Video
• Documents
• Communication
• Text
• Voice
• Video
• Synchronization
• Game Play
• Document Collaboration
• Data
• Sharing
• Facebook
• Twitter
iOS Client Applications
• Common Patterns
• MVC(S) - Model-View-Controller-(Store)
• Delegation
• Callback/Completion Blocks (Closures)
UIViewController
UIViewModel
Store
UIViewController UITableView
tableView:cellForRowAtIndexPath:
UITableViewCell
tableView:heightForRowAtIndexPath:
44
tableView:didSelectRowAtIndexPath:
Main Thread Background Thread
Network Request
Data Import
Network Completion
Import Completion
Update UI
User Action
DEMO
Mobile API Best Practices
Mobile API Goals
• Reduce Network Calls
• Small Responses with Just Enough Data
• Secure
Caching
• Cache-Control Headers
• Set no-cache and max-age as appropriate
• Set to no-cache on Errors
• Images
• GET and HEAD request headers
• Content-Length
• Content-Type
• Last-Modified
JSON
• Compact
• Low memory footprint
• 2x faster to parse than XML
• Easier to create on device
• Smaller Request Bodies
REST-like
• Resource Endpoints
• Plural Endpoints should return object summaries
• Single Resource Endpoints return full object
• Can return object summaries of related objects
• Action Endpoints
• Perform complex service actions atomically
Security
• HTTPS
• No secure data in URL Query
• OAuth 2
• Token-based
• Authorization Headers
• HMAC for request authentication
Questions?
Joe Goullaud
joe@raizlabs.com
ADN/Twitter: @jgoullaud
Building Client-Server Apps for iOS

Mais conteúdo relacionado

Destaque

ломоносов регламент гимн.1 нач. воротько
ломоносов регламент гимн.1 нач. воротьколомоносов регламент гимн.1 нач. воротько
ломоносов регламент гимн.1 нач. воротькоJopo4ka
 
Tietojenkäsittely
TietojenkäsittelyTietojenkäsittely
TietojenkäsittelyIT-LAMK
 
Lacerte Helpful Resources
Lacerte Helpful ResourcesLacerte Helpful Resources
Lacerte Helpful Resourcesintuitaccts
 
How i built up my magazine front cover
How i built up my magazine front coverHow i built up my magazine front cover
How i built up my magazine front coverNancy Halladay
 
Target Audience survey analysis
Target Audience survey analysisTarget Audience survey analysis
Target Audience survey analysisNancy Halladay
 
4 h livestock record app presentation netc 05-20-2014
4 h livestock record app presentation netc 05-20-20144 h livestock record app presentation netc 05-20-2014
4 h livestock record app presentation netc 05-20-2014learjk
 
11 12 1_равновесие_is-lm
11 12 1_равновесие_is-lm11 12 1_равновесие_is-lm
11 12 1_равновесие_is-lmAnna_Sergeevna
 
How i built up my double page spread
How i built up my double page spreadHow i built up my double page spread
How i built up my double page spreadNancy Halladay
 
Smart phone apps for agriculture
Smart phone apps for agricultureSmart phone apps for agriculture
Smart phone apps for agriculturelearjk
 

Destaque (16)

48489
4848948489
48489
 
ломоносов регламент гимн.1 нач. воротько
ломоносов регламент гимн.1 нач. воротьколомоносов регламент гимн.1 нач. воротько
ломоносов регламент гимн.1 нач. воротько
 
Tietojenkäsittely
TietojenkäsittelyTietojenkäsittely
Tietojenkäsittely
 
Lacerte Helpful Resources
Lacerte Helpful ResourcesLacerte Helpful Resources
Lacerte Helpful Resources
 
Prepositions
PrepositionsPrepositions
Prepositions
 
How i built up my magazine front cover
How i built up my magazine front coverHow i built up my magazine front cover
How i built up my magazine front cover
 
Controlling
ControllingControlling
Controlling
 
Target Audience survey analysis
Target Audience survey analysisTarget Audience survey analysis
Target Audience survey analysis
 
4 h livestock record app presentation netc 05-20-2014
4 h livestock record app presentation netc 05-20-20144 h livestock record app presentation netc 05-20-2014
4 h livestock record app presentation netc 05-20-2014
 
Nama murid
Nama muridNama murid
Nama murid
 
Rosina it
Rosina itRosina it
Rosina it
 
SISTEMA SD
SISTEMA SDSISTEMA SD
SISTEMA SD
 
11 12 1_равновесие_is-lm
11 12 1_равновесие_is-lm11 12 1_равновесие_is-lm
11 12 1_равновесие_is-lm
 
كيف تسللت الليبرالية إلى العالم الإسلامي ؟
كيف تسللت الليبرالية إلى العالم الإسلامي ؟كيف تسللت الليبرالية إلى العالم الإسلامي ؟
كيف تسللت الليبرالية إلى العالم الإسلامي ؟
 
How i built up my double page spread
How i built up my double page spreadHow i built up my double page spread
How i built up my double page spread
 
Smart phone apps for agriculture
Smart phone apps for agricultureSmart phone apps for agriculture
Smart phone apps for agriculture
 

Último

WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...ScyllaDB
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideStefan Dietze
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...ScyllaDB
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 

Último (20)

WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The InsideCollecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
Collecting & Temporal Analysis of Behavioral Web Data - Tales From The Inside
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 

Building Client-Server Apps for iOS