SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Code and Slides:
                         http://thillerson.googlecode.com

                     iPhone Persistence           Tony Hillerson
                     For Mere Mortals             Software Architect




Tuesday, March 3, 2009
Persistence

                                  Code and Slides:
                         http://thillerson.googlecode.com




Tuesday, March 3, 2009
Persistence

                                  Code and Slides:
                         http://thillerson.googlecode.com


                           ... or it means saving stuff.




Tuesday, March 3, 2009
Persistence: Disclaimer

                                  Code and Slides:
                         http://thillerson.googlecode.com


                           BTW: I’m a n00b




Tuesday, March 3, 2009
Code and Slides:
                         http://thillerson.googlecode.com

      Persistence: Savin’ stuff on ur fone
      Your options




Tuesday, March 3, 2009
Persistence: Options

                                  Code and Slides:
                         http://thillerson.googlecode.com
                           Settings
                           SQLite
                           Filesystem
                           The Internets




Tuesday, March 3, 2009
Persistence: Options

                                  Code and Slides:
                         http://thillerson.googlecode.com
                           Settings
                           SQLite
                           Filesystem
                           The Internets




Tuesday, March 3, 2009
Persistence: Our Sweet App

                                  Code and Slides:
                         http://thillerson.googlecode.com




Tuesday, March 3, 2009
Persistence: Sweet Codes
  http://github.com/thillerson/grocery_getter/
                  Code and Slides:
         http://thillerson.googlecode.com
                         Download




Tuesday, March 3, 2009
Code and Slides:
                         http://thillerson.googlecode.com

      Persistence: Settings
      Yours or Apple’s?




Tuesday, March 3, 2009
Persistence: Settings

                                  Code and Slides:
                         http://thillerson.googlecode.com


                           Apple’s => Settings.bundle
                           Yours => Roll your own
                           Both end up in
                           NSUserDefaults


Tuesday, March 3, 2009
Persistence: Settings

                                  Code and Slides:
                         http://thillerson.googlecode.com
                         Can be one of:
                         NSData, NSString,
                         NSNumber, NSDate,
                         NSArray, or NSDictionary




Tuesday, March 3, 2009
Persistence: Settings

                             Code and Slides:
                    http://thillerson.googlecode.com
                  NSUserDefaults *settings =
                    [NSUserDefaults standardUserDefaults];
                  [settings setBool:YES
                    forKey:@quot;shouldSortAfterCompletequot;];
                         [NSUserDefaults standardUserDefaults];


                  [NSUserDefaults resetStandardUserDefaults];
                  BOOL on =
                    [settings
                    boolForKey:@quot;shouldSortAfterCompletequot;];




Tuesday, March 3, 2009
Code and Slides:
                         http://thillerson.googlecode.com

      Persistence: SQLite
      It’s small, but it’s feisty!




Tuesday, March 3, 2009
Persistence: SQLite

                                  Code and Slides:
                         http://thillerson.googlecode.com




            YO DAWG I HERD YOU
            LIEK DATA...
Tuesday, March 3, 2009
Persistence: SQLite

                                  Code and Slides:
                         http://thillerson.googlecode.com

                         SQLite - Embedded Relational
                         Database written in C




Tuesday, March 3, 2009
Persistence: SQLite

                                  Code and Slides:
                         http://thillerson.googlecode.com
                         Embedded Relational Database


                         written in C

Tuesday, March 3, 2009
SQLite:
                                  Code and Slides:
                                                      Hic Draconae
                         http://thillerson.googlecode.com
                                                          Sunt




                         CocoaTouch:
                         Terra Firma


Tuesday, March 3, 2009
Persistence: SQLite

                                  Code and Slides:
                         http://thillerson.googlecode.com
                         3 Takes on our Sweet App:
                         • SQLite C API
                         • fmdb + fmdb-migration-
                           manager
                         • Aptiva’s ActiveRecord


Tuesday, March 3, 2009
Persistence: SQLite

                                  Code and Slides:
                         http://thillerson.googlecode.com
                         SQL C API:
                         http://www.sqlite.org/c3ref/
                         funclist.html




Tuesday, March 3, 2009
Persistence: SQLite

                    Code and Slides:
       • fmdb - Thin Wrapper around SQLite
           http://thillerson.googlecode.com
       • fmdb-migration-manager - Rails-style
            migrations using fmdb

       • http://code.google.com/p/ ycode/
       • http://github.com/mocra/fmdb-
            migration-manager/


