Download
wednesday 2 4 kh 105 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Wednesday 2-4, KH 105 PowerPoint Presentation
Download Presentation
Wednesday 2-4, KH 105

Wednesday 2-4, KH 105

72 Vues Download Presentation
Télécharger la présentation

Wednesday 2-4, KH 105

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Wednesday 2-4, KH 105 COMP 446 / ELEC 446 Mobile Wireless Services Project Scott Cutler Professor in the Practice of Computer Technology Department of Computer Science Department of Electrical and Computer Engineering cutler@rice.edu Beatles Day 9/09/09

  2. Today’s Agenda • Events of the week • Announcements / Infrastructure Updates • Apple Speak • Last Week’s assignments • Next Week • Assignments 2a and 2b due by 9/16/2009 COMP 446 / ELEC 446 - Week 3

  3. Events of the Week • Apple Beatle’s Day Announcement • Intel brings faster CPUs to the maintream • Nokia unveils N97 Mini • iPhone will get MMS September 25 • T-Mobile unveils pay-as-you-go Android phone • Apple Store Robbery Took 31 Seconds • Microsoft granted stay of Word injunction • Windows Mobile 6.5 Will Debut on 3 LG Phones • Zune HD Will Stand Alone in Battle with iPod COMP 446 / ELEC 446 - Week 3

  4. Current Roster • Britt Antley • ELEC, GR, antley@rice.edu • Rohan Balsaver • ELEC, GR, rbalsaver@rice.edu • Chris Boyd • IT, Chris.Boyd@rice.edu • Hailey Hinson • IT, mystand@rice.edu • Skyler Johnson • COMP, JR, Jones, skyj@rice.edu • Sandhya Pai • ELEC, GR, Sandhya.Pai@rice.edu • Rick Song • SS, Duncan, Rick.Song@rice.edu • Yiming Wang • ELEC, GR, Yiming.Wang@rice.edu COMP 446 / ELEC 446 - Week 3

  5. COMP 446 Syllabus • 8/26/09 Introduction / What makes mobile apps special • Assignment: Load Visual Studio – Due 9/2/09 • 9/2/09 Intro to Mac OS X and Cocoa Touch, Objective-C, Dev Tools Using Objective-C, Foundation framework • Videos: Skim: Lecture 1 (Intro to Mac OS X and Cocoa Touch, Objective-C, Dev Tools) Skim: Lecture 2 (Using Objective-C, Foundation framework) • Assignment: Hello Rice [1a] and WhatATool 1 [1b] (Due Beatles’ Day) • Beatles’ Day Discussion of first applications • Videos: Lecture 3 (Custom classes, Memory Management, ObjC Properties) Lecture 3a (Intro to XCode and Debugging – pdf only, no video) Lecture 4 (Interface Builder, Controls, Target-Action) • Assignment: WhatATool 2 [2a] and HelloPoly I [2b] (Due 9/16/09) • 9/16/09 ASP.Net • Videos: Lecture 5 (Views and Drawing, Animations) Lecture 6 (View Controllers Basics) • Assignment: HelloPoly II [3] (Due 9/23/09) • 9/23/09 Creating and Consuming Web Services • Videos: Lecture 7 (Navigation Controllers) / Lecture 8 (Table Views) • Assignment: Presence 1 (Due 9/30/09) • 9/30/09 Stanford Final Presentations • Videos: Lecture 9 (Dealing with Data: User Defaults, SQLite, Web Services) Lecture 10 (Threading, Caching and Memory) • Assignment: Presence 2 (Due 10/07/09) • 10/7/09 SQL 101 • Videos: Lecture 11 (Text Input, Responder Chain, Presenting Content Modally) Lecture 12 (Address Book) • Assignment: SQL Query (Due 10/14/09) • 10/14/09 Browser Capabilities • Videos: Lecture 13 (Searching, Notifications) / Lecture 14 (Mulittouch) • Assignment: Website Leveraging Browser Capabilities (Due 10/21/09) • 10/21/09 iPhone Web Apps • Videos: Lecture 15 (Device APIS: Image Picker, Core Location, Accelerometer, Battery Life) Lecture 16 (Bonjour, Streams, Networking) • Assignment: iPhone Web Site (Due 10/28/09) • 10/28/09 Optimizing OpenGL for iPhone (Video 15a) • Videos: Lecture 17 (Audio, Video, Web Views) Lecture 18 (Unit testing, Objective-C fun, Internationalization) • Assignment: SDK 3.0 Feature (Due 11/04/09) • 11/4/09 Final Project Prep • Videos: Lecture 9a (Loren Bricher on Tweetie) Lecture 11a (How to Build an iPhone App that Doesn’t Suck)Assignment: Final Project (Due 12/2/2009) • 11/11/09 Final Project Prep • Videos: Lecture 13a (From Upstart to Startup to Grownup) Lecture 7a (Publishing to the App Store – PDF only) • Assignment: Final Project (Due 12/2/2009) • 11/18/09 Final Project Prep • Assignment: Final Project (Due 12/2/2009) • 11/25/09 Thanksgiving – Continue Final Projects on your own • 12/2/09 Demonstrate Final Projects • 12/6/09 Class Offsite – Sunday (tentative) COMP 446 / ELEC 446 - Week 3

  6. Mechanics • Course Website: http://comp446.rice.edu • Course Share: \\comp446.rice.edu\comp446 • Website Development using Visual Studio • Invitation to Join iPhone Developer Program • Still pending for Skyler, Rohan, Hailey • iPhone Development via Xcode and Interface Builder • All IT supported Macs have tools loaded • Keep files on your shared drive or memory stick • iMac available via www.LogMeIn.com • User ID comp446@scottcutler.com • Mac Login: Comp446 • Passwords given verbally in class COMP 446 / ELEC 446 - Week 3

  7. Course Web Server • http://www.comp446.com • Hosted through www.DiscountASP.net • Login: comp446com0 (zero) • Password: same as for other things • I will create individual websites for each student by 9/16/09 • MS SQL Server 2008 also secured for class • Will pass out credentials during SQL class • Let me know if you need earlier access COMP 446 / ELEC 446 - Week 3

  8. Apple Speak • Strong visions • Loyal followings • Internally consistent • Unique ways to describe standard concepts COMP 446 / ELEC 446 - Week 3

  9. Delegation • Lecture 4 has long, confusing discussion on Delegates • Scott Cutler method to describe delegates • Frameworks contain many classes • Implementation of some classes either require or optionally allow customization / user coding. • Delegates are a set of methods primarily related to a system class • Required methods need to be written to complete class • Optional methods have default actions that can be overridden by the programmer. COMP 446 / ELEC 446 - Week 3

  10. Delegation Examples • applicationDidFinishLoading • applicationWillTerminate • // Required method- (NSInteger)tableView:(UITableView *)tableViewnumberOfRowsInSection:(NSInteger)section; • // Optional method, defaults to 1 if not implemented- (NSInteger)numberOfSectionsInTableView:(UITableView *)table; COMP 446 / ELEC 446 - Week 3

  11. Objective-C Terminology ; Every statement ends with a semicolon + Refers to a method on a Class - Refers to a method on an instance of a Class { } Groups Objective-C statements [ ] [object method OptionalArgs] () Casts an object as a certain Class, Also parameters for C functions * Pointer to an object e.g. *stringVar (** = pointer to *???) : Specifies an argument. Also used in definitions COMP 446 / ELEC 446 - Week 3

  12. Objective-C Terminology @ Prefaces an NSString object or selector. Also many compiler directives (@Interface, @Implementation, @End // Comments . Shortcut to get or set a property # Compiler Directives like #import ! Not (as in !=) += Standard C style arithmetic (Also ++, -=, etc) % typed placeholder in formatted strings == Identity compare COMP 446 / ELEC 446 - Week 3

  13. Objective-C Naming • Case Matters!!! • LastName is not the same as lastName • Tradition has identifiers and methods made of concatenated names with the first name in lower case and the remaining names with an uppercase first letter. • Examples: lastName, openFile, initWithObjects • Compiler will make some things easier when conventions are followed. COMP 446 / ELEC 446 - Week 3

  14. iVars and Properties • Two concepts; often related and often confused • iVars are the instance variables. Space is allocated from the heap when instanced allocated. They are associated with that instance of the object (although they can be objects in the own right) • Properties are readable and/or writeable attributes of a class instance. They can be set to just set or get an iVar. They also can report or change aspects of the instance (e.g. canVote) • Often best to give properties different names from iVars due to visibility scope issues. COMP 446 / ELEC 446 - Week 3

  15. Last Week’s Assignment COMP 446 / ELEC 446 - Week 3

  16. Section 1 - Paths voidPrintPathInfo(){ NSLog(@"Section 1 - Paths"); NSString *path=@"~"; path = [path  stringByExpandingTildeInPath]; NSLog(@"My home folder is at '%@'",path); NSArray *pathComponents = [path pathComponents]; for (NSString *pathElementinpathComponents){ NSLog(@"%@", pathElement);} }//PrintPathInfo COMP 446 / ELEC 446 - Week 3

  17. Section 2 - Processes voidPrintProcessInfo(){ NSLog(@"Section 2 - Processes"); NSString *processName = [[NSProcessInfoprocessInfo] processName]; intprocessID = [[NSProcessInfoprocessInfo] processIdentifier]; NSLog(@"Process Name: '%@' Process ID: '%d'",processName, processID); }//PrintProcessInfo COMP 446 / ELEC 446 - Week 3

  18. Section 3 - URLs voidPrintBookmarkInfo(){ NSLog(@"Section 3 - URLs"); NSMutableDictionary *urlDictionary; urlDictionary= [NSMutableDictionary dictionary]; [urlDictionarysetObject: [NSURL URLWithString:@"http://www.stanford.edu"] forKey: @"Stanford University"]; [urlDictionarysetObject: [NSURL URLWithString:@"http://www.apple.com"] forKey: @"Apple"]; [urlDictionarysetObject: [NSURL URLWithString:@"http://cs193p.stanford.edu"] forKey: @"CS193P"]; [urlDictionarysetObject: [NSURL URLWithString:@"http://itunes.stanford.edu"] forKey: @"Stanford on iTunes U"]; [urlDictionarysetObject: [NSURL URLWithString:@"http://stanfordshop.com"] forKey: @"Stanford Mall"]; for (id key inurlDictionary) { if ([key hasPrefix:@"Stanford"]) { NSLog(@"key: %@, value: %@", key, [urlDictionaryobjectForKey:key]); } } }//PrintBookmarkInfo COMP 446 / ELEC 446 - Week 3

  19. Section 4 – Introspection (creation) voidPrintIntrospectionInfo(){ NSLog(@"Section 4 - Introspection"); NSMutableArray *randomArray; randomArray = [NSMutableArray arrayWithCapacity:8]; [randomArrayinsertObject: [[NSProcessInfoprocessInfo] processName] atIndex:0]; [randomArrayinsertObject:[NSURL URLWithString:@"http://www.stanford.edu"] atIndex:1]; [randomArrayinsertObject:[NSStringlocalizedStringWithFormat:@"%@:  %f\n", @"Cost", 1234.56] atIndex:2]; NSArray *keys = [NSArrayarrayWithObjects:@"key1", @"key2", @"key3", nil]; NSArray *objects = [NSArrayarrayWithObjects:@"value1", @"value2", @"value3", nil]; NSDictionary *dictionary = [NSDictionarydictionaryWithObjects:objectsforKeys:keys]; [randomArrayinsertObject:dictionary atIndex:3]; NSMutableString *muString = @"mutable string1"; [randomArrayinsertObject:muString atIndex:4]; NSString *nonMustring=@"Plain String"; [randomArrayinsertObject:nonMustring atIndex:5]; [randomArrayinsertObject:[NSMutableDictionary dictionaryWithCapacity:6] atIndex:6]; [randomArrayinsertObject:[NSMutableString stringWithCapacity:7] atIndex:7]; [[randomArray objectAtIndex:7]  appendString: @"Help"]; COMP 446 / ELEC 446 - Week 3

  20. Section 4 – Introspection (inspect) for (NSObject *arrayObjectinrandomArray){ NSLog(@"Class name: %@",[[arrayObject class] description]); NSLog(@"Is Member of NSString: %@",[arrayObjectisMemberOfClass:[NSString class]] ? @"YES" : @"NO"); NSLog(@"Is Kind of NSString: %@",[arrayObjectisKindOfClass:[NSString class]] ? @"YES" : @"NO"); if ([arrayObjectrespondsToSelector:@selector(lowercaseString)]){ NSLog(@"Responds to lowercaseString: Yes"); NSLog(@"lowercaseString is : %@",[[arrayObject description] lowercaseString ]); }else{ NSLog(@"Responds to lowercaseString: No"); } NSLog(@"===================================="); } } //PrintIntrospectionInfo COMP 446 / ELEC 446 - Week 3

  21. Final Project • To be determined by end of 9th week • Topic chosen shortly after mid semester break (10/21/09) • Spec finished by 11/04/09 • This is VERY important. If we do not have a great project definition, the most interesting part of the course will suffer. With a great project, this will be an exciting course. • Can be done individually or in pairs • Great if your project could have life after the class finishes COMP 446 / ELEC 446 - Week 3

  22. Week 4 • Assignments • View CS193P Lectures 3 and 4 • Slides Available for CS193P debugging lecture (Section-1-XCodeDebugging + exercises) • Download and complete CS193P Assignments 2a and 2b • 2a – Add a Polygon model to your What-A-Tool project • 2b – First part of your HelloPolly iPhone Application • Use 2b Walkthrough to complete assignment 2b • Contact me BEFORE Tuesday if you request my assistance. • Complete assignments before next class (9/16/2009)) • Note: On LogMeIn, Control Drag does not work as if you were local • Introduction to ASP.Net: • Future • Feel free to get ahead of plan with videos and published assignments • Workload will get harder with each assignment. • We will follow CS193P assignments up to and including Presence 2 • Start thinking about big project • Really – start thinking about big project! COMP 446 / ELEC 446 - Week 3