Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

End-to-end Mobile App Development (with iOS and Azure Mobile Services)

2,598 views

Published on

The deck I presented on a technical sharing session at codeMeetUp() weekly meet-up, organized by ProCodeCG, Bandung. The attendees are all coders, senior ones among them. DyCode Education represented by me is very excited and such an honor to be able to deliver the sharing on this meet-up.

Soure code I used for live coding: https://github.com/andriyadi/iOS-Zumo-Sample

Published in: Mobile
  • Be the first to comment

End-to-end Mobile App Development (with iOS and Azure Mobile Services)

  1. 1. End-to-end Mobile App Development @andri_yadi | http://andriyadi.com codeMeetUp() - March 16, 2015
  2. 2. about me
  3. 3. CEO of
  4. 4. Co-founder of http://jepret.in
  5. 5. 7 years in a row
  6. 6. start up companies for 11 years 15 years in software development
  7. 7. I assume you’re all coders :) Disclaimer
  8. 8. Develop end-to-end (server-driven) mobile app?
  9. 9. develop the backend 1st you’ll do
  10. 10. a backend needs Typically Storage Auth Logic Push
  11. 11. Typical Steps We’ll Take Purchase a physical server or a VM Install OS, Web Server, DB Server Install & configure server-side scripting/runtime (PHP, Node.js, Python, .NET, Java) 
 …and other fine tuning for performance, security …1 - 2 days later, your server infra is up Develop web API, authentication, push notification Backend
  12. 12. Typical Steps We’ll Take 1 - 2 weeks later, you have a mobile backend and accessible API Congratulation Backend
  13. 13. Typical Steps We’ll Take Prepare mobile project & integrate libraries: async HTTP client, JSON parser Develop web API 2 - 3 days later, you’re ready to access the API Frontend
  14. 14. 3 - 4 weeks later, you’re ready to develop your mobile app features :) which is OK, if you’re doing it for fun!
  15. 15. OR…
  16. 16. DB & Storage Authentication Logic Push API Wrapper Mobile Backend as a Service Leverage BaaS
  17. 17. Mobile Services Microsoft Azure Mobile Services a lot of BaaS providers Turn out…
  18. 18. Microsoft Azure Mobile Services
  19. 19. So, what is it? Storage Authentication Logic Push Scheduler
  20. 20. Mobile Services Demo Deploy for less than 5 minutes
  21. 21. Mobile Services Accessing from iOS
  22. 22. iOSDevelopment stuffs allow me talk a bit…
  23. 23. iOS
  24. 24. Objective-C
 Since 2008
  25. 25. Introducing Swift… Since June 2, 2014
  26. 26. Not this one… Note, I’m a fan :)
  27. 27. A new programming language for iOS and OSX
  28. 28. adding WindowsAzureMobileServices.framework to your project + as easy as…
  29. 29. Typical Steps We’ll Take Prepare mobile project & integrate libraries: async HTTP client, JSON parser Develop web API 2 - 3 days later, you’re ready to access the API Frontend
  30. 30. Mobile Services Demo Let’s do it! from iOS for less than 5 minutes
  31. 31. Adding
 Authentication
  32. 32. //client is instance of MSClient //assumed to sign-in with Twitter
 client?.loginWithProvider("twitter", controller:self, animated:true) { //trailing closure for completion handler (user, error) -> Void in if user != nil { //do something about it! } } as easy as adding this code on iOS side
  33. 33. Mobile Services Demo add Auth to for iOS for less than 5 minutes
  34. 34. azure mobile preview enable YOUR_MOBILE_SERVICE_NAME Users Opt-in for Users feature Getting expanded data of signed in user, via call to 
 user.getIdentities() Install Azure-CLI
 Type command:
  35. 35. Adding
 Server-side logic
  36. 36. The case Let’s say, upon successful sign-in (on client side), I want to register signed-in users to a table
  37. 37. Adding server-side logic On “Insert” operation of User table, add this script: function insert(item, user, request) { var usersTable = tables.getTable('User'); usersTable.where({ userId: user.userId, }).read({ success: function(results) { if (results.length == 0) { insertNewUser(usersTable, user); } else { console.log('User exists'); request.respond(statusCodes.OK, results[0]); } } }); }
  38. 38. Cont… function insertNewUser(theUserTable, theUser) { theUser.getIdentities({ success: function (identities) { if (identities.twitter) { var newUser = { userId: theUser.userId}; if (identities.twitter.screen_name) { newUser.username = identities.twitter.screen_name; } theUserTable.insert(newUser, { success: function(newItem) { request.respond(statusCodes.OK, newItem); } }); } else { console.log('Identities is not retrieved'); request.respond(); } } }); }
  39. 39. On client-side Add this Swift code upon successful sign-in: let userTable = client?.tableWithName("User") userTable?.insert(["userId": user.userId]){ (item, error) in if let err = error { println("Error: " + err.description) } }
  40. 40. Mobile Services Demo adding server-script
  41. 41. More Advance Use-Case & customisation…? Contact office@dycode.com :)
  42. 42. Notes on the Microsoft Azure Platform Infrastructure as a Service IaaS Platform as a Service PaaS
  43. 43. Get started Visit azure.com Free trial! worth $200
  44. 44. Craving to know more about 
 iOS development? Let’s join upcoming iOS 8 development class - with Swift http://edu.dycode.co.id
  45. 45. QA
  46. 46. a leading mobile & web apps developer, an educator, an early adopter, an award-winning company
  47. 47. DyCode www.dycode.com @dycode

×