Tuesday, March 3, 2009
Persistence: SQLite

                                  Code and Slides:
                          • Aptiva’s ActiveRecord
                         http://thillerson.googlecode.com
           In software engineering, the active record pattern is a design
           pattern frequently found in software that stores its data in
           relational databases. It was named by Martin Fowler in his book
           Patterns of Enterprise Application Architecture.
           - http://en.wikipedia.org/wiki/Active_record_pattern

                         http://github.com/aptiva/
                         activerecord/

Tuesday, March 3, 2009
Persistence: SQLite

                                  Code and Slides:
                         http://thillerson.googlecode.com


                           Quick! To the CODES!




Tuesday, March 3, 2009
Code and Slides:
                         http://thillerson.googlecode.com

      Persistence: A Few Points
      Take two, they’re small!




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com

                           Consider how your
                           settings will be used




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com

                           A database is an
                           implementation detail




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com

                           Encapsulation is your
                           friend




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com

                           Don’t forget to move your
                           database




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com
                           SQLite write speed is
                           constrained by
                           transactions




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com


                           SQLite uses duck-typing




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com
                           FMDB:
                           executeQuery !=
                            executeUpdate




Tuesday, March 3, 2009
Persistence: Tips

                                  Code and Slides:
                         http://thillerson.googlecode.com


                                      RTFS




Tuesday, March 3, 2009
Persistence: Thank you!
                         Tony Hillerson
                                   Code and Slides:
                         Software Architect


                          http://thillerson.googlecode.com
                     slideshare.com/thillerson
                     github.com/thillerson
                     twitter.com/thillerson
                     brightkite.com/thillerson

                     EffectiveUI.com


Tuesday, March 3, 2009

Contenu connexe

En vedette

Identità emergenti nei pubblici connessi italiani
Identità emergenti nei pubblici connessi italianiIdentità emergenti nei pubblici connessi italiani
Identità emergenti nei pubblici connessi italianiAgnese Vellar
 
SOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGC
SOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGCSOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGC
SOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGCAgnese Vellar
 
Educare alla cittadinanza digitale: scuola e social media
Educare alla cittadinanza digitale: scuola e social mediaEducare alla cittadinanza digitale: scuola e social media
Educare alla cittadinanza digitale: scuola e social mediaGiovanni Gentili
 
Progetto Comunicazione visiva e design delle interfacce
Progetto Comunicazione visiva e design delle interfacce Progetto Comunicazione visiva e design delle interfacce
Progetto Comunicazione visiva e design delle interfacce Valentina Primiceri
 
Social Media - Introduzione al Corso [a.a. 2014-2015] - UniTo
Social Media - Introduzione al Corso [a.a. 2014-2015] - UniToSocial Media - Introduzione al Corso [a.a. 2014-2015] - UniTo
Social Media - Introduzione al Corso [a.a. 2014-2015] - UniToAgnese Vellar
 
Ways to stay connected: Harnessing, managing, and preventing context collapse...
Ways to stay connected: Harnessing, managing, and preventing context collapse...Ways to stay connected: Harnessing, managing, and preventing context collapse...
Ways to stay connected: Harnessing, managing, and preventing context collapse...Stefanie Duguay
 
19. Social network sites
19. Social network sites19. Social network sites
19. Social network sitesRoberto Polillo
 
AWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field Experience
AWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field ExperienceAWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field Experience
AWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field ExperienceAmazon Web Services
 
NLRB report of the acting general counsel concerning social media cases
NLRB report of the acting general counsel concerning social media casesNLRB report of the acting general counsel concerning social media cases
NLRB report of the acting general counsel concerning social media casesElizabeth Lupfer
 
3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...
3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...
3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...Elizabeth Lupfer
 
Employee Engagement White Paper by 360Solutions
Employee Engagement White Paper by 360SolutionsEmployee Engagement White Paper by 360Solutions
Employee Engagement White Paper by 360SolutionsElizabeth Lupfer
 
Let's Talk About Social Networking
Let's Talk About Social NetworkingLet's Talk About Social Networking
Let's Talk About Social NetworkingSteve Lowisz
 
The Information Advantage - Information Access in Tomorrow's Enterprise
The Information Advantage - Information Access in Tomorrow's EnterpriseThe Information Advantage - Information Access in Tomorrow's Enterprise
The Information Advantage - Information Access in Tomorrow's EnterpriseElizabeth Lupfer
 
