SlideShare ist ein Scribd-Unternehmen logo
1 von 73
Downloaden Sie, um offline zu lesen
Welcome to CS193P
           iPhone Application Development

           Alan Cannistraro
           accannis@stanford.edu

           Josh Shaffer
           joshh@stanford.edu




Tuesday, January 5, 2010                    1
Introductions

        • Lecturers
            ■ Alan Cannistraro <accannis@stanford.edu>
            ■ Josh Shaffer <joshh@stanford.edu>


        • Student TAs
            ■ Paul Salzman <paulsalz@stanford.edu>
            ■ David Jacobs <dejacobs@stanford.edu>


        • Grand-Master Chief
            ■   Paul Marcos <pmarcos@apple.com>




Tuesday, January 5, 2010                                 2
Quick Survey




Tuesday, January 5, 2010   3
Quick Survey
                    • Have worked with Object Oriented Programming??




Tuesday, January 5, 2010                                               3
Quick Survey
                    • Have worked with Object Oriented Programming??
                    • Have developed apps for Mac OS X?




Tuesday, January 5, 2010                                               3
Quick Survey
                    • Have worked with Object Oriented Programming??
                    • Have developed apps for Mac OS X?
                    • Have installed the iPhone SDK and done iPhone
                       development?




Tuesday, January 5, 2010                                               3
Quick Survey
                    • Have worked with Object Oriented Programming??
                    • Have developed apps for Mac OS X?
                    • Have installed the iPhone SDK and done iPhone
                      development?
                    • Have submitted apps to the App Store?




Tuesday, January 5, 2010                                               3
Logistics




Tuesday, January 5, 2010   4
Logistics
        • Lectures:
            ■ Education 128
            ■ Tuesday & Thursday 4:15 - 5:30 PM




Tuesday, January 5, 2010                          4
Logistics
        • Lectures:
            ■ Education 128
            ■ Tuesday & Thursday 4:15 - 5:30 PM




        • Optional Section
            ■ Room & Time - TBD
            ■ Guest speakers & hot topics




Tuesday, January 5, 2010                          4
Logistics
        • Lectures:
            ■ Education 128
            ■ Tuesday & Thursday 4:15 - 5:30 PM




        • Optional Section
            ■ Room & Time - TBD
            ■ Guest speakers & hot topics




        • Office Hours
            ■ Paul & David will hold office hours
            ■ See website for details




Tuesday, January 5, 2010                            4
Requirements
        • Prerequisite: CS 106B/X

        • Recommended Book: None! We’ll use Apple documentation

        • Required Hardware & Software:
            ■ Intel-based Macintosh, running Mac OS X 10.5 Leopard
            ■ iPhone SDK (not currently available on cluster computers)




        • iPhone or iPod touch is not required
            ■ Assignments may be completed using the iPhone Simulator
            ■ Loaner iPod touches will be available




Tuesday, January 5, 2010                                                  5
Enrollment




Tuesday, January 5, 2010   6
Enrollment
        • Response has been phenomenal (again)!
            ■ Enrollment limited to 60 students
            ■ 40 Graded, 20 Pass/No Credit




Tuesday, January 5, 2010                          6
Enrollment
        • Response has been phenomenal (again)!
            ■ Enrollment limited to 60 students
            ■ 40 Graded, 20 Pass/No Credit




Tuesday, January 5, 2010                          6
Enrollment
        • Response has been phenomenal (again)!
            ■ Enrollment limited to 60 students
            ■ 40 Graded, 20 Pass/No Credit




        • You MUST fill out a survey to be considered
            ■ http://tinyurl.com/cs193p-2010
            ■ Need to be completed by noon tomorrow (1/6)




Tuesday, January 5, 2010                                    6
Enrollment
        • Response has been phenomenal (again)!
            ■ Enrollment limited to 60 students
            ■ 40 Graded, 20 Pass/No Credit




        • You MUST fill out a survey to be considered
            ■ http://tinyurl.com/cs193p-2010
            ■ Need to be completed by noon tomorrow (1/6)




