Presentation is loading. Please wait.

Presentation is loading. Please wait.

Wednesday 2-4, KH 105 COMP 446 / ELEC 446 Mobile Wireless Services Project Scott Cutler Professor in the Practice of Computer Technology Department of.

Similar presentations


Presentation on theme: "Wednesday 2-4, KH 105 COMP 446 / ELEC 446 Mobile Wireless Services Project Scott Cutler Professor in the Practice of Computer Technology Department of."— 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 9/16/09

2 Today’s Agenda Events of the week Announcements / Infrastructure Updates Memory Management Review Last Week’s assignments Website 101 Next Week Assignment 3 due by 9/23/2009 SEC - 9/16/09 COMP 446 / ELEC 446 - Week 42

3 Events of the Week Beatles Rockband is a Hoot. TechCrunch50 kicks off: Let the games begin Novell Brings.NET Development to the iPhone Intel reorg spotlights emerging powers Apple hires new general counsel from Intel Smartphones Reduce Mobile Carriers to Dumb Pipes Beware of pricier mobile Internet data plans Samsung Rogue Motorola hopes to Cliq with first Android entry Disruptive Change Predicted for Health IT Market Madden on iPhone Microsoft launches Bing 'Visual Search' Microsoft hopes to turn it around with Zune HD 'Westmere,' 'Jasper Forest' to Top Intel Developer Forum SEC - 9/16/09 COMP 446 / ELEC 446 - Week 43

4 Current Roster Britt Antley ELEC, GR, antley@rice.eduantley@rice.edu Rohan Balsaver ELEC, GR, rbalsaver@rice.edurbalsaver@rice.edu Chris Boyd IT, Chris.Boyd@rice.eduChris.Boyd@rice.edu Hailey Hinson IT, mystand@rice.edumystand@rice.edu Skyler Johnson COMP, JR, Jones, skyj@rice.eduskyj@rice.edu Sandhya Pai ELEC, GR, Sandhya.Pai@rice.eduSandhya.Pai@rice.edu Rick Song SS, Duncan, Rick.Song@rice.eduRick.Song@rice.edu Yiming Wang ELEC, GR, Yiming.Wang@rice.eduYiming.Wang@rice.edu Nick Zhu COMP, SR, Nick.Zhu@rice.eduNick.Zhu@rice.edu SEC - 9/16/09 COMP 446 / ELEC 446 - Week 44

5 COMP 446 Syllabus 8/26/09Introduction / What makes mobile apps special Assignment:Load Visual Studio – Due 9/2/09 9/2/09Intro 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’ DayDiscussion 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/09ASP.Net Videos:Lecture 5 (Views and Drawing, Animations) Lecture 6 (View Controllers Basics) Assignment: HelloPoly II [3] (Due 9/23/09) 9/23/09Creating and Consuming Web Services Videos:Lecture 7 (Navigation Controllers) / Lecture 8 (Table Views) Assignment: Presence 1 (Due 9/30/09) 9/30/09Stanford 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/09SQL 101 Videos:Lecture 11 (Text Input, Responder Chain, Presenting Content Modally) Lecture 12 (Address Book) Assignment: SQL Query (Due 10/14/09) 10/14/09Browser Capabilities Videos:Lecture 13 (Searching, Notifications) / Lecture 14 (Mulittouch) Assignment: Website Leveraging Browser Capabilities (Due 10/21/09) 10/21/09iPhone 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/09Optimizing 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/09Final 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/09Final 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/09Final Project Prep Assignment:Final Project (Due 12/2/2009) 11/25/09Thanksgiving – Continue Final Projects on your own 12/2/09Demonstrate Final Projects 12/6/09Class Offsite – Sunday (tentative) SEC - 9/16/09 COMP 446 / ELEC 446 - Week 45

6 Mechanics Course Website: http://comp446.rice.eduhttp://comp446.rice.edu Moving to http://www.comp446.comhttp://www.comp446.com Course Share: \\comp446.rice.edu\comp446\\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.comwww.LogMeIn.com User ID comp446@scottcutler.comcomp446@scottcutler.com Mac Login: Comp446, passwords given verbally in class SEC - 9/16/09 COMP 446 / ELEC 446 - Week 46

7 Course Web Server http://www.comp446.com Hosted through www.DiscountASP.netwww.DiscountASP.net Login: comp446com0 (zero) Password: same as for other things ftp username: 0093823|comp446com0 (same password) Individual websites created www.comp446.com/wsLast, e.g. www.comp446.com/wsCutler www.comp446.com/wsLastwww.comp446.com/wsCutler MS SQL Server 2008 also setup for class Will pass out credentials during SQL class Let me know if you need earlier access SEC - 9/16/09 COMP 446 / ELEC 446 - Week 47

8 Memory Management Basics Object Creation + alloc and - init methods Objects take space, space allocated with alloc and initialized with init. Object retention The objects maintain a retention count. [object retain] increases that count by 1 [object release] decrease that count by 1 When count reaches 0, [object dealloc] automatically called. Objects retained by other objects need to be released when finished Either when explicitly finished or in the dealloc method Objects which might get released to 0 by others need to be retained SEC - 9/16/09 COMP 446 / ELEC 446 - Week 48

9 Pointers vs. Objects Objects exist in the heap and take up resources Names (id *) point at objects. Their value is a pointer to the real object. Names can be set to nil (0) when they point to nothing Multiple names can point to the same object Copying objects, particularly NSString guarantees they won’t be changed from under you You may cast them as an NSString, but it might be an NSMutableString SEC - 9/16/09 COMP 446 / ELEC 446 - Week 49

