1 / 33

Wednesday 2-4, KH 105

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 10/06/10. Today’s Agenda. Events of the week

brygid
Télécharger la présentation

Wednesday 2-4, KH 105

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

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 10/06/10

  2. Today’s Agenda • Events of the week • Announcements / Infrastructure Updates • Final Projects • Web Services • Next Week • Paparazzi 2 due by 10/12/2010 COMP 446 / ELEC 446 - Week 7

  3. Events of the Week • Why Facebook should love 'The Social Network' • Apple TV analysis reveals storage space for apps • Google TV Announces Its Programming Partners, but the Top Networks Are Absent • HP Taps Ex-SAP Head Apotheker as CEO, President • Google offers JPEG alternative for faster Web • Verizon to refund up to $90M in bogus data charges • Google Snaps Up BlindType to Keep It from iPhone, iPad • Skype comes to Android 2.1 and above • Microsoft Joins Apple, Oracle in Suing to Impede Android • iPad surpasses DVD player for fastest adoption rate ever of non-phone gadgets • Apple asks for a stay on huge patent penalty • Google: Oracle's Java patent suit invalid • Tough times ahead for hard-drive makers? • Symantec Unveils Mobile Security Plans for Android, iOS COMP 446 / ELEC 446 - Week 7

  4. Windows Phone 7 Seminar COMP 446 / ELEC 446 - Week 7

  5. Current Roster • Julia Botev • COMP, SR, McMurtryJulia.K.Botev@rice.edu • Eric Cheng • COMP, GR eric.cheng@rice.edu • Jesus Cortez • COMP, JR, Jones JesusCortez@rice.edu • Graham De Wit • ELEC, SR, Wiessgraham.dewit@rice.edu • Ashley Herron • ELEC, SR, Martel Ashley.N.Herron@rice.edu • Vic Hu • ELEC, SR, Wiessmrwho@rice.edu • Marcos Hung • BIOE, GR Marcos.G.Hung@rice.edu COMP 446 / ELEC 446 - Week 7

  6. Current Roster (2) • Jin Kim • COMP, GR Kyujin.Kim@rice.edu • Kevin Lin • COMP, SO, McMurtryKevin.S.Lin@rice.edu • Robyn Moscowitz • COMP, JR, McMurtryRobyn.A.Moscowitz@rice.edu • Josh Rykowski • COMP, GR Joshua.Rykowski@rice.edu • Ivan Van • COMP, SR, Will Rice, i.van@rice.edu • Jeff Yeh • ELEC, SR, Hanszenjeff.yeh@rice.edu • Aron Yu • ELEC, SR, HanszenAron.Yu@rice.edu COMP 446 / ELEC 446 - Week 7

  7. Current Roster (3) • Michael Lo • ELEC, GR mlo@rice.edu • Elliot Ng • ELEC, GR elliottng@rice.edu • Rick Manning • COMP, SR, Jones rick.manning@rice.edu • Henry Zhang • ELEC, SR, Jones qz1@rice.edu • Jason Xu • ELEC, SR, Brown jax1@rice.edu • Catherine Elder • ELEC, SR, Hanszencje1@rice.edu • Sid Byrd • Staff sidb@rice.edu • Xiang ‘Jash’ Guo • ELEC, GR xg1@rice.edu COMP 446 / ELEC 446 - Week 7

  8. COMP 446 Syllabus • 8/25/10 Introduction / What makes mobile apps special • Assignment: Load Visual Studio – Due 8/30/10, Access a Mac, Download CS193P materials • 9/1/10 Intro to Mac OS X and Cocoa Touch, Objective-C, Dev Tools, Using Objective-C, Foundation framework • Videos: Lecture 1. Introduction to Mac OS X, Cocoa Touch, Objective-C and Tools (January 5, 2010) Lecture 2. Objective-C and Foundation Framework (January 7, 2010) • Assignment: Hello Rice [1a] and WhatATool 1 [1b] (Due 9/7/10) • 9/8/10 Discussion of first applications • Videos: Lecture 3. Custom Classes, Object Lifecycle, Autorelease, Objective-C Properties (January 12, 2010)Lecture 4. Building an Application; Model, View, Controller; Nib Files; Controls and Target-Action (January 14, 2010) Lecture 4a Xcode, Finding Help, Debugging (January 15, 2010) • Assignment: WhatATool 2 [2a] and HelloPoly I [2b] (Due 9/14/10) • 9/15/10 ASP.Net with a little HTML • Videos: Lecture 5. Views, Drawing, and Animation (January 19, 2010) Lecture 6. Designing iPhone Applications, Model-View-Controller, View Controllers (January 21, 2010) • Assignment: HelloPoly II [3] (Due 9/21/10) • 9/22/10 iPhone (pseudo) Web Apps / Browser Capabilities • Videos: Lecture 7. Navigation & Tab Bar Controllers (January 26, 2010) Lecture 8. Scroll Views and Table Views (January 28, 2010) • Assignment: Time to catch up or move ahead. • 9/29/10 SQL 101 • Videos: Lecture 9. Data in Your iPhone App (February 2, 2010)- Lecture 10. Performance (February 4, 2010) • Assignment: Paparazzi 1 (Due 10/5/10) • 10/6/10Creating and Consuming Web Services • Videos: Lecture 11. Text Input and Presenting Content Modally (February 9, 2010) Lecture 12. Web Views; Locations and Maps (February 11, 2010) • Assignment: Paparazzi 2 (Due 10/13/10) COMP 446 / ELEC 446 - Week 7

  9. COMP 446 Syllabus • 10/13/10iPad Development / iOS 4 • Videos:Lecture 13. Address Book: Putting People in Your App (February 16, 2010) Lecture 14. Touch Events & Multi-touch (February 18, 2010)Lecture 12a: Designing for the iPad (February 12, 2010)Assignment: Final Project Proposal and Paparazzi 3 (Both due 10/19/10 ) • 10/20/10 Android 1 • Videos: Lecture 15. iPhone Device APIs; Location, Accelerometer & Camera; Battery Life & Power Management (February 23, 2010) Lecture 16. Audio APIs, Video Playback, Settings (February 25, 2010) • Assignment: Final Project, Stage 1 (Due 10/26/10) • 10/27/10 Android 2 • Videos: Lecture 17. Bonjour, NSStream, GameKit (March 2, 2010) Lecture 18. Unit Testing; Fun with Objective-C; Localization (March 4, 2010) • Assignment: Advanced Feature App or iPad Application (Due 11/02/10) • 11/3/10 Windows Phone 7, Final Project Prep • Videos: Lecture 19. OpenGL ES Basics (March 9, 2010)Lecture 20. From Student to Startup: Lessons from a CS193P Alumnus (March 11, 2010) • Assignment: Final Project, Stage 2 (Due 11/09/2010) • 11/10/10 iPhone v. Android v. Windows Phone 7 group discussion • Videos: Yelp Monocle (February 6, 2010) Evernote(February 19, 2010) Bump (February 26, 2010) • Assignment: Final Project, Stage 3 (Due 11/16/2010) • 11/17/10 Final Project Prep • Videos: Publishing on the App Store (March 5, 2010) LinkedIn: Important Life Lessons on CoreData & GameKit (March 12, 2010) • Assignment: Final Project (Due 12/01/2010) • 11/24/10 Thanksgiving – Continue Final Projects on your own • 12/1/10 Demonstrate Final Projects • 12/5/10 Class Offsite – Sunday (tentative) COMP 446 / ELEC 446 - Week 7

  10. Final Projects • Major component of this course. • All exercises through Paparazzi 3 designed to prepare you to create a great app. • It would be great if App has a life after the course; however • More important for app to take advantage of unique features of smart, connected devices. COMP 446 / ELEC 446 - Week 7

  11. iPhone Advanced Features • Address Book • Bluetooth • Compass (3Gs) • Custom Animations • Gestures • GPS • Integrated Email • Integrated Movie Camera (3Gs) • Image Picker • Integrated Still Camera • Integrated Web Browser • Internet • Microphone • OpenAL • OpenGL • Playing Movies • Proximity Sensor • Rotation sensor • Multitasking • Local Notifications • Core Motion • iAd • High-Resolution Screen • Game Center COMP 446 / ELEC 446 - Week 7

  12. Final Project Steps • Create Projects and Find a Partner • Projects need to utilize advanced features of smart devices. • Projects need to be approved by 10/19/10 • Full spec by 10/26/10 • Weekly milestones through end of semester • Demonstration of one advanced feature by 11/2 COMP 446 / ELEC 446 - Week 7

  13. Final Project Website • Used to create ideas and find partners • OK to do solo project or predefine partners • As said before, you have choice of project and platform – but projects need pre-approval • Accessed through the secure Final Projects tab of the Assignment Submission website. • www.comp446.com or directly at • http://www.comp446.com/wsAssignments/SecurePages/FinalProjects.aspx COMP 446 / ELEC 446 - Week 7

  14. Available Hardware • 3 iPhones – original, 3G, 3Gs • Wi-Fi or AT&T • 4 Motorola Droids • Wi-Fi or Verizon • 1 Google Nexus One • Wi-Fi, T-Mobile 3G or AT&T EDGE COMP 446 / ELEC 446 - Week 7

  15. Special for Android Students • Obtain Reto Meier’s Professional Android 2 Application Development Book ($34.19 from Amazon) • (ISBN-13: 978-0470565520) • You are encouraged to complete iOS through Paparazzi 3; however • You may replace Paparazzi 2 with Android Hello world app by fully installing environment and initial project from Chapter 2 • You may replace Paparazzi 3 with Android application (see me for details it will be from Chapters 3 - 7) • Replace Advanced feature app with Android Advanced Feature App (from Chapters 8 – 15). COMP 446 / ELEC 446 - Week 7

  16. Paparazzi 1 • Scale to Fill vs. Aspect Fit • Including all resources in your bundle • Universal PhotoListViewController COMP 446 / ELEC 446 - Week 7

  17. Paparazzi 2 • Replaces UINavigationController with UITableViewController • Very common feature of many iOS apps. • Subclass of UIScrollView • UITableViewCell • Very lazy and green • Loaded as needed, Reused • Uses Delegate concept to control what gets displayed • UITableViewDataSource • -(UITableViewCell *)tableView:(UITableView *)tableViewcellForRowAtIndexPath:(NSIndexPath *)indexPath; • Core Data • One time creation of static database (dynamic for Paparazzi 3) • NSFetchedResultsController • – (id)objectAtIndexPath:(NSIndexpath *) indexPath • Consider getting TableView working and then attacking Core Data • Likely to be most difficult assignment of semester • Sample Code onhttp://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2010-winter • Will require a free Flickr key to actually run COMP 446 / ELEC 446 - Week 7

  18. Addressing Homework Load • Register yourself to a final project by next class, 10/13 – big negative if you do not! • Break Paparazzi 2 into two assignments. • Implement Table Views by 10/12 • Implement Core Data by 10/19 • For next week, OK to use static arrays for photos and fake objectAtIndexPath routine • Paparazzi 3 is optional assignment • Necessary but not sufficient for grade of A+ COMP 446 / ELEC 446 - Week 7

  19. Creating and Consuming Web Services COMP 446 / ELEC 446 - Week 7

  20. Web Services • The ability to programmatically access remote servers over a web like interface • The web as a subroutine • The web without a browser COMP 446 / ELEC 446 - Week 7

  21. Two Popular Types • REpresentationalState Transfer (RESTful) • Developed in 2000 by Roy Fielding in his doctoral dissertation. • Interface uses standard HTTP protocols • Lightweight, human readable, no toolkit required • Simple Object Access Protocol (SOAP) • New protocol relying on XML, RPC and HTTP • More of a Client/Server tunnel over HTTP • Easy to use, Rigid (defined), development tools COMP 446 / ELEC 446 - Week 7

  22. RESTFul Example SubMoviesInfo() Dim URL AsNewStringBuilder URL.Append("http://www.example.com/movies.main") URL.Append("?var1=movies") ‘? Followed by key=valueURL.Append("&zip=") ‘& Followed by key=valueURL.Append(tbZip.text) ‘assumes a textbox named zip MovieInfoDS= NewDataSet Try MovieInfoDS.ReadXml(XmlReader.Create(URL.ToString())) IfShowInfoDS.Tables.Count = 0 Then . . . EndIf Catchex AsException . . . EndTry EndSub COMP 446 / ELEC 446 - Week 7

  23. REST Used Extensively by Many • Amazon (Offers both REST and SOAP) • eBay • Facebook • Yahoo! • YouTube COMP 446 / ELEC 446 - Week 7

  24. SOAP with ASP.Net • SOAP is more like a natural subroutine call • Parameters and results have strong data types • Various Discovery services • Development toolkits handle complexity • Many publically available • http://www.webservicex.net/WS/wscatlist.aspx • http://www.xmethods.net • Amazon.com COMP 446 / ELEC 446 - Week 7

  25. Create a Web Service • 2 Steps • Create a Web Services File • Right-Click your web project, select ‘Add New Item’ • Chose Web Service and give it a Name (uses the .asmx extension) • Write your functions • Code placed in App_Code folder under the name.vb file • Functions preceded with the ‘<WebMethod()> _’ tag <WebMethod()> _ Public Function ByTwo(ByValInputValue As Integer) As Integer Return InputValue * 2 End Function COMP 446 / ELEC 446 - Week 7

  26. Consuming a Web Service • 3 Steps to consume a basic web service • Create a reference to the web service in your project • Declare the web service in your function • Call the web service COMP 446 / ELEC 446 - Week 7

  27. Create the Web Reference • Right Click on your project, select Add Web Reference • Enter the URL: www.comp446.com/wsDemo/DemoWebService.asmx • Note the Service found (Hello World and ByTwo) • Give the web reference a name to use inside your program • e.g. default is com.comp446.www • Click ‘Add Reference’ COMP 446 / ELEC 446 - Week 7

  28. Consume the Web Service in a Function • Declare the Web Service • Dim Times2 As New com.comp446.www.DemoWebService • Use the Web Service • lblDoubleValue.Text = Times2.ByTwo(tbInputValue.Text)) COMP 446 / ELEC 446 - Week 7

  29. Demo COMP 446 / ELEC 446 - Week 7

  30. iOS Web Services • JSON – JavaScript Object Notation • Alternative to and lighter version of XML • Freeform “key” : value pairs • Not as secure as some other methods • Improved by native browser JSON • Similar to iOS Property Lists COMP 446 / ELEC 446 - Week 7

  31. Using JSON (Covered in Video 9 and part of Paparazzi 3) • Reading a JSON string into Foundation objects • #import <JSON/JSON.h> • // Get a JSON string from the cloud • NSString *jsonString = [NSStringstringWithContentsOfURL:urlencoding:NSUTFBStringEncodingerror:nil]; • // Parsing will result in Foundation objects • // Top level may be an NSDictionaryor an NSArray • id object = [jsonStringJSONValue]; • Writing a JSON string from Foundation objects • // Create some data in your app • NSDictionary *dictionary = ...; • // Convert into a JSON string before sending to the cloud • jsonString = [dictionary JSONRepresentation]; COMP 446 / ELEC 446 - Week 7

  32. Next Week • Will learn a lot about Table Views. • Paparazzi1 will have you select and display views. The main goal is to great and manipulate views using tab view controllers and custom views. • Paparazzi 2 will introduce table views to Paparazzi and utilize better data storage methods. • Paparazzi 3 will have you fetch data from the web and have you plot location information on a map. COMP 446 / ELEC 446 - Week 7

  33. Week 8 • Assignments • View CS193P Lecture 11 : Text Input and Presenting Content Modally • View CS193P Lecture 12 : Web Views; Locations and Maps Assignment: Paparazzi 2 (Due 10/13/10) morning (12/12 is break) • Classroom Technology: iPad Development / iOS 4.x • Choose final project architecture (iOS, Android or WP7) and let me know, particularly if it is other than iOS. • Register a final project via Assignment website and find a partner COMP 446 / ELEC 446 - Week 7

More Related