Gamification by Aravind Gogineni
Gamification by Aravind GogineniGamification by Aravind Gogineni
Gamification by Aravind GogineniAravind Gogineni
 
Dynamic Sound for Android
Dynamic Sound for AndroidDynamic Sound for Android
Dynamic Sound for AndroidTony Hillerson
 

En vedette (20)

Identità emergenti nei pubblici connessi italiani
Identità emergenti nei pubblici connessi italianiIdentità emergenti nei pubblici connessi italiani
Identità emergenti nei pubblici connessi italiani
 
SOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGC
SOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGCSOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGC
SOCIAL MEDIA: I pubblici connessi: self branding, UDC, UGC
 
Educare alla cittadinanza digitale: scuola e social media
Educare alla cittadinanza digitale: scuola e social mediaEducare alla cittadinanza digitale: scuola e social media
Educare alla cittadinanza digitale: scuola e social media
 
Progetto Comunicazione visiva e design delle interfacce
Progetto Comunicazione visiva e design delle interfacce Progetto Comunicazione visiva e design delle interfacce
Progetto Comunicazione visiva e design delle interfacce
 
Social Media - Introduzione al Corso [a.a. 2014-2015] - UniTo
Social Media - Introduzione al Corso [a.a. 2014-2015] - UniToSocial Media - Introduzione al Corso [a.a. 2014-2015] - UniTo
Social Media - Introduzione al Corso [a.a. 2014-2015] - UniTo
 
Ways to stay connected: Harnessing, managing, and preventing context collapse...
Ways to stay connected: Harnessing, managing, and preventing context collapse...Ways to stay connected: Harnessing, managing, and preventing context collapse...
Ways to stay connected: Harnessing, managing, and preventing context collapse...
 
19. Social network sites
19. Social network sites19. Social network sites
19. Social network sites
 
AWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field Experience
AWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field ExperienceAWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field Experience
AWS April 2016 Webinar Series - S3 Best Practices - A Decade of Field Experience
 
Wiley
WileyWiley
Wiley
 
NLRB report of the acting general counsel concerning social media cases
NLRB report of the acting general counsel concerning social media casesNLRB report of the acting general counsel concerning social media cases
NLRB report of the acting general counsel concerning social media cases
 
3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...
3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...
3 Keys to Influence: Understanding and Leveraging Social Capital [whitepaper]...
 
Employee Engagement White Paper by 360Solutions
Employee Engagement White Paper by 360SolutionsEmployee Engagement White Paper by 360Solutions
Employee Engagement White Paper by 360Solutions
 
Let's Talk About Social Networking
Let's Talk About Social NetworkingLet's Talk About Social Networking
Let's Talk About Social Networking
 
Working with Git
Working with GitWorking with Git
Working with Git
 
Mytunes
MytunesMytunes
Mytunes
 
The Information Advantage - Information Access in Tomorrow's Enterprise
The Information Advantage - Information Access in Tomorrow's EnterpriseThe Information Advantage - Information Access in Tomorrow's Enterprise
The Information Advantage - Information Access in Tomorrow's Enterprise
 
Campo profughi www.asefasc.org
Campo profughi www.asefasc.orgCampo profughi www.asefasc.org
Campo profughi www.asefasc.org
 
Gamification by Aravind Gogineni
Gamification by Aravind GogineniGamification by Aravind Gogineni
Gamification by Aravind Gogineni
 
Module05
Module05Module05
Module05
 
Dynamic Sound for Android
Dynamic Sound for AndroidDynamic Sound for Android
Dynamic Sound for Android
 

Similaire à iPhone Persistence For Mere Mortals

Flex Framework Smackdown
Flex Framework SmackdownFlex Framework Smackdown
Flex Framework SmackdownTony Hillerson
 
Huffduffer
HuffdufferHuffduffer
Huffdufferadactio
 
2 whats-new-in-ios7-m2-xcode-slides
2 whats-new-in-ios7-m2-xcode-slides2 whats-new-in-ios7-m2-xcode-slides
2 whats-new-in-ios7-m2-xcode-slidesMasterCode.vn
 
Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)Justin Miller
 
So what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web storeSo what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web storeEric Bidelman
 
WordPress SEO - SEO-Campixx
WordPress SEO - SEO-CampixxWordPress SEO - SEO-Campixx
WordPress SEO - SEO-Campixxsteffenhd
 
Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review ProcessSherif Koussa
 
Frontend tooling and workflows
Frontend tooling and workflowsFrontend tooling and workflows
Frontend tooling and workflowsDmitry Semigradsky
 

