Top Banner
Windows 8 Store Application Development Using HTML5 and JavaScript www.netcomlearning.com Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT
43

Windows 8 Store Application Development Using HTML5 and JavaScript Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Dec 24, 2015

Download

Documents

Brett Heath
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Windows 8 Store Application Development Using HTML5 and

JavaScript

www.netcomlearning.com

Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT

Page 2: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Today’s Content

Charms and Contracts

The Search Contract• The Share Contract• Tiles• Badge Notifications• Configuring for Deployment• Deploying to the Windows Store

www.netcomlearning.com

Page 3: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Charms

www.netcomlearning.com

•Windows 8 has five charms:• Search: Look for files, settings, and apps on the computer, as well as search within apps• Share: Share content between apps• Start: Suspends active app and displays the Start screen• Devices: Send data and documents to external devices• Settings: View app information and change preferences

Page 4: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Contracts

• A Windows 8 contract is an agreement between the app and Windows– Apps that implement contracts make use of

operating system support• Contracts are declared in the app manifest,

Package.appxmanifest• Simplifies interactions between apps– Abstracts the implementation details of other apps– Reduces the number of integration scenarios

www.netcomlearning.com

Page 5: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

The Search Contract

www.netcomlearning.com

•Users can search your app from the Search pane if you implement the Search contract• Add Search to the list of declarations in the app manifest

• Apps can provide search query suggestions and result suggestions

Page 6: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Search Suggestions

www.netcomlearning.com

• Search suggestions help users discover what your app has to offer• Search suggestions are auto-

completions of the query• Result suggestions are direct links

to an app page

• Only the first five suggestions are shown in the search pane

Page 7: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Search Activation

www.netcomlearning.com

• The app is chosen from the search pane• This is called main view activation because the app is in the

foreground

• The app’s constructor is called, but OnLaunched is not• Add event listener to the activated function in your WinJS.Application object

Page 8: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Share Source Contract

www.netcomlearning.com

Source App

Share Broker

Target App

Registers DataRequested event handler with the DataTransferManager

Receives event and fills DataPackage in event handler

The user selects “Share.” The active app is sent a DataRequested event

Filters list of target apps and QuickLinks

Processes the contents of DataPackage

User selects target app or QuickLink

Activates the target app in a hosted view

Reports CompleteRecords a QuickLink if the target app returned one

Activated for sharing

DataPackage lives in source app

At installation, registers as ShareTarget

through manifest declaration

Windows 8 provides a framework for apps to share content with other apps

The Share Target contract is declared in the manifest, unlike the Share Source contract.

Page 9: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Shared Data Types

• Supported data formats are: text, URI, bitmap, HTML, StorageItems, and RTF– By using StorageItems you can transfer objects of

any class that implements the IStorageItem interface, including files

• You can share with a custom format– You are responsible for converting objects to byte

streams and back (serialization/deserialization

www.netcomlearning.com

Page 10: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

The Share Target Contract

• To be listed in the Share pane, an app must declare itself a Share Target in the manifest

• The app must support at least one data format or file type

• The app must provide a sharing UI

www.netcomlearning.com

Page 11: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Share Target Activation

• Share target activation means that the app must supply a hosted view UI

• In the ready event handler, you should check the activation type:– Windows.ApplicationModel.Activation.Activation

Kind.shareTarget activation type indicates that the app was activated for share

– The options parameter of the ready function will contain the shareOperation object which contains all shared data

www.netcomlearning.com

Page 12: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Polls

www.netcomlearning.com

Page 13: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Demo

• Implementing the search contract

www.netcomlearning.com

Page 14: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Tile Templates

www.netcomlearning.com

Page 15: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Updating Tiles Locally

www.netcomlearning.com

<tile> <visual> <binding template="TileWidePeekImageCollection03"> <image id="1" src="image1.png" alt="alt text"/> <image id="2" src="image2.png" alt="alt text"/> <image id="3" src="image3.png" alt="alt text"/> <image id="4" src="image4.png" alt="alt text"/> <image id="5" src="image5.png" alt="alt text"/> <text id="1">Lorem ipsum dolor Ame Consectetur adipiscing</text> </binding> </visual> </tile>

Page 16: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Badge Notifications

www.netcomlearning.com

Number of unread email messages

Number of apps awaiting download

Numeric badge

Glyph badge

Page 17: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Creating a Badge Notification

var badgeXml = Notifications.BadgeUpdateManager.getTemplateContent(Notifications.BadgeTemplateType.badge Number); var badgeAttributes = badgeXml.getElementsByTagName("badge"); badgeAttributes[0].setAttribute("value", "58"); // Create a badge notification from the XML content. var badgeNotification = new Notifications.BadgeNotification(badgeXml); // Send the badge notification to the app's tile. Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication().update(badgeNotificat ion);

www.netcomlearning.com

Page 18: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Demo

• Implementing Tiles

www.netcomlearning.com

Page 19: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Application UI

• Use the application UI section to customize basic visual features of the app– Basic information

• Display name, description, language– Tile

• Background images for three tile sizes• Background color

– Notifications• Toasts, lock screen notifications

– Splash screen• Image file or image resource• Background color

www.netcomlearning.com

Page 20: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Demo

• Application UI

www.netcomlearning.com

Page 21: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Capabilities Section

• The Capabilities section defines which system features or devices Windows allows your app to use– Internet (client, client and server)– User’s documents, pictures, music, and video libraries– Webcam and microphone– Location information– Removable storage

• Check only capabilities that your app requires• Special capabilities are available only to apps published under

company accounts• General capabilities are available to every account

www.netcomlearning.com

Page 22: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Declarations Section

• Declarations section defines specific functionalities that your app provides– Contracts are functionalities that your app declares it provides when

interacting with other apps• Cached file updater, file open picker, file save picker, search, share target

– Extensions are functionalities that your app declares it provides when interacting with Windows• AutoPlay, camera settings, contact picker, game explorer, and more

– Declarations have properties that describe their use by the app• Some are required for the project to build

www.netcomlearning.com

Page 23: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Packaging Section

• Packaging section lets you specify the identity of the app– Name and display name– Store logo

• Represents the app in the Windows Store

– Version• [Major].[Minor].[Build].[Revision]

– Certificate• Test certificate automatically generated by Visual Studio• Store certificate generated when packages are created for

upload to the store

– Publisher display name

www.netcomlearning.com

Page 24: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Demo

• Capabilities• Declaration• Packaging

www.netcomlearning.com

Page 25: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

The Windows Store

• Submitting apps to the Windows Store requires a Windows Store developer account– Annual payment required to remain active– Linked with a Microsoft account– Two kinds of developer accounts

• Individual• Company

• Manage your store account and app submissions on the dashboard– Update your developer profile, submit apps, view and edit apps in

progress, view and update apps in the store, explore store trends, and view a financial summary

www.netcomlearning.com

Page 26: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

The Publishing/Certification Process

• Use the Windows Store dashboard to submit apps for certification and publishing– Complete all parts of the submission: app name,

selling details, advanced features, age rating and rating certificates, cryptography, packages, description, and notes to testers

• Before submitting an app for certification– Make sure that the app meets all requirements for

a Windows Store app– Check technical compliance by using the Windows

app Certification Kitwww.netcomlearning.com

Page 27: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Store Certification Requirements

• Windows Store apps must meet some minimum requirements to be accepted for publishing

• Generally, apps must:– Provide value to the customer– Be more than just ads or websites– Behave predictably– Put the customer in control– Be appropriate for a global audience– Be easily identified and understood

• This is an incomplete list. Not meeting any requirement will result in certification failure.

www.netcomlearning.com

Page 28: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Store Tools

• Visual Studio provides store tools to help with app publishing– Found on the STORE menu or by right-clicking a project and

selecting the Store submenu– Most important options are Associate App with the Store

and Create App Packages• Associating an app with the store links the project on a

development computer with the store’s app submission• The app package is the .appxupload file that has the correct

certificate so that you can upload to the store

– Other options help with your developer account, reserving app names, capturing screen shots, and uploading packages to the store

www.netcomlearning.com

Page 29: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an app to the Windows Store

• Manage your app submissions from the Windows Store Dashboard:

www.netcomlearning.com

Page 30: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an App: App Name

Page 31: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an AppSelling Details

Page 32: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an AppAdvanced Features

www.netcomlearning.com

Page 33: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an AppAge Rating and Rating Certificates

Page 34: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an AppCryptography

www.netcomlearning.com

Page 35: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an AppPackages

www.netcomlearning.com

Page 36: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an AppDescription

www.netcomlearning.com

Page 37: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Submitting an AppNotes to Testers

www.netcomlearning.com

Page 38: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Windows 8 EnterpriseApp Deployment

www.netcomlearning.com

• Enterprise app deployment means deploying apps within an organization instead of to the general public• Enterprise apps should:• Pass WACK tests• Have correct manifests• Be certified• Meet your organization’s software requirements

• The certificate must come from a certification authority trusted by the target computers• Target computers must enable side-loading

Page 39: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Upcoming Webinars • Free Webinar: Windows 8 Development - HTML5 with Live Demo• Free Webinar: Windows Server 2012 DHCP & Data Duplication• Webinar: Windows 8 HTML5 Apps with Azure Backends | Live Demo• Free Webinar: Windows Server 2012 and Windows 8: Better Together• Free Webinar: Java 7 Certification | JDBC & Related Design Pattern• Free Webinar: Transition | Microsoft Office 2003 to Office 2010 | Outlook & Access• Free Webinar: Microsoft Dynamics CRM | A New Way to Work Together

Sign up for free at: www.netcomlearning.com/webinars

www.netcomlearning.com

Page 40: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

MCSD: Windows Store Apps

www.netcomlearning.com

*Free Second Shot Exam is Back (Expires May 31st, 2013)

Page 41: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

Upgrade Paths

www.netcomlearning.com

Page 42: Windows 8 Store Application Development Using HTML5 and JavaScript  Judy McNeil BSCS MCAD MCSD MCTS MCTIP MCT.

MCSD: Windows Store Apps Using C#Classes

MCSD: Windows Store Apps Using HTML5• 20480: Programming in HTML5 with JavaScript and CSS3• 20481: Essentials of Developing Windows Store Apps using HTML5 and JavaScript• 20482: Advanced Windows Store Apps Development using HTML5 and JavaScript

Upcoming Class:• April 29th in New York City & Live Online• June 24th in New York City & Live Online

Locations: Attend in-class or Live Online Instructor-led• New York• Las Vegas (All Inclusive Travel Package)• Arlington VA• Philadelphia, PA

www.netcomlearning.com