Tuesday, January 5, 2010                                    6
Enrollment
        • Response has been phenomenal (again)!
            ■ Enrollment limited to 60 students
            ■ 40 Graded, 20 Pass/No Credit




        • You MUST fill out a survey to be considered
            ■ http://tinyurl.com/cs193p-2010
            ■ Need to be completed by noon tomorrow (1/6)




        • Enrollment will be determined based on prior CS courses, other
          relevant experience, number of quarters remaining, major




Tuesday, January 5, 2010                                                   6
Enrollment
        • Response has been phenomenal (again)!
            ■ Enrollment limited to 60 students
            ■ 40 Graded, 20 Pass/No Credit




        • You MUST fill out a survey to be considered
            ■ http://tinyurl.com/cs193p-2010
            ■ Need to be completed by noon tomorrow (1/6)




        • Enrollment will be determined based on prior CS courses, other
          relevant experience, number of quarters remaining, major




Tuesday, January 5, 2010                                                   6
Enrollment
        • Response has been phenomenal (again)!
            ■ Enrollment limited to 60 students
            ■ 40 Graded, 20 Pass/No Credit




        • You MUST fill out a survey to be considered
            ■ http://tinyurl.com/cs193p-2010
            ■ Need to be completed by noon tomorrow (1/6)




        • Enrollment will be determined based on prior CS courses, other
          relevant experience, number of quarters remaining, major

        • Auditors welcome!

Tuesday, January 5, 2010                                                   6
iPhone Developer University Program
        • Stanford is part of the iPhone Developer University Program
            ■   Do not sign up for this!


        • Free on-device development for students (save $99!)
            ■ Valid through the end of the quarter
            ■ Invites will be issued to your @stanford.edu email address

            ■ Read through a Student Agreement to get started




Tuesday, January 5, 2010                                                   7
Available on iTunes U




Tuesday, January 5, 2010                           8
CS193P on iTunes U

          For enrolled students at Stanford
            ■ Your voice may be recorded
            ■ Not a substitute for attending lectures

            ■ There will be a delay of a few days before lectures and materials

              are available




Tuesday, January 5, 2010                                                          9
CS193P on iTunes U

          For viewers on iTunes U:
            ■ Welcome to Stanford!
            ■ Feedback and suggestions are welcome

            ■ We can’t answer individual questions via email

            ■ Download materials now, if you want them later!




Tuesday, January 5, 2010                                        10
Communication and Materials
        • Email
            ■ cs193p@cs.stanford.edu
            ■ Questions from enrolled students only, please!




        • Course web site
            ■   http://cs193p.stanford.edu


        • Other web sites
                 ■ Apple Dev Center: http://developer.apple.com
                 ■ Developer Forums: http://devforums.apple.com

                 ■ External resources:

                    ■ http://cs193p.com

                    ■ http://groups.google.com/group/iphone-appdev-auditors/



Tuesday, January 5, 2010                                                       11
Communication and Materials
        • Auditors
            ■ cs193p-auditors@lists.stanford.edu
            ■ Self-add email list

            ■ Low volume, but allows us to communicate with all folks

              following along
            ■ To sign up, go to:

                 ■ http://lists.stanford.edu
                 ■ https://mailman.stanford.edu/mailman/listinfo/cs193p-auditors




Tuesday, January 5, 2010                                                           12
Why Are We Here?




                   To build iPhone & iPod touch applications
                               using Cocoa Touch


Tuesday, January 5, 2010                                       13
Why Are We Here?
       • CS193P is not just about the iPhone, Cocoa Touch or ObjC

       • It’s about Software Engineering, as well as object oriented
         architecture and design

       • Exposure to problems and solutions that you might not see in
         other classes




Tuesday, January 5, 2010                                                14
Cocoa Touch & iPhone SDK




Tuesday, January 5, 2010           15
Cocoa Touch & iPhone SDK
        • Based on Cocoa
            ■   Mature, polished, highly consistent APIs


        • Provides a very rich starting point for exploring app design

        • Shows “real-world” implementations of OO design patterns

        • Designs learned on iPhone translate directly to Mac OS X




Tuesday, January 5, 2010                                                 15
Things We’ll Cover




Tuesday, January 5, 2010     16
Tools




      Frameworks




      Language
      (& Runtime)



Tuesday, January 5, 2010   17
Tools
                           Xcode   Interface Builder



      Frameworks




      Language
      (& Runtime)



