SlideShare a Scribd company logo
mekwa
    from the web to the iPhone




                                 @bncoelho
wtf is mekwa?
• a social network
• designed to meet new people
• flirting and dating
•   http://www.youtube.com/watch?v=5Fbiu0FUoSk




designed to meet new people
•   http://www.youtube.com/watch?v=PpLOud6OplQ




can be used for flirting and dating
how does it work?
• create a mekwa
• tell it your wishes
• you set off fulfilling other peoples wishes
• you feel good and meet new people
fulfill wishes?
• 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
why the iPhone?
• 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
goals on the iphone
• fulfill desires on the go
• check other mekwas around me
what we needed

• to know the current location
• to create an entry(pictures + text)
• search for new wishes
everybody is doing it
 how hard can it be?
really hard...
  at least for us...
our background
• web developers
• no mobile experience
• no objective-c or cocoa experience
• nda just had been lifted, barely no
  documentation
• application was ambitious
• maps, camera, network, website integration
• and... we had a month and a half to do it
how we did it...
mekwa api
• rails is api friendly
• used xml as a hash bag
• geokit made location aware functionality
  easy
what? no xml?
• no easy way to parse an xml document
• we’re used to see objects as bags of
  properties
libxml2 + custom wrapper
• we used libxml2 to parse xml
• built a wrapper to build diccionaries from
  api responses
uploading stuff
• really low level
• ended up building http requests by hand in
  order to add image data to the requests
  body
maps?
• there is no maps api in the sdk
• we thought about abandoning feature
open source
        to the rescue...
• we found route-me project
• support for MS VirtualEarth and
  OpenStreetMap
• caches tiles on sqlite
• supports the drawing of custom markers
user interface
• table views are very versatile
• gets you up and running very quickly
• however...
...they are a pain to
      customize
•   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
and was slow as a snail...
            ...but it was our fault
• cells are redrawn on demand
• images were being downloaded multiple
  times

• scrolling was not smooth
• our answer was...
pre-load cache
• 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
we had made it...
      ...barely
• at the end of our deadline we could:
 • browse and accept entries
 • search for wishes to fulfill
 • create entries
 • see other mekwas near us
it was an acceptable
     prototype
...but still had its share
     of problems...
• crashed on a semi-regular basis (and that’s
   being gentle...)

• it was still slow...
...next steps
      ... improving for the AppStore
• the prototype was made in a collective
  programming spree

• everything kinda worked but it was a
  glorious mess
• 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!
memory leaks...
• 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...
...as long as you know
    who owns object
     ...it was two very frustrating weeks...
app was stable enough...
           ... except when taking pictures
UIImagePickerController
             is a memory hog...
check out the memory spikes
         6mb each
• 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
as data grew...
   prefetching was revealing itself painfully slow...
• 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
... use an activity indicator
               ...to show you app is not dead
how do you show an activity
  indicator on the iphone?
            hint: it’s not an animated gif...
...background threads
          that’s how you do it...
• 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...
... we had been stuck
       in a webapp mindset for so long...
...we didn’t realize
       the iphone was a different beast...
• 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
and it felt good...
      you can find it in the app store
...lessons learned
        ...almost all of them the hard way
• 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
• UIImagePickerController is a memory hog
• there was no maps api used route-me
• networking is really low level
• xml parsing is really low level
•   http://www.youtube.com/watch?v=GjyKWiwTRxY
shameless plug

     ...so if you need an
          iphone app


                 don’t hesitate, contact us at www.rupeal.com
interesting references
•   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/
•   http://www.youtube.com/watch?v=GjyKWiwTRxY


•   http://www.youtube.com/watch?v=5Fbiu0FUoSk


•   http://www.youtube.com/watch?v=PpLOud6OplQ
???

More Related Content

Similar to Mekwa from the web to the iphone

CSC 395 - Bebop.me
CSC 395 - Bebop.meCSC 395 - Bebop.me
CSC 395 - Bebop.me
Frances Coronel
 
Mosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice CalcMosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice Calc
imacat .
 
Question 6
Question 6Question 6
Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.
Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.
Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.
SANTIAGO PABLO ALBERTO
 
Planning and designing a mashup
Planning and designing a mashupPlanning and designing a mashup
Planning and designing a mashup
Morten Just Petersen
 
Test
TestTest
FormulaPi Programming Challenge Autonomous Cars
FormulaPi Programming Challenge Autonomous CarsFormulaPi Programming Challenge Autonomous Cars
FormulaPi Programming Challenge Autonomous Cars
Thomas Effing
 
Optimize Your Mac Life
Optimize Your Mac LifeOptimize Your Mac Life
Optimize Your Mac Life
jbischke
 
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Notice Me, Senpai! Get Discovered with Creative Technical Content
Notice Me, Senpai! Get Discovered with Creative Technical ContentNotice Me, Senpai! Get Discovered with Creative Technical Content
Notice Me, Senpai! Get Discovered with Creative Technical Content
Tomomi Imura
 
