MCSD: Windows Store Apps

Windows 8 Store Application
Development Using HTML5 and
Judy McNeil
Today’s Content
Charms and Contracts
The Search Contract
The Share Contract
Badge Notifications
Configuring for Deployment
Deploying to the Windows Store
• 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
• Devices: Send data and documents to external
• Settings: View app information and change
• 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,
• Simplifies interactions between apps
– Abstracts the implementation details of other
– Reduces the number of integration scenarios
The Search Contract
• 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
• Apps can provide search
query suggestions and
result suggestions
Search Suggestions
• Search suggestions help users
discover what your app has to offer
Search suggestions are autocompletions of the query
Result suggestions are direct links to an
app page
• Only the first five suggestions are
shown in the search pane
Search Activation
• The app is chosen from the search pane
This is called main view activation because the app is in the
• The app’s constructor is called, but OnLaunched is not
• Add event listener to the activated function in your
WinJS.Application object
Share Source Contract
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.
Source App
DataRequested event
handler with the
Receives event and fills
DataPackage in event
DataPackage lives in
source app
Share Broker
The user selects “Share.”
The active app is sent a
DataRequested event
Filters list of target apps
and QuickLinks
Target App
At installation, registers
as ShareTarget through
manifest declaration
User selects target app or
Activated for sharing
Activates the target app
in a hosted view
Processes the contents of
Records a QuickLink if
the target app returned
Reports Complete
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
The Share Target Contract
• To be listed in the
Share pane, an app
must declare itself a
Share Target in the
• The app must support
at least one data
format or file type
• The app must provide
a sharing UI
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.Activatio
nKind.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
• Implementing the search contract
Tile Templates
Updating Tiles Locally
<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>
Badge Notifications
Number of unread email messages
Number of apps awaiting download
Numeric badge
Glyph badge
Creating a Badge Notification
var badgeXml =
TemplateType.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.
ate(badgeNotificat ion);
• Implementing Tiles
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
• Application UI
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
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
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
• Capabilities
• Declaration
• Packaging
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
– 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
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 Kit
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.
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
Submitting an app
to the Windows Store
• Manage your app submissions from the Windows Store
Submitting an App: App Name
Submitting an App
Selling Details
Submitting an App
Advanced Features
Submitting an App
Age Rating and Rating Certificates
Submitting an App
Submitting an App
Submitting an App
Submitting an App
Notes to Testers
Windows 8 Enterprise
App Deployment
• 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
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 &
Free Webinar: Microsoft Dynamics CRM | A New Way to Work Together
Sign up for free at:
MCSD: Windows Store Apps
*Free Second Shot Exam is Back (Expires May 31st, 2013)
Upgrade Paths
MCSD: Windows Store Apps Using C#
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
1-888-5-NETCOM (563-8266)
[email protected]

similar documents