Lecture 1#-(Logistics, iPhone OS Overview, MVC)

22
CS193p Spring 2010 Wednesday, March 31, 2010

description

ClassA description of (or sometimes called a “template for”) an Object.InstanceA manifestation of a Class. Often interchangeable with “Object”.MessageWhat you send to an Object to get it to do something.MethodThe code that is invoked when you send an Object a Message.Instance VariableA storage location each Instance has. Is often a pointer to another Object.Inheritance / Superclass / SubclassThe process by which a Class gets functionality from another Class.A Subclass Inherits functionality from its Superclass.ProtocolA description of a set of Messages that a Class can claim to respond to.Sometimes called an “interface” in some languages.

Transcript of Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Page 1: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

CS193pSpring 2010

Wednesday, March 31, 2010

Page 2: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

LogisticsLecturesBuilding 260 (History Corner) Room 034Monday & Wednesday 4:15pm - 5:30pm

Office HoursTBD

Homework7 Weekly AssignmentsAssigned on Wednesdays (often will be multiweek projects)Due Tuesdays at 11:59pm (3 late days allowed per quarter)Graded on ✓, ✓+ and ✓-Final Project w/Keynote Presentation (last 3 weeks)

Wednesday, March 31, 2010

Page 3: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Object Oriented Programming TermsClassA description of (or sometimes called a “template for”) an Object.

InstanceA manifestation of a Class. Often interchangeable with “Object”.

MessageWhat you send to an Object to get it to do something.

MethodThe code that is invoked when you send an Object a Message.

Instance VariableA storage location each Instance has. Is often a pointer to another Object.

Inheritance / Superclass / SubclassThe process by which a Class gets functionality from another Class.A Subclass Inherits functionality from its Superclass.

ProtocolA description of a set of Messages that a Class can claim to respond to.Sometimes called an “interface” in some languages.

Wednesday, March 31, 2010

Page 4: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Requirements

You need access to a Mac!Intel-based (not PowerPC) MacintoshMac OSX 10.5 Leopard (or later)iPhone SDK is not available on the cluster computers currently

iPhone/iPod Touch (iPad?)NOT RequiredHomework to be done on iPhone SimulatorLoaner iPod Touches (sorry no iPads or iPhones) available

No “Textbook”Documentation is built into Developer Tools

Prerequisite: CS106Object-Oriented Programming

Wednesday, March 31, 2010

Page 5: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

EnrollmentClass will be limited to 60 students40 Graded, 20 Pass/No Credit

You MUST fill out a survey to be consideredhttp://tinyurl.com/cs193p-spring-2010Needs to be completed by noon tomorrow!

If oversubscribed, class will be filled by ...ExperienceQuarters remaining to graduationMajorOther (be sure to share any other interesting info)

Auditors welcome!

Wednesday, March 31, 2010

Page 6: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

iPhone SDK

