Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exploring Networked Data and Data Stores Lesson 3.

Similar presentations


Presentation on theme: "Exploring Networked Data and Data Stores Lesson 3."— Presentation transcript:

1 Exploring Networked Data and Data Stores Lesson 3

2 Exam Objective Matrix Skills/ConceptsMTA Exam Objectives Using Data StoresUsing data stores. (2.2) Working with Networked DataWorking with networked data. (2.1)

3 Data Stores Definition –A data repository or container that stores data Database Flat file (like a spreadsheet) Text file Data store items –Objects –May come from multiple sources

4 Example of a Text File as a Flat-File Repository

5 Different Types of Storage Files –Typical application files in Visual Studio IDE C# or Visual Basic (VB) XAML XAP Images –Content (preferred for optimization) –Resource (embedded in the project assembly)

6 Files for a Sample App Written in C#

7 Specifying the Content or Resource Build Action for a File

8 The Properties Window in Solution Explorer The Properties window appears below Solution Explorer by default Properties button

9 Different Types of Storage (continued) Databases –A collection of information organized for convenient access –Many are relational (linked to one another) –Database schema Defines the tables and fields, and the relationship between the two –Microsoft SQL Server

10 A Portion of Code from App.xaml.cs in the Local Database Sample

11 Describing Different Storage Locations Local –Read-only data stored within application Isolated –User-specific stored in special local containers Preferences, e-mail addresses, game scores Remote –On server located on the Internet

12 Local, Isolated, and Remote Storage in Windows Phone OS 7.1 Isolated storage Database Web service XAP Local file Mobile app Internet

13 Local Storage and Isolated Storage Local files (XML, Text, APIs) –May be compiled as content or resource files –Static (read-only) located within application –Dynamic files are located in isolated storage User-specific –Use Isolated storage to save data As key/value pairs In files and folders In a database

14 Remote Storage Data located on a server, accessed by Web services Web service –Proxy between a client (mobile app) and remote storage –Commonly used by mobile apps Windows Communication Foundation (WCF) WCF Data Services (OData services) Windows Azure Services

15 Accessing Native Data and Functionalities Launchers and Choosers (APIs) –Are called within an original application –Temporarily use built-in applications on device –Return the user to the original application Choosers –Can return data to the original application Launchers –Cannot return data to original application

16 A Portion of Code from ForecastPage.xaml.cs in the Weather Forecast Sample

17 Searching in the Code Sample Find in Files button Find All button

18 The Find Results Window

19 Camera Capture Code in a Sample File

20 Handling Offline Situations Occasionally connected application (OCA) –Synchronizes data on client device so information may be used while offline Retrieves data from remote server Stores data locally User can use app and data locally Synchronizes when connection is available

21 DB Accessing and synchronizing with remote database Mobile app Internet SQL Server DB Mobile app Internet SQL Server DB Working offline Data Synchronization and Offline Mode

22 Working with Networked Data Developers must determine –Which type of database engine to use –Where data will be located –How to access data –How to synchronize data –How to optimize app performance and bandwidth

23 A Portion of Code from MainPage.xaml.cs in the Network and Device Information Sample

24 Integrating with Databases Windows Phone 7.1 works with: –Microsoft SQL Server –SQLite –Microsoft SQL Server Compact Edition (SQL CE) Support local databases –Windows Phone 7.1 SDK Includes support for LINQ to SQL –Performs all local SQL-related database tasks –Filters and orders data within database layer

25 Synchronizing and Replicating Data Keeps information up to date on both a server and a mobile device Accomplished through: –Sync Framework Formerly Sync Services for ADO.NET Can exchange data supported by MSF –SQL Server replication Copies and maintains exact copy of data Merge replication used for mobile apps

26 Implementing Data Binding Data binding is a process creating a relationship between a data source and a control (target). –Connects UI to the data displayed –Enables user to modify and save changes Silverlight app data can be bound through: –XAML –C# –VB code

27 A Portion of Code from MainPage.xaml.cs in the Contacts and Calendar Sample App

28 Minimizing Data Traffic Develop app to be contained on the mobile device whenever possible –Three-tier approach Uses a server to check credentials and control bandwidth –Improves app and device performance Limits connection time with remote servers –Reduces bandwidth usage and user’s time spent accessing information

29 Windows Communication Foundation (WCF) Works with Representational State Transfer Protocol (REST) –Exposes resources on the Web that clients can access and use Example: Bing search engine Advantages: –Speed –Safety/security –Supports multiple bindings (including HTTP)

30 Recap Storage Local data Offline data Networked data Data stores Minimizing data traffic


Download ppt "Exploring Networked Data and Data Stores Lesson 3."

Similar presentations


Ads by Google