Tuesday, January 5, 2010                               17
Tools
                             Xcode      Interface Builder



      Frameworks
                           Foundation         UIKit


      Language
      (& Runtime)



Tuesday, January 5, 2010                                    17
Tools
                               Xcode         Interface Builder



      Frameworks
                             Foundation              UIKit


      Language             [textView setStringValue: @“Hello”];
      (& Runtime)
                                       Objective-C



Tuesday, January 5, 2010                                          17
Why Objective-C?
        • Exposure to other languages is always good
        • ObjC is a language focused on simplicity and the elegance of
          OO design
            ■ Based on ANSI C
            ■ Brings many object oriented principles, but with a minimal

              amount of syntax
        • A data point to compare with designs of C, C++ and Java




Tuesday, January 5, 2010                                                   18
Assignments, Grading & Late Policy
        • 7 weekly assignments
        • Final project of your choice
            ■   End of quarter demos at Apple...
        • Grading: Nice & simple: ✓, ✓+ and ✓-
        • Late Policy: 3 late days, use them wisely!




Tuesday, January 5, 2010                               19
Applications You Will Build


                                HelloStanford & Obj-C Tool


                                HelloPoly - 2 weeks


                                Paparazzi - 4 weeks


                                Final Project (your choice) - 3 weeks



Tuesday, January 5, 2010                                                20
First Assignment
        • First assignment handed out today, in two parts
        • Intended to get you situated with tools and start off with Obj-C
        • Includes a comprehensive walkthrough
        • We suggest trying to do the first half before Thursday to help
          work out any tools or installation issues
        • Due on Jan 13 (next Wednesday)




Tuesday, January 5, 2010                                                     21
Paparazzi
        • Build a fully functional application from scratch over 4 weeks

        • Access photos on

        • Each assignment builds on the previous one
            ■   Don’t fall behind!


        • Covers a wide variety of topics in the UIKit framework...




Tuesday, January 5, 2010                                                   22
What We’ll Cover
        • Application design patterns
        • View controllers
        • Presenting data
            ■   Table views
        • Loading & saving data
            ■   Property lists, Core Data, web services
        • Text input
        • Threading and Performance
        • Address Book and other system integration
        • iPhone SDK 3.0 stuff!
            ■   MapKit, Video & Photo APIs, & more



Tuesday, January 5, 2010                                  23
Final Projects
        • 3 weeks to work on them
        • By yourself or with a partner
        • It’s never too early to think of something and propose it to us
        • Categories to consider:
            ■ Student life apps
            ■ Educational tools

            ■ Games

            ■ Social / location-aware software


        • Find a project that you or your friends would actually like to
          use!
        • Post it on the app store?
        • http://www.stanfordiphoneclassapps.com

Tuesday, January 5, 2010                                                    24
Questions?




Tuesday, January 5, 2010   25
iPhone OS Overview




Tuesday, January 5, 2010     26
iPhone




Tuesday, January 5, 2010            27
Mac OS X




Tuesday, January 5, 2010              27
Mac OS X

                              Cocoa

                              Media

                           Core Services

                             Core OS




Tuesday, January 5, 2010                   27
Cocoa

                              Media

                           Core Services

                             Core OS




Tuesday, January 5, 2010                   27
Cocoa Touch

                              Media

                           Core Services

                             Core OS




Tuesday, January 5, 2010                   27
iPhone OS
                           Cocoa Touch

                              Media

                           Core Services

                             Core OS




Tuesday, January 5, 2010                   27
iPhone OS
                           Cocoa Touch

                              Media

                           Core Services

                             Core OS




Tuesday, January 5, 2010                   28
iPhone OS     Core OS
                  Cocoa Touch    OS X Kernel   Power Mgmt
                                 Mach 3.0      Keychain
                       Media
                                 BSD           Certificates
                 Core Services   Sockets       File System
                      Core OS    Security      Bonjour




Tuesday, January 5, 2010                                      28
iPhone OS     Core Services
                  Cocoa Touch    Collections    Core Location
                                 Address Book   Net Services
                       Media
                                 Networking     Threading
                 Core Services   File Access    Preferences
                      Core OS    SQLite          URL utilities