10 Instance Variables and Properties Memory Instance variables take up some space int, float, etc store the actual values (NSString *) name saves room for a pointer to an NSString object This space automatically deallocated when the object is deallocated Variables initialized to 0 or nil. This includes pointer objects. Instance variables assigned to objects need to be released during object deallocation OK to message nil objects, not OK to release deallocated objects SEC - 9/16/09 COMP 446 / ELEC 446 - Week 410

11 Autorelease If you know you are finished with an object, release it when finished. It will go away if you are the last reference. If you no longer need the object yourself, but want to pass it to someone else, autorelease the object. If you know you will be done with the object during this run loop but can’t tell where in your code you may finish with it, autorelease the object. If you acquire an autoreleased object and believe you will need it on a different run-loop cycle, retain the object and later release it. SEC - 9/16/09 COMP 446 / ELEC 446 - Week 411

12 Initial Retention Count Objects received through [class alloc] or [class copy] come with a retention count of 1 By convention, all other objects are owned by others and likely come autoreleased They will be automatically destroyed on next wait loop unless otherwise retained SEC - 9/16/09 COMP 446 / ELEC 446 - Week 412

13 - (void) dealloc { } First (optional step) is to run any logic cleanup code Second step is to release any retained objects. [object release], not [object deallocate]. Do not release the deallocated object itself (no [self release]) Final step is to call [super dealloc] SEC - 9/16/09 COMP 446 / ELEC 446 - Week 413

14 Property Memory Management Header options readonly – getter, no setter. Property can not be changed. readwrite (default) – setter and getter assign, retain and copy relate to how setter is coded SEC - 9/16/09 COMP 446 / ELEC 446 - Week 414 -(void)setName: (NSString *)value { if (value != name) { // [name release]; name = value; } -(void)setName: (NSString *)value { if (value != name) { [name release]; name = [value retain]; } -(void)setName: (NSString *)value { if (value != name) { [name release]; name = [value copy]; } assignretaincopy

15 Last Week’s Assignment SEC - 9/16/09 COMP 446 / ELEC 446 - Week 415

16 Website Development 101 Universal way of communicating with any smart phone that has a browser. Dependant on quality of Internet connection. Need to be aware of screen and input limitations Can detect browser and customize experience for particular smart phone With proper JavaScript layer, you can make an application that looks like a real iPhone application without going through iPhone store The server can make richer applications by doing the heavy lifting. It is always on line and has great connectivity SEC - 9/16/09 COMP 446 / ELEC 446 - Week 416

17 Website Basics Interesting client / server model No direct connection between client and server; however protocols and session state help minimize differences The web has evolved Web 1.0 was just delivery of HTML pages displayed statically in browser Has evolved to have significant logic on both client and server Content can be delivered as Entire web page Partial web page (AJAX) No web page (Web service) SEC - 9/16/09 COMP 446 / ELEC 446 - Week 417

18 HTML, XML and JavaScript http://www.w3schools.com/ is a great starting point for all things web related http://www.w3schools.com/ HTML http://www.w3schools.com/tags/default.asphttp://www.w3schools.com/tags/default.asp JavaScript http://www.w3schools.com/js/default.asphttp://www.w3schools.com/js/default.asp XML http://www.w3schools.com/xml/default.asphttp://www.w3schools.com/xml/default.asp Many others http://www.html-reference.com/ SEC - 9/16/09 COMP 446 / ELEC 446 - Week 418

19 .Net Created in 2000, it extends Windows with a higher level framework Driven off an intermediate, Common Language Infrastructure (CLI) Targets include: x86, x64, Windows Mobile and Website Development (ASP.Net) Compilers to CIL/CLR (Common Interface Language)/(Common Language Runtime) from many languages including C# and VB Managed Memory – no alloc, dealloc, GC Integrates security, database interface, extensive libraries Silverlight multimedia and AJAX support Tightly integrated into Visual Studio.Net Great article on Wikipedia - http://en.wikipedia.org/wiki/.NET_Frameworkhttp://en.wikipedia.org/wiki/.NET_Framework Makes many difficult tasks easy. SEC - 9/16/09 COMP 446 / ELEC 446 - Week 419

20 ASP.Net Runs.Net runtime library on the server Set of web controls that execute on the server and send appropriate JavaScript to the browser Manages ViewState Can easily generate or consume web services Integrated configuration files simplify interfaces with email, SQL, authentication, etc. Simple AJAX integration SEC - 9/16/09 COMP 446 / ELEC 446 - Week 420

21 Visual Studio Fully integrated development tool Stand Alone Web Mobile SQL Multiple Languages Deployment and Debugging Integrates with Expression line of advanced web design tools SEC - 9/16/09 COMP 446 / ELEC 446 - Week 421

22 Demo SEC - 9/16/09 COMP 446 / ELEC 446 - Week 422

23 Week 5 Assignments View CS193P Lecture 5 : Views and Drawing, Animations View CS193P Lecture 6 : View Controllers Basics Assignment: HelloPoly II [3] (Due 9/23/09) Note: On LogMeIn, Control Drag does not work as if you were local Introduction to Creating and Consuming Web Services: 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! SEC - 9/16/09 COMP 446 / ELEC 446 - Week 423

24 Final Project To be determined by end of 9 th 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 SEC - 9/16/09 COMP 446 / ELEC 446 - Week 424


Download ppt "Wednesday 2-4, KH 105 COMP 446 / ELEC 446 Mobile Wireless Services Project Scott Cutler Professor in the Practice of Computer Technology Department of."

Similar presentations


Ads by Google