integrating ios applications with backend rest services
play

Integrating iOS Applications with Backend REST Services Monday, - PowerPoint PPT Presentation

Integrating iOS Applications with Backend REST Services Monday, October 4th - JAOO - rhus, Denmark Adrian Kosmaczewski akosma software akosma.com github.com/akosma linkedin.com/in/akosma formspring.me/akosma twitter.com/akosma


  1. Integrating iOS Applications with Backend REST Services Monday, October 4th - JAOO - Århus, Denmark

  2. Adrian Kosmaczewski

  3. akosma software

  4. akosma.com github.com/akosma linkedin.com/in/akosma formspring.me/akosma twitter.com/akosma slideshare.com/akosma

  5. My Software Passion

  6. People

  7. Team members, users, clients, society in general

  8. Software is a process

  9. Software is a social process

  10. One Problem

  11. Several Solutions

  12. Questions

  13. Web Developers?

  14. iOS Developers?

  15. API Designers or Developers?

  16. Server-side Technologies?

  17. 1 The Problem

  18. Database

  19. Many Questions

  20. Formats?

  21. Libraries?

  22. “Best” approaches?

  23. 2 The Solutions

  24. Bad news

  25. Far too many

  26. REST vs SOAP

  27. XML vs JSON

  28. Synchronous vs. Asynchronous

  29. Good News

  30. Introducing iPhoneWebServicesClient

  31. http://github.com/akosma/ iPhoneWebServicesClient

  32. 2 parts

  33. 1 PHP server app

  34. 2 iOS client

  35. Many formats

  36. XML

  37. JSON

  38. (duh)

  39. • XML • SOAP • 8 libraries • Property List • JSON • XML • 2 parsers • Binary • YAML • Protocol Buffers • CSV

  40. Extensible

  41. (add more formats and libraries if you want)

  42. Variable sized dataset

  43. (from 1 to 5000 items per call)

  44. Heterogenous Data Source

  45. (the same data in different formats)

  46. XML Libraries

  47. (lots of them)

  48. 3 Demo

  49. 4 The Tests

  50. • Local • All Combinations • Wifi • Different dataset • 3G sizes each time • EDGE

  51. 5 Results

  52. Easier to implement on the iOS side?

  53. 1. JSON + Property Lists + CSV 2. XML (DOM) + Protocol Buffers 3. XML (SAX) 4. SOAP + YAML

  54. Easier to implement on the PHP side?

  55. 1. JSON + YAML 2. Property List + CSV + XML 3. Protocol Buffers 4. SOAP

  56. Smaller Payload

  57. 1. CSV + Protocol Buffers + Binary Plist 2. JSON + YAML 3. XML 4. SOAP

  58. Fastest Deserialization Speed

  59. 1. Property Lists + TBXML 2. SOAP + libxml (DOM) + Google XML 3. JSON 4. YAML + CSV + APXML

  60. More Portable?

  61. 1. XML + JSON 2. Protocol Buffers + YAML + CSV 3. SOAP 4. Property Lists

  62. More Readable?

  63. 1. JSON + YAML 2. XML + XML Property Lists 3. Protocol Buffers 4. Binary Property Lists

  64. Less Memory Consumption?

  65. 1. Binary Property List + Protocol Buffers 2. CSV + JSON + TBXML 3. XML 4. SOAP + APXML

  66. Some raw, deeply flawed comparisons?

  67. • Binary Plists are 3 to 4 times faster to deserialize than JSON • iPod touch 2nd Gen is ~25% faster than iPhone 3G • iPhone 4 is ~300% faster than iPhone 3G • JSON is 45% of its equivalent XML plist • Binary plist is 35% of its equivalent XML plist

  68. The “Best”?

  69. 1. JSON + Property Lists 2. TBXML + Protocol Buffers 3. Other XML parsers + CSV 4. YAML + SOAP + APXML

  70. 6 Next Steps

  71. Test with other server-side technologies

  72. (J2EE, ASP.NET, Ruby on Rails, Django...)

  73. Test with other Cocoa networking libraries

  74. • AsyncSocket http://akos.ma/0x37v • IP*Works! for Mac OS X http://www.nsoftware.com/portal/macos/ • OmniNetworking http://akos.ma/0q • ThoMoNetworking http://hci.rwth-aachen.de/thomonet • ConnectionKit http://github.com/karelia/ConnectionKit/

  75. Test with other serialization systems

  76. • MessagePack http://msgpack.org/ • Apache Thrift http://incubator.apache.org/thrift/ • BERT http://bert-rpc.org/ • Apache Avro http://avro.apache.org/ • ONC RPC aka Sun RPC Open Network Computing Remote http://akos.ma/va Procedure Call

  77. Test with different data sets

  78. (sport results, weather, financial data, hyerarchical data, binary data, etc...)

  79. Thanks!

  80. Questions?

  81. These slides are released under a Creative Commons Attribution-No Derivative Works 3.0 Unported License http://creativecommons.org/licenses/by-nd/3.0/

Recommend


More recommend