Free!Thru iPhone Developer University ProgramNo beta SDKs, so no iPad for now :(No uploading to the AppStoreYou can always join the normal iPhone Developer Program: $99

You will be sent an invitation to your sunetidWill only be sent after you fill out aforementioned survey Follow the directionsDownload the SDK to your MacWe need the UDID of any device you’re going to use (even loaners)Valid through the end of the quarter

Wednesday, March 31, 2010

Page 7: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

iTunes U

Not on iTunesU this quarter.

Class is quite different this quarterEspecially the first 6 to 8 lectures.

Old iTunesU is not a substitute for coming to class!You’ll be lost on the homework assignments

Wednesday, March 31, 2010

Page 8: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

CommunicationE-mailQuestions are best sent to [email protected] directly to instructor or TA’s risks slow response.Sorry, but we cannot take questions from auditors (too swamped).

Web SiteVery Important!http://cs193p.stanford.eduAll lectures, assignments, code, etc. will be there.This site will be your best friend when it comes to getting info.

ExternalGoogle Group http://cs193p.com (auditors’ group)http://developer.apple.comhttp://devforums.apple.com

Wednesday, March 31, 2010

Page 9: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

What will I learn?How to build cool apps!Arguably the coolest application development platform in the world.

Real-life Object-Oriented ProgrammingOOP is at the heart of the Cocoa Touch APIWe’ll also cover a lot of “design concepts” in OO systems

Other CS ConceptsDatabasesGraphicsMediaAnimationEmbedded System Performance (incl. multi-threading)Network ProgrammingMuch, much more!

Wednesday, March 31, 2010

Page 10: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Homework Projects

CalculatorFirst part will be simply to recreate Wednesday’s demoSecond part will be to add a few featuresLearn: Intro to Xcode, IB, Objective-C, MVC

PolygonDraw and control the properties of a graphical shapeLearn: Memory Management, Objective-C PropertiesLearn: Creating Custom Graphical Views

SPoT (Stanford Photo Tour)An online photographic reference guide to StanfordDisplays, searches and manages a large amount of dataLearn: Navigation, Tables, Core Data, Threading, Maps, more ...

Wednesday, March 31, 2010

Page 11: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Core OSOSX Kernel

Mach 3.0

BSD

Sockets

Security

Power Management

Keychain Access

Certificates

File System

Bonjour

iPhone OSCocoa Touch

Media

Core Services

Core OS

Wednesday, March 31, 2010

Page 12: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Core ServicesCollections

Address Book

Networking

File Access

SQLite

Core Location

Net Services

Threading

Preferences

URL Utilities

iPhone OSCocoa Touch

Media

Core Services

Core OS

Wednesday, March 31, 2010

Page 13: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

MediaCore Audio

OpenAL

Audio Mixing

Audio Recording

Video Playback

JPEG, PNG, TIFF

PDF

Quartz (2D)

Core Animation

OpenGL ES

iPhone OSCocoa Touch

Media

Core Services

Core OS

Wednesday, March 31, 2010

Page 14: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Cocoa TouchMulti-Touch

Accelerometer

View Hierarchy

Localization

Controls

Alerts

Web View

Map Kit

Image Picker

Camera

iPhone OSCocoa Touch

Media

Core Services

Core OS

Wednesday, March 31, 2010

Page 15: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Platform Components

Tools

Language

Frameworks

Design Strategies

[display setTextColor:[UIColor blackColor]];

Foundation UIKit

MVC

Core D

ata

Map Kit

Xcode

Interface Builder

Instruments

Wednesday, March 31, 2010

Page 16: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Model View Controller

Model View

Controller

Objects in Your Program

Wednesday, March 31, 2010

Page 17: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Model View Controller

Model View

Controller

Could Be Groups of Objects

Wednesday, March 31, 2010

Page 18: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Model View Controller

Model View

Controller

Wednesday, March 31, 2010

Page 19: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Model View Controller

Model View

ControllerDelegationNotification

KVC

DelegationNotification

KVC

DelegationNotification

KVC

Wednesday, March 31, 2010

Page 20: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Wednesday

Overview of Development EnvironmentObjective-CInterface BuilderXcodeMVC (Model-View-Controller) Example

DemonstrationFrom-scratch development of a calculatorWe’ll go over every line of code

Wednesday, March 31, 2010

Page 21: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Next WeekMore Objective-CLanguage Syntax (properties, enumeration)Foundation Classes: NSString, NSArray, NSNumber, etc.Dynamic and Static TypingSelectorsMemory Management

More Interface Builder and XcodeControls other than UIButton and UILabelCursory overview of the debugger

Views and Drawing

Wednesday, March 31, 2010

Page 22: Lecture 1#-(Logistics, iPhone OS Overview, MVC)

Remember

Fill out the Survey by tomorrow noon!http://tinyurl.com/cs193p-spring-2010

Wednesday, March 31, 2010