You are on page 1of 22

CS193p

Spring 2010

Wednesday, March 31, 2010


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

Office Hours
TBD

Homework
7 Weekly Assignments
Assigned 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


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

Instance
A manifestation of a Class. Often interchangeable with “Object”.

Message
What you send to an Object to get it to do something.
Method
The code that is invoked when you send an Object a Message.
Instance Variable
A storage location each Instance has. Is often a pointer to another Object.

Inheritance / Superclass / Subclass


The process by which a Class gets functionality from another Class.
A Subclass Inherits functionality from its Superclass.
Protocol
A 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


Requirements
Prerequisite: CS106
Object-Oriented Programming

You need access to a Mac!


Intel-based (not PowerPC) Macintosh
Mac OSX 10.5 Leopard (or later)
iPhone SDK is not available on the cluster computers currently

iPhone/iPod Touch (iPad?)


NOT Required
Homework to be done on iPhone Simulator
Loaner iPod Touches (sorry no iPads or iPhones) available

No “Textbook”
Documentation is built into Developer Tools

Wednesday, March 31, 2010


Enrollment
Class will be limited to 60 students
40 Graded, 20 Pass/No Credit

You MUST fill out a survey to be considered


http://tinyurl.com/cs193p-spring-2010
Needs to be completed by noon tomorrow!

If oversubscribed, class will be filled by ...


Experience
Quarters remaining to graduation
Major
Other (be sure to share any other interesting info)

Auditors welcome!

Wednesday, March 31, 2010


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

You will be sent an invitation to your sunetid


Will only be sent after you fill out aforementioned survey
Follow the directions
Download the SDK to your Mac
We need the UDID of any device you’re going to use (even loaners)
Valid through the end of the quarter

Wednesday, March 31, 2010


iTunes U

Not on iTunesU this quarter.

Class is quite different this quarter


Especially 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


Communication
E-mail
Questions are best sent to cs193p@cs.stanford.edu
Sending directly to instructor or TA’s risks slow response.
Sorry, but we cannot take questions from auditors (too swamped).

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

External
Google Group http://cs193p.com (auditors’ group)
http://developer.apple.com
http://devforums.apple.com

Wednesday, March 31, 2010


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

Real-life Object-Oriented Programming


OOP is at the heart of the Cocoa Touch API
We’ll also cover a lot of “design concepts” in OO systems

Other CS Concepts
Databases
Graphics
Media
Animation
Embedded System Performance (incl. multi-threading)
Network Programming
Much, much more!

Wednesday, March 31, 2010


Homework Projects
Calculator
First part will be simply to recreate Wednesday’s demo
Second part will be to add a few features
Learn: Intro to Xcode, IB, Objective-C, MVC

Polygon
Draw and control the properties of a graphical shape
Learn: Memory Management, Objective-C Properties
Learn: Creating Custom Graphical Views

SPoT (Stanford Photo Tour)


An online photographic reference guide to Stanford
Displays, searches and manages a large amount of data
Learn: Navigation, Tables, Core Data, Threading, Maps, more ...

Wednesday, March 31, 2010


iPhone OS
Core OS
Cocoa Touch
OSX Kernel Power Management
Media Mach 3.0 Keychain Access
BSD Certificates
Core Services
Sockets File System
Core OS Security Bonjour

Wednesday, March 31, 2010


iPhone OS
Core Services
Cocoa Touch
Collections Core Location
Media Address Book Net Services
Networking Threading
Core Services
File Access Preferences
Core OS SQLite URL Utilities

Wednesday, March 31, 2010


iPhone OS
Media
Cocoa Touch
Core Audio JPEG, PNG, TIFF
Media OpenAL PDF
Audio Mixing Quartz (2D)
Core Services
Audio Recording Core Animation
Core OS Video Playback OpenGL ES

Wednesday, March 31, 2010


iPhone OS
Cocoa Touch
Cocoa Touch
Multi-Touch Alerts
Media Accelerometer Web View
View Hierarchy Map Kit
Core Services
Localization Image Picker
Core OS Controls Camera

Wednesday, March 31, 2010


Platform Components
Interface Builder
Tools s
t r u m e nt
Xcode In s

Language [display setTextColor:[UIColor blackColor]];

ata
D
re
Co
Ma
Frameworks p
Kit
Foundation UIKit

Design Strategies MVC


Wednesday, March 31, 2010
Model View Controller

Controller

Objects in Your Program

Model View

Wednesday, March 31, 2010


Model View Controller

Controller

Could Be Groups of Objects

Model View

Wednesday, March 31, 2010


Model View Controller

Controller

Model View

Wednesday, March 31, 2010


Model View Controller
Delegation
Notification
KVC

Controller
Delegation
Notification
KVC

Model View

Delegation
Notification
KVC
Wednesday, March 31, 2010
Wednesday

Overview of Development Environment


Objective-C
Interface Builder
Xcode
MVC (Model-View-Controller) Example

Demonstration
From-scratch development of a calculator
We’ll go over every line of code

Wednesday, March 31, 2010


Next Week
More Objective-C
Language Syntax (properties, enumeration)
Foundation Classes: NSString, NSArray, NSNumber, etc.
Dynamic and Static Typing
Selectors
Memory Management

More Interface Builder and Xcode


Controls other than UIButton and UILabel
Cursory overview of the debugger

Views and Drawing

Wednesday, March 31, 2010


Remember

Fill out the Survey by tomorrow noon!


http://tinyurl.com/cs193p-spring-2010

Wednesday, March 31, 2010

You might also like