Your SlideShare is downloading. ×
Building Client-Server Apps for iOS
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Building Client-Server Apps for iOS

419

Published on

One of the most powerful aspects of mobile computing is the always-on connectivity of our modern devices. Looking at the App Store today, you would be hard pressed to find an app that doesn't use a …

One of the most powerful aspects of mobile computing is the always-on connectivity of our modern devices. Looking at the App Store today, you would be hard pressed to find an app that doesn't use a web service to some degree.

Whether it's to stream videos and music, share photos, receive notifications, or sync documents and data, web services are an essential part of most mobile applications. This session will examine the best practices for building networked apps and APIs by building a small, networked iOS app.

You'll learn:
- When and how to leverage web services in a mobile application
- How to building the client networking code, including caching and secure storage for credentials/tokens
- Best practices for building mobile web service APIs

Be sure to grab the Example App from http://github.com/joe-goullaud/Github-iOS

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
419
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
12
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Building Client/Server Applications for iOS Joe Goullaud joe@raizlabs.com ADN/Twitter: @jgoullaud
  • 2. Example iOS App http://github.com/joe-goullaud/Github-iOS Don’t forget to grab the submodules: $> git submodule update --init --recursive
  • 3. Overview • How to Leverage Web Services inYour App • iOS Patterns Overview • Example App • Mobile API Best Practices
  • 4. Leveraging Web Services
  • 5. Leveraging Web Services • Content • Images • Video • Documents • Communication • Text • Voice • Video • Synchronization • Game Play • Document Collaboration • Data • Sharing • Facebook • Twitter
  • 6. iOS Client Applications • Common Patterns • MVC(S) - Model-View-Controller-(Store) • Delegation • Callback/Completion Blocks (Closures)
  • 7. UIViewController UIViewModel Store
  • 8. UIViewController UITableView tableView:cellForRowAtIndexPath: UITableViewCell tableView:heightForRowAtIndexPath: 44 tableView:didSelectRowAtIndexPath:
  • 9. Main Thread Background Thread Network Request Data Import Network Completion Import Completion Update UI User Action
  • 10. DEMO
  • 11. Mobile API Best Practices
  • 12. Mobile API Goals • Reduce Network Calls • Small Responses with Just Enough Data • Secure
  • 13. 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
  • 14. JSON • Compact • Low memory footprint • 2x faster to parse than XML • Easier to create on device • Smaller Request Bodies
  • 15. 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
  • 16. Security • HTTPS • No secure data in URL Query • OAuth 2 • Token-based • Authorization Headers • HMAC for request authentication
  • 17. Questions? Joe Goullaud joe@raizlabs.com ADN/Twitter: @jgoullaud

×