Mekwa from the web to the iphone

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Mekwa from the web to the iphone - Presentation Transcript

    1. mekwa from the web to the iPhone @bncoelho
    2. wtf is mekwa?
    3. • a social network • designed to meet new people • flirting and dating
    4. • http://www.youtube.com/watch?v=5Fbiu0FUoSk designed to meet new people
    5. • http://www.youtube.com/watch?v=PpLOud6OplQ can be used for flirting and dating
    6. how does it work?
    7. • create a mekwa • tell it your wishes • you set off fulfilling other peoples wishes • you feel good and meet new people
    8. fulfill wishes?
    9. • choose a desire to fulfill (ex: sushi on the beach) • take a bunch of pictures and text • create an entry • the owner of the mekwa decides if the wish was fulfilled
    10. why the iPhone?
    11. • mobile was an original goal for the mekwa project • it was a good tech showcase • could play a bit further with localization • we all had iPhones
    12. goals on the iphone
    13. • fulfill desires on the go • check other mekwas around me
    14. what we needed • to know the current location • to create an entry(pictures + text) • search for new wishes
    15. everybody is doing it how hard can it be?
    16. really hard... at least for us...
    17. our background
    18. • web developers • no mobile experience • no objective-c or cocoa experience • nda just had been lifted, barely no documentation
    19. • application was ambitious • maps, camera, network, website integration • and... we had a month and a half to do it
    20. how we did it...
    21. mekwa api
    22. • rails is api friendly • used xml as a hash bag • geokit made location aware functionality easy
    23. what? no xml?
    24. • no easy way to parse an xml document • we’re used to see objects as bags of properties
    25. libxml2 + custom wrapper
    26. • we used libxml2 to parse xml • built a wrapper to build diccionaries from api responses
    27. uploading stuff
    28. • really low level • ended up building http requests by hand in order to add image data to the requests body
    29. maps?
    30. • there is no maps api in the sdk • we thought about abandoning feature
    31. open source to the rescue...
    32. • we found route-me project • support for MS VirtualEarth and OpenStreetMap • caches tiles on sqlite • supports the drawing of custom markers
    33. user interface
    34. • table views are very versatile • gets you up and running very quickly • however...
    35. ...they are a pain to customize
    36. • it’s not just drag’n’drop • a designer can’t do it • you have to code it • we ended up pixel managing • took a lot of work/time to make them look nice
    37. and was slow as a snail... ...but it was our fault
    38. • cells are redrawn on demand • images were being downloaded multiple times • scrolling was not smooth • our answer was...
    39. pre-load cache
    40. • before loading each view we prefetched the images needed. • made loading a bit slower • but scrolling was smooth • at this point we didn’t have much time • solution was a compromise
    41. we had made it... ...barely
    42. • at the end of our deadline we could: • browse and accept entries • search for wishes to fulfill • create entries • see other mekwas near us
    43. it was an acceptable prototype
    44. ...but still had its share of problems...
    45. • crashed on a semi-regular basis (and that’s being gentle...) • it was still slow...
    46. ...next steps ... improving for the AppStore
    47. • the prototype was made in a collective programming spree • everything kinda worked but it was a glorious mess
    48. • the iphone has no garbage collector • memory leaks are everywhere, releases were missing • iphone OS is merciless, it warns you the first time and then it kicks you out • crash!boom!bang!
    49. memory leaks...
    50. • objective-c memory model is based on a reference counter • alloc incs one • release decs one • on zero the object is deleted • it’s pretty straight forward...
    51. ...as long as you know who owns object ...it was two very frustrating weeks...
    52. app was stable enough... ... except when taking pictures
    53. UIImagePickerController is a memory hog...
    54. check out the memory spikes 6mb each
    55. • every time a picture was snapped, the memory usage had a 6mb spike • adding that to the lack of releases, three pictures and the app was kicked out • so be careful how you use it • our solution involved using a singleton instance of the image picker controller
    56. as data grew... prefetching was revealing itself painfully slow...
    57. • technical debt caught us pretty fast • we were showing 10 entries, each could have 4 pictures • wait for 40 pictures to download • 1 minute until the app is usable • it made you think the app was dead
    58. ... use an activity indicator ...to show you app is not dead
    59. how do you show an activity indicator on the iphone? hint: it’s not an animated gif...
    60. ...background threads that’s how you do it...
    61. • it had never occurred to us to use threads on the iphone • sending time consuming tasks to a background thread keeps the UI responsive • every desktop software developer knows that...
    62. ... we had been stuck in a webapp mindset for so long...
    63. ...we didn’t realize the iphone was a different beast...
    64. • we used background threads to load all images as they were needed • and after some synchronization issues resolved • we had just had turbocharged our app
    65. and it felt good... you can find it in the app store
    66. ...lessons learned ...almost all of them the hard way
    67. • iphone apps are similar to desktop apps • but with memory capabilities from 10 years ago • design is hard, not just drag and drop, you have to code it • threads speed up you app
    68. • UIImagePickerController is a memory hog • there was no maps api used route-me • networking is really low level • xml parsing is really low level
    69. • http://www.youtube.com/watch?v=GjyKWiwTRxY
    70. shameless plug ...so if you need an iphone app don’t hesitate, contact us at www.rupeal.com
    71. interesting references
    72. • www.mekwa.com • http://code.google.com/p/route-me/ • http://blog.airsource.co.uk/index.php/2008/11/12/memory-usage-in- uiimagepickercontroller/ • http://joehewitt.com/post/the-three20-project/ • http://stackoverflow.com/questions/441345/does-uiactivityindicator-require- manual-threading-on-iphone • http://www.hackdiary.com/2009/01/26/switching-from-scripting-languages-to- objective-c-and-iphone-useful-libraries/
    73. • http://www.youtube.com/watch?v=GjyKWiwTRxY • http://www.youtube.com/watch?v=5Fbiu0FUoSk • http://www.youtube.com/watch?v=PpLOud6OplQ
    74. ???
    SlideShare Zeitgeist 2009

    + guestf0346bguestf0346b Nominate

    custom

    476 views, 0 favs, 0 embeds more stats

    Apresentação feita no barcamppt em Coimbra sobre more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 476
      • 476 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 8
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories