SlideShare a Scribd company logo
1 of 26
Download to read offline
Metro UI: A deep dive
Session 2
2© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
What we’ll cover:
Application
Model
Collaboration
between apps
Development
and execution
model changes
Deep-Dive into developing real world capital market apps
using WinRT & Metro UI
3© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Running
Not Running
Suspended
Activating Suspending
Terminating
Resuming
Application Model | App Lifecycle
Activated Suspended Terminated
4© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Application Model | State Management
Local
State
Transient State Persistence
Temp
Folder
Local Folder / Settings
Cloud
5© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
// Handle OnLaunched handler of application class and check for previous execution state
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
if(args.PreviousExecutionState == ApplicationExecutionState.Terminated) {
foreach (var item in ApplicationData.Current.LocalSettings.Values)
{
AppSettings.Instance.Settings[item.Key] = item.Value;
} }
}
State Management | Implementation
public App()
{
//Add application suspending handler.
this.Suspending += OnSuspending;
}
// Handler for suspending event
void OnSuspending(object sender, SuspendingEventArgs e)
{
foreach (var item in AppSettings.Instance.Settings)
{
ApplicationData.Current.LocalSettings.Values[item.Key] = item.Value;
}
}
6© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Things to remember…
Save application data when the app is
being suspended
Release exclusive resources and file
handles when the app is being
suspended
Save less data (only as much as you
require) and save as you go
7© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Collaboration between Apps
 Sharing
 Search
 Activation Mechanisms
8© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Collaboration | Sharing
9© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Sharing | Manifest Declaration Target Application
10© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Sharing | Prepare Data in Source Application
// Prepare data to share in DataRequested handler
void DataRequested(DataTransferManager sender, DataRequestedEventArgs e)
{
// Set context information about sharing.
e.Request.Data.Properties.Title = "Orders Manager";
e.Request.Data.Properties.Description = "Order Details for " + orderCount.ToString() + "
order(s)";
// Specify the format and set actual data to be shared with another application.
e.Request.Data.SetData(StandardDataFormats.Html,
OrderItemCollection.ToHTML(_data));
}
// Add handler to Data Requested event of DataTransferManager class.
public OrdersPage()
{
DataTransferManager datatransferManager = DataTransferManager.GetForCurrentView();
// Add handler that gets invoked when sharing starts.
datatransferManager.DataRequested += new TypedEventHandler<DataTransferManager,
DataRequestedEventArgs>(this.DataRequested);
}
11© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Sharing | Consume Data in Target Application
// Add handler for activated event in javascript file.
WinJS.Application.addEventListener("activated",
activatedHandler, false);
// Handle share activation kind, extract data and draw graphs.
function activatedHandler(args) {
if (args.detail.kind ==
Windows.ApplicationModel.Activation.ActivationKind.shareTarget)
{
// Check for Html data format and extract data
if(args.detail.data.contains(Windows.ApplicationMo
del.DataTransfer.StandardDataFormats.html)) {
eventArgs.detail.data.getHtmlFormatAsync().then
(function (htmlFormat)
{ //Draw the charts using the collection } }
}
12© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Sharing | Report Complete in Target Application
// Call report completed on click of close button to report the
completeness of share operation.
function reportCompleted()
{
shareOperation.reportCompleted();
}
13© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Collaboration| Search
14© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Search | Manifest Declaration
15© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Search | In Application Context
// In OrderPage.xaml.cs add handler for QuerySubmitted event of CurrentView’s SearchPane.
public void OrderPage ()
{
// In QuerySubmitted handler navigate user to search result page.
Windows.ApplicationModel.Search.SearchPane.GetCurrentView().QuerySubmitted +=
(sender, queryArgs) =>
PMWorkbench.SearchResultsPage1.Activate(queryArgs.QueryText);
}
// Handle visibility change of search page and add context information about search criteria.
public OrdersPage()
{
// Get search pane for current view and add handler to visibility change.
var searchPane = SearchPane.GetForCurrentView();
searchPane.VisibilityChanged += (sender, args) =>
{
if (args.Visible)
sender.PlaceholderText = "Deal ID /Symbol /Counterparty";
}
}
16© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Search | Handle Activation Kind
// In App.xaml.cs handle OnSearchActivated method of
// application class. This gets invoked by system.
protected override void
OnSearchActivated(Windows.ApplicationModel.Activation.SearchActivatedEvent
Args args)
{
// Navigate user to Search result page with search context.
PMWorkbench.SearchResultsPage1.Activate(args.Query Text);
}
17© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Other Activation Kinds| Protocol Activation
18© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Protocol Activation | Manifest Declaration
19© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
// Prepare a URI with the name of the protocol and the data to
// be passed to the app to be launched
Order Manager
private async void btnAddToWatch_Click(object sender,
RoutedEventArgs e)
{
Uri uri = new Uri(@"watch://" + orderItem.Security);
// Launch the URI
Windows.System.Launcher.LaunchUriAsync(uri);
}
Protocol Activation | Prepare URI in Source App
20© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Protocol Activation | Activation in Target App
// Handle activated event and check for kind = protocol
// Parse data passed along with the protocol
Watch list
protected override void OnActivated(IActivatedEventArgs args)
{
if (args.Kind == ActivationKind.Protocol)
{
var protocolActivatedEventArgs = args as
ProtocolActivatedEventArgs;
if (protocolActivatedEventArgs != null)
OnProtocolActivated(protocolActivatedEventArgs.Uri.
ToString());
}
}
21© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Things to remember…
Use the standard charms and contracts across
apps to provide consistent user experience
Provide contextual information while using
Search and Share charms
Use various application activation mechanisms
to create powerful mash-ups
22© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Development and execution model
changes
 Visual Studio
 .Net Profile
 Application Deployment & Execution Model
23© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Development Changes | Visual Studio
24© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Development Changes | .NET Profile
UI stack moved to WinRT
WCF changes
XML
HTTP
WCF
Serialization
BCL
.NET for Metro Apps
.Net Framework
4.5
Windows
Phone 7.1
.Net for Metro
apps
Silverlight 5
25© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Deployment & Execution Model Changes
Class
Catalog
Extension
Catalog
Deployment
Engine
<Applications>
<Application
Id="App"
StartPage
="default.html">
<VisualElements
DisplayName
="Hello World"
Logo
="imageslogo.png"
Description
="Hello_World"
....
xCopy Deployment will not work
AppContainers - New security model
Capabilities - To access system resources
26© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL
Sharing Perspectives
 Q&A session

More Related Content

Similar to Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)

Android application development
Android application developmentAndroid application development
Android application developmentMd. Mujahid Islam
 
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...Lviv Startup Club
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps runFrederik De Bruyne
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 seriesopenbala
 
04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)TECOS
 
Complete Visibility into Docker Containers with AppDynamics
Complete Visibility into Docker Containers with AppDynamicsComplete Visibility into Docker Containers with AppDynamics
Complete Visibility into Docker Containers with AppDynamicsAppDynamics
 
How to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup MunichHow to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup MunichJürgen Etzlstorfer
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXIMC Institute
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformMicrosoft 365 Developer
 
Hello android world
Hello android worldHello android world
Hello android worldeleksdev
 
Windows Phone 7 Unleashed Session 2
Windows Phone 7 Unleashed Session 2Windows Phone 7 Unleashed Session 2
Windows Phone 7 Unleashed Session 2Wes Yanaga
 
Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCmarcocasario
 
Securing the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank ChaversSecuring the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank ChaversWithTheBest
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidAlberto Ruibal
 
How to integrate flurry in android
How to integrate flurry in androidHow to integrate flurry in android
How to integrate flurry in androidadityakumar2080
 
Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8wsmarouan
 

Similar to Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5) (20)

Reactive Data System
Reactive Data SystemReactive Data System
Reactive Data System
 
Android application development
Android application developmentAndroid application development
Android application development
 
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run#win8aca : How and when metro style apps run
#win8aca : How and when metro style apps run
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 series
 
04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)04 programmation mobile - android - (db, receivers, services...)
04 programmation mobile - android - (db, receivers, services...)
 
