1 / 0

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

danae
Download Presentation

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 9/29/10
  2. Today’s Agenda Events of the week Announcements / Infrastructure Updates Deploying to your device Final Projects SQL 101 Next Week Paparazzi 1 due by 10/05/2010 COMP 446 / ELEC 446 - Week 6
  3. Events of the Week RIM unveils its tablet, the BlackBerry PlayBook Microsoft Delivers Visual Basic Tools for Windows Phone 7 Dev Microsoft's Windows Phone 7 Could Appear on Nokia Phones Windows Phone 7 won't support tethering Verizon CEO Talks Tiered Data Pricing, 4G, iPhone on Verizon New Apple TV starts shipping--will AirPlay work? Xerox PARC: 40 Years in the 'Business of Breakthroughs' If you like Scratch, you'll love App Inventor Facebook, Google Maps Hop Aboard GM's OnStar Cars Segway head dies on scooter in cliff plunge Gates still richest in U.S.; Zuckerberg tops Jobs Facebook CEO's School Donation Comes Before Unflattering Movie Debuts COMP 446 / ELEC 446 - Week 6
  4. Flickr Photo Submissions COMP 446 / ELEC 446 - Week 6
  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 Tara Hong ELEC, SR, Will Rice Seoyeon.Hong@rice.edu Vic Hu ELEC, SR, Wiessmrwho@rice.edu Marcos Hung BIOE, GR Marcos.G.Hung@rice.edu COMP 446 / ELEC 446 - Week 6
  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 Norman Pai ELEC, SR, HanszenNorman.L.Pai@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 6
  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 6
  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 6
  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 6
  10. Running Apps on a Device http://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iphone_development/iOS_Development_Guide.pdf Two Chapters of Note Chapter 6 on Debugging Chapter 5 on Managing Devices and Digital Identities If you have not already done so, send me your device ID and I will register your device. COMP 446 / ELEC 446 - Week 6
  11. Running On Your Device Go To Xcode => Window => Organizer In iOS Development Section, select Provisioning Profiles Select the Automatic Device Provisioning Option via checkbox at top Plug in your device In the DEVICES group, select your device and click ‘Use for Development’ Sign in to your Apple Developer Account. This loads the “Team Provisioning Profile” to your device. Xcode may offer to request development certificate. COMP 446 / ELEC 446 - Week 6
  12. 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 6
  13. 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
  14. 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 6
  15. 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 6
  16. Final Project Website Demo COMP 446 / ELEC 446 - Week 6
  17. 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 6
  18. 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 6
  19. SQL 101 COMP 446 / ELEC 446 - Week 6
  20. SQL Server on the Web SQL = Structured Query Language SQLite for iPhone briefly covered in videos along with Core Data wrapper MS SQL server more powerful than SQLite This will be a brief introduction to SQL on the web Basic SQL syntax Administrating your SQL databases Design mode database operations ASP.Net database code COMP 446 / ELEC 446 - Week 7
  21. Microsoft SQL versions SQL Server 2008 Express Free edition Microsoft SQL Server 2008 Last major version, SQL Server 2008 Current major version, SQL Server 2008 R2 While there are performance and feature differences, they are minor and not significant to COMP/ELEC 446 If needed, class has access to SQL Server 2008 located on a web farm in the cloud COMP 446 / ELEC 446 - Week 7
  22. SQL Documentation SQL Server 2008 Main Page http://www.microsoft.com/sqlserver/2008/en/us/default.aspx Online Documentation (launch point for all versions) http://technet.microsoft.com/en-us/library/bb545450.aspx Microsoft SQL Server 2008 Books Online (October 2009) Download http://www.microsoft.com/downloads/en/details.aspx?FamilyId=765433F7-0983-4D7A-B628-0A98145BCB97&displaylang=en Online Root http://technet.microsoft.com/en-us/library/bb545450.aspx Transact-SQL Reference http://technet.microsoft.com/en-us/library/bb510741.aspx COMP 446 / ELEC 446 - Week 7
  23. SQL Language Elements (from Wikipedia article) Clauses, which are in some cases optional, constituent components of statements and queries. Expressions which can produce either scalar values or tables consisting of columns and rows of data. Predicates which specify conditions that can be evaluated to SQL three-valued logic (3VL) Boolean truth values and which are used to limit the effects of statements and queries, or to change program flow. Queries which retrieve data based on specific criteria. Statements which may have a persistent effect on schemas and data, or which may control transactions, program flow, connections, sessions, or diagnostics. SQL statements also include the semicolon (";") statement terminator. Though not required on every platform, it is defined as a standard part of the SQL grammar. Insignificant whitespace is generally ignored in SQL statements and queries, making it easier to format SQL code for readability. COMP 446 / ELEC 446 - Week 7
  24. Queries (credit Wikipedia) A query includes a list of columns to be included in the final result immediately following the SELECT keyword. An asterisk ("*") can also be used to specify that the query should return all columns of the queried tables. SELECT is the most complex statement in SQL, with optional keywords and clauses that include: The FROM clause which indicates the table(s) from which data is to be retrieved. The FROM clause can include optional JOINsubclauses to specify the rules for joining (relating) tables. The WHERE clause includes a comparison predicate, which restricts the rows returned by the query. The WHERE clause eliminates all rows from the result set for which the comparison predicate does not evaluate to True. COMP 446 / ELEC 446 - Week 7
  25. Queries (credit Wikipedia) The GROUP BY clause is used to project rows having common values into a smaller set of rows. GROUP BY is often used in conjunction with SQL aggregation functions or to eliminate duplicate rows from a result set. The WHERE clause is applied before the GROUP BY clause. The HAVING clause includes a predicate used to filter rows resulting from the GROUP BY clause. Because it acts on the results of the GROUP BY clause, aggregation functions can be used in the HAVING clause predicate. The ORDER BY clause identifies which columns are used to sort the resulting data, and in which direction they should be sorted (options are ascending or descending). Without an ORDER BY clause, the order of rows returned by an SQL query is undefined. COMP 446 / ELEC 446 - Week 7
  26. Transact SQL (MSFT) Select Statement Retrieves rows from the database and enables the selection of one or many rows or columns from one or many tables. The full syntax of the SELECT statement is complex, but the main clauses can be summarized as: [ WITH <common_table_expression>] SELECT select_list [ INTO new_table ] [ FROM table_source ] [ WHERE search_condition ] [ GROUP BY group_by_expression ] [ HAVING search_condition ] [ ORDER BY order_expression [ ASC | DESC ] ] The UNION, EXCEPT and INTERSECT operators can be used between queries to combine or compare their results into one result set. COMP 446 / ELEC 446 - Week 7
  27. Examples SELECT * FROM Production.Product ORDER BY Name; SELECT Name, ProductNumber, ListPrice AS Price FROM Production.Product ORDER BY Name; SELECT p.* FROM Production.Product AS p ORDER BY Name; SELECT Name, ProductNumber, ListPrice AS Price FROM Production.Product WHERE ProductLine = 'R' AND DaysToManufacture < 4 ORDER BY Name; COMP 446 / ELEC 446 - Week 7
  28. Examples SELECT p.Name AS ProductName, NonDiscountSales = (OrderQty * UnitPrice), Discounts = ((OrderQty * UnitPrice) * UnitPriceDiscount) FROM Production.Product AS p INNER JOIN Sales.SalesOrderDetail AS sod ON p.ProductID = sod.ProductID ORDER BY ProductName DESC; SELECT ProductID, SpecialOfferID, AVG(UnitPrice) AS 'Average Price', SUM(LineTotal) AS SubTotal FROM Sales.SalesOrderDetail GROUP BY ProductID, SpecialOfferID ORDER BY ProductID SELECT 'Total income is', ((OrderQty * UnitPrice) * (1.0 - UnitPriceDiscount)), ' for ', p.Name AS ProductName FROM Production.Product AS p INNER JOIN Sales.SalesOrderDetail AS sod ON p.ProductID = sod.ProductID ORDER BY ProductName ASC; SELECT ProductModelID, AVG(ListPrice) AS 'Average List Price' FROM Production.Product WHERE ListPrice > $1000 GROUP BY ProductModelID ORDER BY ProductModelID; COMP 446 / ELEC 446 - Week 7
  29. Examples SELECT ProductID, AVG(UnitPrice) AS 'Average Price' FROM Sales.SalesOrderDetail WHERE OrderQty > 10 GROUP BY ProductID ORDER BY AVG(UnitPrice); SELECT SalesOrderID, CarrierTrackingNumber FROM Sales.SalesOrderDetail GROUP BY SalesOrderID, CarrierTrackingNumber HAVING CarrierTrackingNumber LIKE '4BD%' ORDER BY SalesOrderID ; SELECT ProductID FROM Sales.SalesOrderDetail GROUP BY ProductID HAVING AVG(OrderQty) > 5 ORDER BY ProductID; SELECT ProductID FROM Sales.SalesOrderDetail WHERE UnitPrice < 25.00 GROUP BY ProductID HAVING AVG(OrderQty) > 5 ORDER BY ProductID; COMP 446 / ELEC 446 - Week 7
  30. Examples SELECT ProductID, AVG(OrderQty) AS AverageQuantity, SUM(LineTotal) AS Total FROM Sales.SalesOrderDetail GROUP BY ProductID HAVING SUM(LineTotal) > $1000000.00 AND AVG(OrderQty) < 3; SELECT ProductID, SUM(LineTotal) AS Total FROM Sales.SalesOrderDetail GROUP BY ProductID HAVING COUNT(*) > 1500; SELECT ProductID, Total = SUM(LineTotal) FROM Sales.SalesOrderDetail GROUP BY ProductID HAVING SUM(LineTotal) > $2000000.00; SELECT DISTINCT c.LastName, c.FirstName FROM Person.Contact AS c JOIN HumanResources.Employee AS e ON e.ContactID = c.ContactID WHERE 5000.00 IN (SELECT Bonus FROM Sales.SalesPerson AS sp WHERE e.EmployeeID = sp.SalesPersonID); COMP 446 / ELEC 446 - Week 7
  31. Administrating Your SQL Database View ‘Server Explorer’ in Visual Studio If needed, create a new Data Connection Right Click ‘Data Connections’, select ‘Add connection’ Only one needed for all of your data Microsoft SQL Server, .Net Framework Data Provider for SQL Server Credentials: Provided individually if your final project requires a database COMP 446 / ELEC 446 - Week 7
  32. Design Mode Database Operations Create a connection to your database Drag an ‘SqlDataSource’ object to either Design or Source Window Configure data source If creating a new data source, allow it to add a connection string to your web.config with a common name. Drag a data control such as a GridView to your source window Configure the data control in the design view. COMP 446 / ELEC 446 - Week 7
  33. ASP.Net Database Code Dim xxAdpt As New SqlDataAdapter() Dim xxDS As New DataSet() Dim ConnStr As String = System.Configuration.ConfigurationManager.ConnectionStrings("Comp446_SQL_ConnectionString").ConnectionString Dim strSQL As StringBuilder strSQL = New StringBuilder() strSQL.Append("SELECT email FROM dbo.Students Where Last=‘Cutler’”) Dim xxConn As New SqlConnection(ConnStr) xxAdpt.SelectCommand = New SqlCommand(strSQL.ToString(), xxConn) Dim xxCB As New SqlCommandBuilder(xxsAdpt) Try xxAdpt.Fill(xxDS) If xxDS.Tables(0).Rows.Count <> 0 Then . . . End If Catch exception As Exception lblXX.Text = "SQL Error " & exception.ToString() End Try COMP 446 / ELEC 446 - Week 7
  34. SQL Demo COMP 446 / ELEC 446 - Week 6
  35. 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 6
  36. Week 6 Assignments View CS193P Lecture 9 : Data in Your iPhone App View CS193P Lecture 10 : Performance Assignment: Paparazzi 1 (Due 9/28/10) Classroom Technology: Introduction to Creating and Consuming XML Web Services. 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 6
More Related