Tuesday, January 5, 2010                                         28
iPhone OS     Media
                  Cocoa Touch    Core Audio       JPG, PNG, TIFF
                                 OpenAL           PDF
                       Media
                                 Audio Mixing     Quartz (2D)
                 Core Services   Audio Recording Core Animation
                      Core OS    Video Playback   OpenGL ES




Tuesday, January 5, 2010                                           28
iPhone OS     Cocoa Touch
                  Cocoa Touch    Multi-Touch Events   Alerts
                                 Multi-Touch Controls Web View
                       Media
                                 Accelerometer        People Picker
                 Core Services   View Hierarchy       Image Picker
                      Core OS    Localization         Camera




Tuesday, January 5, 2010                                             28
iPhone OS
                           Cocoa Touch

                              Media

                           Core Services

                             Core OS




Tuesday, January 5, 2010                   28
Tools
                               Xcode         Interface Builder



      Frameworks
                             Foundation              UIKit


      Language             [textView setStringValue: @“Hello”];
      (& Runtime)
                                       Objective-C



Tuesday, January 5, 2010                                          29
Cocoa Touch Architecture

                                        Cocoa Touch

                           UIKit        User interface elements
                                        Application runtime
                                        Event handling
                                        Hardware APIs



                           Foundation   Utility classes
                                        Collection classes
                                        Object wrappers for system services
                                        Subset of Foundation in Cocoa




Tuesday, January 5, 2010                                                      30
Objects




Tuesday, January 5, 2010   31
Object



                           Thing




Tuesday, January 5, 2010                    32
Behavior



                                Thing




           behavior        doSomething




Tuesday, January 5, 2010                        33
Message



                                Thing

       "doSomething"




                           doSomething




Tuesday, January 5, 2010                       34
State



                                   Thing
                           flag
           state           count



           behavior        doSomething




Tuesday, January 5, 2010                           35
Other Objects As State



                                   Thing
                           flag
           state           count



           behavior        doSomething




Tuesday, January 5, 2010                            36
Other Objects As State



                                   Thing
                           flag
           state           count



           behavior        doSomething
                           doSomethingElse




Tuesday, January 5, 2010                            36
Other Objects As State



                                Thing
                           flag
           state           count
                           helper

           behavior        doSomething
                           doSomethingElse




Tuesday, January 5, 2010                            36
Other Objects As State

                                               Other Thing

                                Thing
                           flag               performDifficultTask
           state           count
                           helper

           behavior        doSomething
                           doSomethingElse




Tuesday, January 5, 2010                                           36
Outlets   Need to decide what the
                                                     demo would be and update
                                                     slide to appropriate
                                                     material.

                                                     - text field / slider?

                                                     - color tabs?




                              Controller
                           slider
                           label

                           updateLabel




Tuesday, January 5, 2010                                                        37
Target / Action




                              Controller
                                               target
                           slider              action ʻupdateLabelʼ
                           label

                           updateLabel




Tuesday, January 5, 2010                                              38
Demo




Tuesday, January 5, 2010   39
Outlets




                              Controller
                           slider
                           label

                           updateLabel




Tuesday, January 5, 2010                             40
Target / Action




                              Controller
                                               target
                           slider              action ʻupdateLabelʼ
                           label

                           updateLabel




Tuesday, January 5, 2010                                              41
Questions?




Tuesday, January 5, 2010   42

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Kürzlich hochgeladen (20)

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Empfohlen

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