Going mobile - tip, tricks and tools for building mobile web-apps
Going mobile - tip, tricks and tools for building mobile web-appsGoing mobile - tip, tricks and tools for building mobile web-apps
Going mobile - tip, tricks and tools for building mobile web-apps
Joshua May
 
Evaluation Technologies
Evaluation TechnologiesEvaluation Technologies
Evaluation Technologies
alicerose1994
 
Appium Native Application Crawler
Appium Native Application CrawlerAppium Native Application Crawler
Appium Native Application Crawler
Justin Ison
 
Multimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice CalcMultimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice Calc
imacat .
 
Brucewang
BrucewangBrucewang
Brucewang
Bruce Wang
 
iMyCom:Tripping along iOS development of Langauge Communication tool
iMyCom:Tripping along iOS development of Langauge Communication tooliMyCom:Tripping along iOS development of Langauge Communication tool
iMyCom:Tripping along iOS development of Langauge Communication tool
Vijaya Prakash Kandel
 
Retooling the world wide web for its original purpose
Retooling the world wide web for its original purposeRetooling the world wide web for its original purpose
Retooling the world wide web for its original purpose
singingfish
 
Real world software launch
Real world software launchReal world software launch
Real world software launch
Kunal Johar
 
Evaluation question 4 final
Evaluation question 4 finalEvaluation question 4 final
Evaluation question 4 final
willwright50
 
A mac baker's dozen
A mac baker's dozenA mac baker's dozen
A mac baker's dozen
Adrian Nixon
 

Similar to Mekwa from the web to the iphone (20)

CSC 395 - Bebop.me
CSC 395 - Bebop.meCSC 395 - Bebop.me
CSC 395 - Bebop.me
 
Mosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice CalcMosaic Fun with OpenOffice Calc
Mosaic Fun with OpenOffice Calc
 
Question 6
Question 6Question 6
Question 6
 
Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.
Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.
Raspberry pi: Aprende raspberry pi con Linux por peter membrey y david hows.
 
Planning and designing a mashup
Planning and designing a mashupPlanning and designing a mashup
Planning and designing a mashup
 
Test
TestTest
Test
 
FormulaPi Programming Challenge Autonomous Cars
FormulaPi Programming Challenge Autonomous CarsFormulaPi Programming Challenge Autonomous Cars
FormulaPi Programming Challenge Autonomous Cars
 
Optimize Your Mac Life
Optimize Your Mac LifeOptimize Your Mac Life
Optimize Your Mac Life
 
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
JavaCro'14 - Can You Tell Me How to Get to Sesame Street I wanna be a Grails ...
 
Notice Me, Senpai! Get Discovered with Creative Technical Content
Notice Me, Senpai! Get Discovered with Creative Technical ContentNotice Me, Senpai! Get Discovered with Creative Technical Content
Notice Me, Senpai! Get Discovered with Creative Technical Content
 
Going mobile - tip, tricks and tools for building mobile web-apps
Going mobile - tip, tricks and tools for building mobile web-appsGoing mobile - tip, tricks and tools for building mobile web-apps
Going mobile - tip, tricks and tools for building mobile web-apps
 
Evaluation Technologies
Evaluation TechnologiesEvaluation Technologies
Evaluation Technologies
 
Appium Native Application Crawler
Appium Native Application CrawlerAppium Native Application Crawler
Appium Native Application Crawler
 
Multimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice CalcMultimedia Fun with OpenOffice Calc
Multimedia Fun with OpenOffice Calc
 
Brucewang
BrucewangBrucewang
Brucewang
 
iMyCom:Tripping along iOS development of Langauge Communication tool
iMyCom:Tripping along iOS development of Langauge Communication tooliMyCom:Tripping along iOS development of Langauge Communication tool
iMyCom:Tripping along iOS development of Langauge Communication tool
 
Retooling the world wide web for its original purpose
Retooling the world wide web for its original purposeRetooling the world wide web for its original purpose
Retooling the world wide web for its original purpose
 
Real world software launch
Real world software launchReal world software launch
Real world software launch
 
Evaluation question 4 final
Evaluation question 4 finalEvaluation question 4 final
Evaluation question 4 final
 
A mac baker's dozen
A mac baker's dozenA mac baker's dozen
A mac baker's dozen
 

Recently uploaded

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 

Recently uploaded (20)

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 

Mekwa from the web to the iphone

  • 1. mekwa from the web to the iPhone @bncoelho
  • 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
  • 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
  • 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...
  • 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...
  • 22. • rails is api friendly • used xml as a hash bag • geokit made location aware functionality easy
  • 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
  • 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
  • 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...
  • 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!
  • 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
  • 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. ???