SlideShare a Scribd company logo
1 of 33
Download to read offline
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

More Related Content

Viewers also liked

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
 

Viewers also liked (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
 

Similar to iPhone Persistence For Mere Mortals

Flex Framework Smackdown
Flex Framework SmackdownFlex Framework Smackdown
Flex Framework SmackdownTony Hillerson
 
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
 

Similar to iPhone Persistence For Mere Mortals (9)

Flex Framework Smackdown
Flex Framework SmackdownFlex Framework Smackdown
Flex Framework Smackdown
 
Becoming Indie
Becoming IndieBecoming Indie
Becoming Indie
 
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
 

More from 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
 

More from 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
 

Recently uploaded

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Recently uploaded (20)

The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

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