01 introduction

  • 1. Welcome to CS193P iPhone Application Development Alan Cannistraro accannis@stanford.edu Josh Shaffer joshh@stanford.edu Tuesday, January 5, 2010 1
  • 2. Introductions • Lecturers ■ Alan Cannistraro <accannis@stanford.edu> ■ Josh Shaffer <joshh@stanford.edu> • Student TAs ■ Paul Salzman <paulsalz@stanford.edu> ■ David Jacobs <dejacobs@stanford.edu> • Grand-Master Chief ■ Paul Marcos <pmarcos@apple.com> Tuesday, January 5, 2010 2
  • 4. Quick Survey • Have worked with Object Oriented Programming?? Tuesday, January 5, 2010 3
  • 5. Quick Survey • Have worked with Object Oriented Programming?? • Have developed apps for Mac OS X? Tuesday, January 5, 2010 3
  • 6. Quick Survey • Have worked with Object Oriented Programming?? • Have developed apps for Mac OS X? • Have installed the iPhone SDK and done iPhone development? Tuesday, January 5, 2010 3
  • 7. Quick Survey • Have worked with Object Oriented Programming?? • Have developed apps for Mac OS X? • Have installed the iPhone SDK and done iPhone development? • Have submitted apps to the App Store? Tuesday, January 5, 2010 3
  • 9. Logistics • Lectures: ■ Education 128 ■ Tuesday & Thursday 4:15 - 5:30 PM Tuesday, January 5, 2010 4
  • 10. Logistics • Lectures: ■ Education 128 ■ Tuesday & Thursday 4:15 - 5:30 PM • Optional Section ■ Room & Time - TBD ■ Guest speakers & hot topics Tuesday, January 5, 2010 4
  • 11. Logistics • Lectures: ■ Education 128 ■ Tuesday & Thursday 4:15 - 5:30 PM • Optional Section ■ Room & Time - TBD ■ Guest speakers & hot topics • Office Hours ■ Paul & David will hold office hours ■ See website for details Tuesday, January 5, 2010 4
  • 12. Requirements • Prerequisite: CS 106B/X • Recommended Book: None! We’ll use Apple documentation • Required Hardware & Software: ■ Intel-based Macintosh, running Mac OS X 10.5 Leopard ■ iPhone SDK (not currently available on cluster computers) • iPhone or iPod touch is not required ■ Assignments may be completed using the iPhone Simulator ■ Loaner iPod touches will be available Tuesday, January 5, 2010 5
  • 14. Enrollment • Response has been phenomenal (again)! ■ Enrollment limited to 60 students ■ 40 Graded, 20 Pass/No Credit Tuesday, January 5, 2010 6
  • 15. Enrollment • Response has been phenomenal (again)! ■ Enrollment limited to 60 students ■ 40 Graded, 20 Pass/No Credit Tuesday, January 5, 2010 6
  • 16. Enrollment • Response has been phenomenal (again)! ■ Enrollment limited to 60 students ■ 40 Graded, 20 Pass/No Credit • You MUST fill out a survey to be considered ■ http://tinyurl.com/cs193p-2010 ■ Need to be completed by noon tomorrow (1/6) Tuesday, January 5, 2010 6
  • 17. Enrollment • Response has been phenomenal (again)! ■ Enrollment limited to 60 students ■ 40 Graded, 20 Pass/No Credit • You MUST fill out a survey to be considered ■ http://tinyurl.com/cs193p-2010 ■ Need to be completed by noon tomorrow (1/6) Tuesday, January 5, 2010 6
  • 18. Enrollment • Response has been phenomenal (again)! ■ Enrollment limited to 60 students ■ 40 Graded, 20 Pass/No Credit • You MUST fill out a survey to be considered ■ http://tinyurl.com/cs193p-2010 ■ Need to be completed by noon tomorrow (1/6) • Enrollment will be determined based on prior CS courses, other relevant experience, number of quarters remaining, major Tuesday, January 5, 2010 6
  • 19. Enrollment • Response has been phenomenal (again)! ■ Enrollment limited to 60 students ■ 40 Graded, 20 Pass/No Credit • You MUST fill out a survey to be considered ■ http://tinyurl.com/cs193p-2010 ■ Need to be completed by noon tomorrow (1/6) • Enrollment will be determined based on prior CS courses, other relevant experience, number of quarters remaining, major Tuesday, January 5, 2010 6
  • 20. Enrollment • Response has been phenomenal (again)! ■ Enrollment limited to 60 students ■ 40 Graded, 20 Pass/No Credit • You MUST fill out a survey to be considered ■ http://tinyurl.com/cs193p-2010 ■ Need to be completed by noon tomorrow (1/6) • Enrollment will be determined based on prior CS courses, other relevant experience, number of quarters remaining, major • Auditors welcome! Tuesday, January 5, 2010 6
  • 21. iPhone Developer University Program • Stanford is part of the iPhone Developer University Program ■ Do not sign up for this! • Free on-device development for students (save $99!) ■ Valid through the end of the quarter ■ Invites will be issued to your @stanford.edu email address ■ Read through a Student Agreement to get started Tuesday, January 5, 2010 7
  • 22. Available on iTunes U Tuesday, January 5, 2010 8
  • 23. CS193P on iTunes U For enrolled students at Stanford ■ Your voice may be recorded ■ Not a substitute for attending lectures ■ There will be a delay of a few days before lectures and materials are available Tuesday, January 5, 2010 9
  • 24. CS193P on iTunes U For viewers on iTunes U: ■ Welcome to Stanford! ■ Feedback and suggestions are welcome ■ We can’t answer individual questions via email ■ Download materials now, if you want them later! Tuesday, January 5, 2010 10
  • 25. Communication and Materials • Email ■ cs193p@cs.stanford.edu ■ Questions from enrolled students only, please! • Course web site ■ http://cs193p.stanford.edu • Other web sites ■ Apple Dev Center: http://developer.apple.com ■ Developer Forums: http://devforums.apple.com ■ External resources: ■ http://cs193p.com ■ http://groups.google.com/group/iphone-appdev-auditors/ Tuesday, January 5, 2010 11
  • 26. Communication and Materials • Auditors ■ cs193p-auditors@lists.stanford.edu ■ Self-add email list ■ Low volume, but allows us to communicate with all folks following along ■ To sign up, go to: ■ http://lists.stanford.edu ■ https://mailman.stanford.edu/mailman/listinfo/cs193p-auditors Tuesday, January 5, 2010 12
  • 27. Why Are We Here? To build iPhone & iPod touch applications using Cocoa Touch Tuesday, January 5, 2010 13
  • 28. Why Are We Here? • CS193P is not just about the iPhone, Cocoa Touch or ObjC • It’s about Software Engineering, as well as object oriented architecture and design • Exposure to problems and solutions that you might not see in other classes Tuesday, January 5, 2010 14
  • 29. Cocoa Touch & iPhone SDK Tuesday, January 5, 2010 15
  • 30. Cocoa Touch & iPhone SDK • Based on Cocoa ■ Mature, polished, highly consistent APIs • Provides a very rich starting point for exploring app design • Shows “real-world” implementations of OO design patterns • Designs learned on iPhone translate directly to Mac OS X Tuesday, January 5, 2010 15
  • 31. Things We’ll Cover Tuesday, January 5, 2010 16
  • 32. Tools Frameworks Language (& Runtime) Tuesday, January 5, 2010 17
  • 33. Tools Xcode Interface Builder Frameworks Language (& Runtime) Tuesday, January 5, 2010 17
  • 34. Tools Xcode Interface Builder Frameworks Foundation UIKit Language (& Runtime) Tuesday, January 5, 2010 17
  • 35. Tools Xcode Interface Builder Frameworks Foundation UIKit Language [textView setStringValue: @“Hello”]; (& Runtime) Objective-C Tuesday, January 5, 2010 17
  • 36. Why Objective-C? • Exposure to other languages is always good • ObjC is a language focused on simplicity and the elegance of OO design ■ Based on ANSI C ■ Brings many object oriented principles, but with a minimal amount of syntax • A data point to compare with designs of C, C++ and Java Tuesday, January 5, 2010 18
  • 37. Assignments, Grading & Late Policy • 7 weekly assignments • Final project of your choice ■ End of quarter demos at Apple... • Grading: Nice & simple: ✓, ✓+ and ✓- • Late Policy: 3 late days, use them wisely! Tuesday, January 5, 2010 19
  • 38. Applications You Will Build HelloStanford & Obj-C Tool HelloPoly - 2 weeks Paparazzi - 4 weeks Final Project (your choice) - 3 weeks Tuesday, January 5, 2010 20
  • 39. First Assignment • First assignment handed out today, in two parts • Intended to get you situated with tools and start off with Obj-C • Includes a comprehensive walkthrough • We suggest trying to do the first half before Thursday to help work out any tools or installation issues • Due on Jan 13 (next Wednesday) Tuesday, January 5, 2010 21
  • 40. Paparazzi • Build a fully functional application from scratch over 4 weeks • Access photos on • Each assignment builds on the previous one ■ Don’t fall behind! • Covers a wide variety of topics in the UIKit framework... Tuesday, January 5, 2010 22
  • 41. What We’ll Cover • Application design patterns • View controllers • Presenting data ■ Table views • Loading & saving data ■ Property lists, Core Data, web services • Text input • Threading and Performance • Address Book and other system integration • iPhone SDK 3.0 stuff! ■ MapKit, Video & Photo APIs, & more Tuesday, January 5, 2010 23
  • 42. Final Projects • 3 weeks to work on them • By yourself or with a partner • It’s never too early to think of something and propose it to us • Categories to consider: ■ Student life apps ■ Educational tools ■ Games ■ Social / location-aware software • Find a project that you or your friends would actually like to use! • Post it on the app store? • http://www.stanfordiphoneclassapps.com Tuesday, January 5, 2010 24
  • 44. iPhone OS Overview Tuesday, January 5, 2010 26
  • 46. Mac OS X Tuesday, January 5, 2010 27
  • 47. Mac OS X Cocoa Media Core Services Core OS Tuesday, January 5, 2010 27
  • 48. Cocoa Media Core Services Core OS Tuesday, January 5, 2010 27
  • 49. Cocoa Touch Media Core Services Core OS Tuesday, January 5, 2010 27
  • 50. iPhone OS Cocoa Touch Media Core Services Core OS Tuesday, January 5, 2010 27
  • 51. iPhone OS Cocoa Touch Media Core Services Core OS Tuesday, January 5, 2010 28
  • 52. iPhone OS Core OS Cocoa Touch OS X Kernel Power Mgmt Mach 3.0 Keychain Media BSD Certificates Core Services Sockets File System Core OS Security Bonjour Tuesday, January 5, 2010 28
  • 53. iPhone OS Core Services Cocoa Touch Collections Core Location Address Book Net Services Media Networking Threading Core Services File Access Preferences Core OS SQLite URL utilities Tuesday, January 5, 2010 28
  • 54. iPhone OS Media Cocoa Touch Core Audio JPG, PNG, TIFF OpenAL PDF Media Audio Mixing Quartz (2D) Core Services Audio Recording Core Animation Core OS Video Playback OpenGL ES Tuesday, January 5, 2010 28
  • 55. iPhone OS Cocoa Touch Cocoa Touch Multi-Touch Events Alerts Multi-Touch Controls Web View Media Accelerometer People Picker Core Services View Hierarchy Image Picker Core OS Localization Camera Tuesday, January 5, 2010 28
  • 56. iPhone OS Cocoa Touch Media Core Services Core OS Tuesday, January 5, 2010 28
  • 57. Tools Xcode Interface Builder Frameworks Foundation UIKit Language [textView setStringValue: @“Hello”]; (& Runtime) Objective-C Tuesday, January 5, 2010 29
  • 58. Cocoa Touch Architecture Cocoa Touch UIKit User interface elements Application runtime Event handling Hardware APIs Foundation Utility classes Collection classes Object wrappers for system services Subset of Foundation in Cocoa Tuesday, January 5, 2010 30
  • 60. Object Thing Tuesday, January 5, 2010 32
  • 61. Behavior Thing behavior doSomething Tuesday, January 5, 2010 33
  • 62. Message Thing "doSomething" doSomething Tuesday, January 5, 2010 34
  • 63. State Thing flag state count behavior doSomething Tuesday, January 5, 2010 35
  • 64. Other Objects As State Thing flag state count behavior doSomething Tuesday, January 5, 2010 36
  • 65. Other Objects As State Thing flag state count behavior doSomething doSomethingElse Tuesday, January 5, 2010 36
  • 66. Other Objects As State Thing flag state count helper behavior doSomething doSomethingElse Tuesday, January 5, 2010 36
  • 67. Other Objects As State Other Thing Thing flag performDifficultTask state count helper behavior doSomething doSomethingElse Tuesday, January 5, 2010 36
  • 68. Outlets Need to decide what the demo would be and update slide to appropriate material. - text field / slider? - color tabs? Controller slider label updateLabel Tuesday, January 5, 2010 37
  • 69. Target / Action Controller target slider action ʻupdateLabelʼ label updateLabel Tuesday, January 5, 2010 38
  • 71. Outlets Controller slider label updateLabel Tuesday, January 5, 2010 40
  • 72. Target / Action Controller target slider action ʻupdateLabelʼ label updateLabel Tuesday, January 5, 2010 41