Similaire à iPhone Persistence For Mere Mortals (10)

Flex Framework Smackdown
Flex Framework SmackdownFlex Framework Smackdown
Flex Framework Smackdown
 
Becoming Indie
Becoming IndieBecoming Indie
Becoming Indie
 
Huffduffer
HuffdufferHuffduffer
Huffduffer
 
2 whats-new-in-ios7-m2-xcode-slides
2 whats-new-in-ios7-m2-xcode-slides2 whats-new-in-ios7-m2-xcode-slides
2 whats-new-in-ios7-m2-xcode-slides
 
Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)Beyond The Web: Drupal Meets The Desktop (And Mobile)
Beyond The Web: Drupal Meets The Desktop (And Mobile)
 
So what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web storeSo what's a web app? introduction to the chrome web store
So what's a web app? introduction to the chrome web store
 
Becoming Indie
Becoming IndieBecoming Indie
Becoming Indie
 
WordPress SEO - SEO-Campixx
WordPress SEO - SEO-CampixxWordPress SEO - SEO-Campixx
WordPress SEO - SEO-Campixx
 
Simplified Security Code Review Process
Simplified Security Code Review ProcessSimplified Security Code Review Process
Simplified Security Code Review Process
 
Frontend tooling and workflows
Frontend tooling and workflowsFrontend tooling and workflows
Frontend tooling and workflows
 

Plus de Tony Hillerson

Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)Tony Hillerson
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android DevelopersTony Hillerson
 
Designing an Android App from Idea to Market
Designing an Android App from Idea to MarketDesigning an Android App from Idea to Market
Designing an Android App from Idea to MarketTony Hillerson
 
SCM for Android Developers Using Git
SCM for Android Developers Using GitSCM for Android Developers Using Git
SCM for Android Developers Using GitTony Hillerson
 
First Android Experience
First Android ExperienceFirst Android Experience
First Android ExperienceTony Hillerson
 

Plus de Tony Hillerson (8)

Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)Totally Build Apps for Free! (not really)
Totally Build Apps for Free! (not really)
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android Developers
 
Designing an Android App from Idea to Market
Designing an Android App from Idea to MarketDesigning an Android App from Idea to Market
Designing an Android App from Idea to Market
 
Rails on HBase
Rails on HBaseRails on HBase
Rails on HBase
 
SCM for Android Developers Using Git
SCM for Android Developers Using GitSCM for Android Developers Using Git
SCM for Android Developers Using Git
 
Flex With Rubyamf
Flex With RubyamfFlex With Rubyamf
Flex With Rubyamf
 
First Android Experience
First Android ExperienceFirst Android Experience
First Android Experience
 
Flex And Rails
Flex And RailsFlex And Rails
Flex And Rails
 