Complete Visibility into Docker Containers with AppDynamics
Complete Visibility into Docker Containers with AppDynamicsComplete Visibility into Docker Containers with AppDynamics
Complete Visibility into Docker Containers with AppDynamics
 
How to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup MunichHow to build your own auto-remediation workflow - Ansible Meetup Munich
How to build your own auto-remediation workflow - Ansible Meetup Munich
 
Java Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAXJava Web Programming [8/9] : JSF and AJAX
Java Web Programming [8/9] : JSF and AJAX
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platform
 
Hello android world
Hello android worldHello android world
Hello android world
 
Windows Phone 7 Unleashed Session 2
Windows Phone 7 Unleashed Session 2Windows Phone 7 Unleashed Session 2
Windows Phone 7 Unleashed Session 2
 
Architecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVCArchitecting ActionScript 3 applications using PureMVC
Architecting ActionScript 3 applications using PureMVC
 
Securing the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank ChaversSecuring the Internet of Things - Hank Chavers
Securing the Internet of Things - Hank Chavers
 
Android101
Android101Android101
Android101
 
Best android classes in mumbai
Best android classes in mumbaiBest android classes in mumbai
Best android classes in mumbai
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
 
How to integrate flurry in android
How to integrate flurry in androidHow to integrate flurry in android
How to integrate flurry in android
 
Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)

  • 1. Metro UI: A deep dive Session 2
  • 2. 2© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL What we’ll cover: Application Model Collaboration between apps Development and execution model changes Deep-Dive into developing real world capital market apps using WinRT & Metro UI
  • 3. 3© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Running Not Running Suspended Activating Suspending Terminating Resuming Application Model | App Lifecycle Activated Suspended Terminated
  • 4. 4© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Application Model | State Management Local State Transient State Persistence Temp Folder Local Folder / Settings Cloud
  • 5. 5© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL // Handle OnLaunched handler of application class and check for previous execution state protected override void OnLaunched(LaunchActivatedEventArgs args) { if(args.PreviousExecutionState == ApplicationExecutionState.Terminated) { foreach (var item in ApplicationData.Current.LocalSettings.Values) { AppSettings.Instance.Settings[item.Key] = item.Value; } } } State Management | Implementation public App() { //Add application suspending handler. this.Suspending += OnSuspending; } // Handler for suspending event void OnSuspending(object sender, SuspendingEventArgs e) { foreach (var item in AppSettings.Instance.Settings) { ApplicationData.Current.LocalSettings.Values[item.Key] = item.Value; } }
  • 6. 6© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Things to remember… Save application data when the app is being suspended Release exclusive resources and file handles when the app is being suspended Save less data (only as much as you require) and save as you go
  • 7. 7© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Collaboration between Apps  Sharing  Search  Activation Mechanisms
  • 8. 8© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Collaboration | Sharing
  • 9. 9© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Sharing | Manifest Declaration Target Application
  • 10. 10© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Sharing | Prepare Data in Source Application // Prepare data to share in DataRequested handler void DataRequested(DataTransferManager sender, DataRequestedEventArgs e) { // Set context information about sharing. e.Request.Data.Properties.Title = "Orders Manager"; e.Request.Data.Properties.Description = "Order Details for " + orderCount.ToString() + " order(s)"; // Specify the format and set actual data to be shared with another application. e.Request.Data.SetData(StandardDataFormats.Html, OrderItemCollection.ToHTML(_data)); } // Add handler to Data Requested event of DataTransferManager class. public OrdersPage() { DataTransferManager datatransferManager = DataTransferManager.GetForCurrentView(); // Add handler that gets invoked when sharing starts. datatransferManager.DataRequested += new TypedEventHandler<DataTransferManager, DataRequestedEventArgs>(this.DataRequested); }
  • 11. 11© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Sharing | Consume Data in Target Application // Add handler for activated event in javascript file. WinJS.Application.addEventListener("activated", activatedHandler, false); // Handle share activation kind, extract data and draw graphs. function activatedHandler(args) { if (args.detail.kind == Windows.ApplicationModel.Activation.ActivationKind.shareTarget) { // Check for Html data format and extract data if(args.detail.data.contains(Windows.ApplicationMo del.DataTransfer.StandardDataFormats.html)) { eventArgs.detail.data.getHtmlFormatAsync().then (function (htmlFormat) { //Draw the charts using the collection } } }
  • 12. 12© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Sharing | Report Complete in Target Application // Call report completed on click of close button to report the completeness of share operation. function reportCompleted() { shareOperation.reportCompleted(); }
  • 13. 13© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Collaboration| Search
  • 14. 14© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Search | Manifest Declaration
  • 15. 15© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Search | In Application Context // In OrderPage.xaml.cs add handler for QuerySubmitted event of CurrentView’s SearchPane. public void OrderPage () { // In QuerySubmitted handler navigate user to search result page. Windows.ApplicationModel.Search.SearchPane.GetCurrentView().QuerySubmitted += (sender, queryArgs) => PMWorkbench.SearchResultsPage1.Activate(queryArgs.QueryText); } // Handle visibility change of search page and add context information about search criteria. public OrdersPage() { // Get search pane for current view and add handler to visibility change. var searchPane = SearchPane.GetForCurrentView(); searchPane.VisibilityChanged += (sender, args) => { if (args.Visible) sender.PlaceholderText = "Deal ID /Symbol /Counterparty"; } }
  • 16. 16© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Search | Handle Activation Kind // In App.xaml.cs handle OnSearchActivated method of // application class. This gets invoked by system. protected override void OnSearchActivated(Windows.ApplicationModel.Activation.SearchActivatedEvent Args args) { // Navigate user to Search result page with search context. PMWorkbench.SearchResultsPage1.Activate(args.Query Text); }
  • 17. 17© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Other Activation Kinds| Protocol Activation
  • 18. 18© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Protocol Activation | Manifest Declaration
  • 19. 19© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL // Prepare a URI with the name of the protocol and the data to // be passed to the app to be launched Order Manager private async void btnAddToWatch_Click(object sender, RoutedEventArgs e) { Uri uri = new Uri(@"watch://" + orderItem.Security); // Launch the URI Windows.System.Launcher.LaunchUriAsync(uri); } Protocol Activation | Prepare URI in Source App
  • 20. 20© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Protocol Activation | Activation in Target App // Handle activated event and check for kind = protocol // Parse data passed along with the protocol Watch list protected override void OnActivated(IActivatedEventArgs args) { if (args.Kind == ActivationKind.Protocol) { var protocolActivatedEventArgs = args as ProtocolActivatedEventArgs; if (protocolActivatedEventArgs != null) OnProtocolActivated(protocolActivatedEventArgs.Uri. ToString()); } }
  • 21. 21© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Things to remember… Use the standard charms and contracts across apps to provide consistent user experience Provide contextual information while using Search and Share charms Use various application activation mechanisms to create powerful mash-ups
  • 22. 22© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Development and execution model changes  Visual Studio  .Net Profile  Application Deployment & Execution Model
  • 23. 23© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Development Changes | Visual Studio
  • 24. 24© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Development Changes | .NET Profile UI stack moved to WinRT WCF changes XML HTTP WCF Serialization BCL .NET for Metro Apps .Net Framework 4.5 Windows Phone 7.1 .Net for Metro apps Silverlight 5
  • 25. 25© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Deployment & Execution Model Changes Class Catalog Extension Catalog Deployment Engine <Applications> <Application Id="App" StartPage ="default.html"> <VisualElements DisplayName ="Hello World" Logo ="imageslogo.png" Description ="Hello_World" .... xCopy Deployment will not work AppContainers - New security model Capabilities - To access system resources
  • 26. 26© COPYRIGHT 2012 SAPIENT CORPORATION | CONFIDENTIAL Sharing Perspectives  Q&A session