Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Windows 8 Apps Using JavaScript Jump Start 70-482 Exam Prep Advanced Windows 8 Apps Using JavaScript Jeremy Foster Microsoft Developer Evangelist.

Similar presentations


Presentation on theme: "Advanced Windows 8 Apps Using JavaScript Jump Start 70-482 Exam Prep Advanced Windows 8 Apps Using JavaScript Jeremy Foster Microsoft Developer Evangelist."— Presentation transcript:

1 Advanced Windows 8 Apps Using JavaScript Jump Start 70-482 Exam Prep Advanced Windows 8 Apps Using JavaScript Jeremy Foster Microsoft Developer Evangelist Michael Palermo Microsoft Technical Evangelist

2 Meet Jeremy Foster | @codefoster Microsoft Technical Evangelist – Industry experience in education, aerospace manufacturing, insurance Passion for informing and inspiring software developers to write code and to “write it right” – www.codefoster.com – codeshow.codeplex.com – aka.ms/cssbook

3 Meet Michael Palermo | @palermo4 Microsoft Technical Evangelist – Prior to Microsoft, served as a Microsoft Regional Director, MVP, and Microsoft “insider” on a wide variety of technologies Passion for HTML, CSS, JavaScript, and all things Windows 8 – http://aka.ms/palermo4 – http://aka.ms/70-482

4 Accelerated Certification Prep Jump Start Fast-paced, real-world scenario approach No hands-on labs provided codeshow.codeplex.com Download demo code from codeshow.codeplex.com aka.ms/codeshowapp Download the Windows 8 app at aka.ms/codeshowapp

5 Jump Start Target Agenda Advanced Windows 8 Apps Using JavaScript (Exam 70-482 prep) Module 1: Background Tasks and Components Creating and consuming background tasks and components to make your code more reusable Module 2: Hardware and Sensors Capturing media from the camera and microphone, discovering what the device is capable of, and reading from the various hardware sensors. Module 3: Printing and PlayTo Implementing the printing and PlayTo contracts and understanding the push notification system for doing live tile updates and more. MEAL BREAK Module 4: Animations, Custom Controls, and Globalization Facilitating good UI responsiveness for a fast and fluid experience, implementing animations and transitions, creating custom WinJS controls, and building in globalization/localization for broader reach. Module 5: Data, Files, and Encryption Designing and implementing data caching, saving and retrieving files from the file system, and securing application data. Module 6: Deployment Adding trial functionality, handling errors, implementing a test strategy, and designing a diagnostic and monitoring strategy.

6 codeSHOW app at aka.ms/codeshowapp codeshow.codeplex.com git clone https://git01.codeplex.com/codeshow installation of packages requires Windows 8 and VS2012

7 Advanced Windows 8 Apps Using JavaScript Jump Start 70-482 Exam Prep M1: Background Tasks and Components Jeremy Foster Microsoft Developer Evangelist Michael Palermo Microsoft Technical Evangelist

8 Jump Start Target Agenda Advanced Windows 8 Apps Using JavaScript Module 1: Background Tasks and Components Module 2: Hardware and Sensors Module 3: Printing and PlayTo MEAL BREAK Module 4: Animations, Custom Controls, and Globalization Module 5: Data, Files, and Encryption Module 6: Deployment

9 Module Agenda Create background tasks Consume background tasks Integrate WinRT components into a solution ˃ ˃

10 What is a background task? Run code even if the app is not running

11 Features already available Windows push notifications Playback Manager for audio in background Background transfer API for upload/download files Share contracts

12 Appropriate scenarios for background task? Downloading new content for app (such as mail) Show toast notification (such as a chat request) Updating service with change (such as user present) Not appropriate? Exhaustive work-loads Anything requiring user interaction

13 How to create a background task Create a javascript worker file Implement task behaviors in worker file Register background task Declare background task in application manifest

14 task.js // this file runs in context of WorkerGlobalScope (function () { // importScripts is method of WorkerGlobalScope importScripts( “//Microsoft.WinJS.1.0/js/base.js”, “/js/app.js” ); // do work here, possibly using code from /js/app.js // close is a method of WorkerGlobalScope close(); })();

15 WebUIBackgroundTaskInstance (function () { // imports // access background task via current property var currentTask = WebUIBackgroundTaskInstance.current; // instanceId, progress, succeeded // getDeferral for async calls within task // canceled event handler // close })();

16 BackgroundTaskBuilder // create “namespace” var back = Windows.ApplicationModel.Background; // create instance of BackgroundTaskBuilder var builder = back.BackgroundTaskBuilder(); builder.name = “task name”; builder.taskEntryPoint = “js\\task.js”; builder.setTrigger(new back.TimeTrigger(15, false)); // register the task builder.register();

17 package.appxmanifest - Declarations

18 Module Agenda Create background tasks Consume background tasks Integrate WinRT components into a solution ˃ ˃

19 How tasks are triggered

20 Tasks can have conditions

21 Triggers that require lock screen * SessionConnected, UserPresent, UserAway, and ControlChannelReset

22 BACKGROUND TASKS: CONSUMING demo

23 Module Agenda Create background tasks Consume background tasks Integrate WinRT components into a solution ˃ ˃

24 What’s a component? JavaScriptC# WinRT

25 Why components? Performance Modularity Code reuse Language preference

26 Language projections

27 CODESHOW: COMPONENTS demo

28 Summary Create background tasks Consume background tasks Integrate WinRT components into a solution

29


Download ppt "Advanced Windows 8 Apps Using JavaScript Jump Start 70-482 Exam Prep Advanced Windows 8 Apps Using JavaScript Jeremy Foster Microsoft Developer Evangelist."

Similar presentations


Ads by Google