Dernier

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Dernier (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

iPhone Persistence For Mere Mortals

  • 1. Code and Slides: http://thillerson.googlecode.com iPhone Persistence Tony Hillerson For Mere Mortals Software Architect Tuesday, March 3, 2009
  • 2. Persistence Code and Slides: http://thillerson.googlecode.com Tuesday, March 3, 2009
  • 3. Persistence Code and Slides: http://thillerson.googlecode.com ... or it means saving stuff. Tuesday, March 3, 2009
  • 4. Persistence: Disclaimer Code and Slides: http://thillerson.googlecode.com BTW: I’m a n00b Tuesday, March 3, 2009
  • 5. Code and Slides: http://thillerson.googlecode.com Persistence: Savin’ stuff on ur fone Your options Tuesday, March 3, 2009
  • 6. Persistence: Options Code and Slides: http://thillerson.googlecode.com Settings SQLite Filesystem The Internets Tuesday, March 3, 2009
  • 7. Persistence: Options Code and Slides: http://thillerson.googlecode.com Settings SQLite Filesystem The Internets Tuesday, March 3, 2009
  • 8. Persistence: Our Sweet App Code and Slides: http://thillerson.googlecode.com Tuesday, March 3, 2009
  • 9. Persistence: Sweet Codes http://github.com/thillerson/grocery_getter/ Code and Slides: http://thillerson.googlecode.com Download Tuesday, March 3, 2009
  • 10. Code and Slides: http://thillerson.googlecode.com Persistence: Settings Yours or Apple’s? Tuesday, March 3, 2009
  • 11. Persistence: Settings Code and Slides: http://thillerson.googlecode.com Apple’s => Settings.bundle Yours => Roll your own Both end up in NSUserDefaults Tuesday, March 3, 2009
  • 12. Persistence: Settings Code and Slides: http://thillerson.googlecode.com Can be one of: NSData, NSString, NSNumber, NSDate, NSArray, or NSDictionary Tuesday, March 3, 2009
  • 13. Persistence: Settings Code and Slides: http://thillerson.googlecode.com NSUserDefaults *settings = [NSUserDefaults standardUserDefaults]; [settings setBool:YES forKey:@quot;shouldSortAfterCompletequot;]; [NSUserDefaults standardUserDefaults]; [NSUserDefaults resetStandardUserDefaults]; BOOL on = [settings boolForKey:@quot;shouldSortAfterCompletequot;]; Tuesday, March 3, 2009
  • 14. Code and Slides: http://thillerson.googlecode.com Persistence: SQLite It’s small, but it’s feisty! Tuesday, March 3, 2009
  • 15. Persistence: SQLite Code and Slides: http://thillerson.googlecode.com YO DAWG I HERD YOU LIEK DATA... Tuesday, March 3, 2009
  • 16. Persistence: SQLite Code and Slides: http://thillerson.googlecode.com SQLite - Embedded Relational Database written in C Tuesday, March 3, 2009
  • 17. Persistence: SQLite Code and Slides: http://thillerson.googlecode.com Embedded Relational Database written in C Tuesday, March 3, 2009
  • 18. SQLite: Code and Slides: Hic Draconae http://thillerson.googlecode.com Sunt CocoaTouch: Terra Firma Tuesday, March 3, 2009
  • 19. Persistence: SQLite Code and Slides: http://thillerson.googlecode.com 3 Takes on our Sweet App: • SQLite C API • fmdb + fmdb-migration- manager • Aptiva’s ActiveRecord Tuesday, March 3, 2009
  • 20. Persistence: SQLite Code and Slides: http://thillerson.googlecode.com SQL C API: http://www.sqlite.org/c3ref/ funclist.html Tuesday, March 3, 2009
  • 21. Persistence: SQLite Code and Slides: • fmdb - Thin Wrapper around SQLite http://thillerson.googlecode.com • fmdb-migration-manager - Rails-style migrations using fmdb • http://code.google.com/p/ ycode/ • http://github.com/mocra/fmdb- migration-manager/ Tuesday, March 3, 2009
  • 22. Persistence: SQLite Code and Slides: • Aptiva’s ActiveRecord http://thillerson.googlecode.com In software engineering, the active record pattern is a design pattern frequently found in software that stores its data in relational databases. It was named by Martin Fowler in his book Patterns of Enterprise Application Architecture. - http://en.wikipedia.org/wiki/Active_record_pattern http://github.com/aptiva/ activerecord/ Tuesday, March 3, 2009
  • 23. Persistence: SQLite Code and Slides: http://thillerson.googlecode.com Quick! To the CODES! Tuesday, March 3, 2009
  • 24. Code and Slides: http://thillerson.googlecode.com Persistence: A Few Points Take two, they’re small! Tuesday, March 3, 2009
  • 25. Persistence: Tips Code and Slides: http://thillerson.googlecode.com Consider how your settings will be used Tuesday, March 3, 2009
  • 26. Persistence: Tips Code and Slides: http://thillerson.googlecode.com A database is an implementation detail Tuesday, March 3, 2009
  • 27. Persistence: Tips Code and Slides: http://thillerson.googlecode.com Encapsulation is your friend Tuesday, March 3, 2009
  • 28. Persistence: Tips Code and Slides: http://thillerson.googlecode.com Don’t forget to move your database Tuesday, March 3, 2009
  • 29. Persistence: Tips Code and Slides: http://thillerson.googlecode.com SQLite write speed is constrained by transactions Tuesday, March 3, 2009
  • 30. Persistence: Tips Code and Slides: http://thillerson.googlecode.com SQLite uses duck-typing Tuesday, March 3, 2009
  • 31. Persistence: Tips Code and Slides: http://thillerson.googlecode.com FMDB: executeQuery != executeUpdate Tuesday, March 3, 2009
  • 32. Persistence: Tips Code and Slides: http://thillerson.googlecode.com RTFS Tuesday, March 3, 2009
  • 33. Persistence: Thank you! Tony Hillerson Code and Slides: Software Architect http://thillerson.googlecode.com slideshare.com/thillerson github.com/thillerson twitter.com/thillerson brightkite.com/thillerson EffectiveUI.com Tuesday, March 3, 2009