SlideShare une entreprise Scribd logo
1  sur  50
Windows Store apps
lessons learned
@andyhammar - andreas.hammar@jayway.com
@chribben - christian.jacobsen@jayway.com
Windows Store
View states
Store
What we’ve done
Navigation
Blend
Touch
What we’ve done
Blend
Design time data
 View model
 Design time view model
 AppBar binding
View model
Design time view model
AppBar binding
View states
Your app must support a snapped layout.
In landscape orientation, your app’s
functions must be fully accessible when the
app’s display size is 1024 x 768. Your app
must remain functional when the customer
snaps and unsnaps the app.
…maintain state, context, and interactivity
What?
Full screen
Filled
Snapped
How?
Design time – define visual states
or
How?
Run time – apply correct visual state
Window.Current.SizeChanged += SizeChanged;
.
.
.
private void SizeChanged(object sndr, WindowSizeChangedEventArgs e)
{
var viewState = ApplicationView.Value;
VisualStateManager.GoToState(this, viewState.ToString(), false);
}
Tips
//When snapped visual state is static, use a page
if (ApplicationView.Value == ApplicationViewState.Snapped)
Frame.Navigate(typeof (MySnappyPage));
Tips
var snappedLeft =
ApplicationView.Value == ApplicationViewState.Snapped &&
Window.Current.Bounds.Left == 0;
Gotcha
Tips
Navigation
App anatomy
Application
Window
Frame
Page
Fundamental navigation
//Plain navigation
Frame.Navigate(typeof (MySuperDuperPage));
//Parameter passing
Frame.Navigate(typeof (DisplayItemPage), itemId);
Fundamental navigation
protected override void OnNavigatedTo(NavigationEventArgs e)
{
int itemId = (int) e.Parameter;
_myViewModel.SelectedItemId = itemId;
.
.
.
}
Fundamental navigation
Frame.CanGoBack
Frame.GoBack()
Frame.CanGoForward
Frame.GoForward()
Frame.Navigated
Frame.Navigating
Frame.NavigationFailed
Frame.NavigationStopped
Helpers
State
Session
State
Frame
State
Frame
State
…
Navigation
State
Page
State
Page
State
Page
State
Navigation
State
Page
State
Page
State
Page
State
App
Tips
Use a background frame for stuff that must survive page switching
Background Frame
Frame
Page
Background Page
Tips
Use caching for improved navigation performance
Gotcha
Parameter passing – you can pass any object….
BUT
The platform only support serializing of basic types
Summary
 Rootframe
 Navigate with simple parameters
 Use caching if app with many pages
Touch
Pointer events
PointerPressed, PointerReleased,
PointerMoved
PointerCanceled, PointerCaptureLost, PointerEntered,
PointerExited, PointerWheelChanged
Pointer events
• e.GetCurrentPoint()
.PointerId
.Properties.IsMiddleButtonPressed
• e.GetIntermediatePoints
Static gestures
• Derived from Pointer-events
 Tapped
 DoubleTapped
 Holding
 RightTapped
• One concurrent event per UI Element
Manipulation gesture events
ManipulationStarted, ManipulationCompleted
ManipulationDelta,
ManipulationInertiaStarting, ManipulationStarting
Manipulation gesture events
• Inertia
• Often used to set RenderTransform
• Derived from Pointer-events
• One concurrent event per UI Element
Brainstormer
Screen table - "Surface"/FlatFrog
 no up or down
 difficult with global UI elements
Use popups or duplicates
Concurrent popup
 One concurrent event per UI Element, e.g.
Canvas
 double-click better than tap-n-hold
 ugly trick: Put a grid with many elements inside
the canvas (Routed events)
Manipulation transforms
 CompositeTransform
 e.Cumulative.Rotation
 No concurrent Repeatbuttons
 e.handled = true
Windows Store
Windows Store
 Publish
 WACK
 Privacy policy
 Live account
 Publisher name
 Background audio
 Manage
 Change app name
 Remove app
WACK
Is step 1 of certification process  always run this.
Privacy policy
Blog post by Dag König: http://bit.ly/RWGouo
Must have in metadata and accessible in app.
Live account
Use separate live-ID for win8 apps.
Publisher name
For company accounts, ”must” match registration papers.
Background audio
Background audio prevents suspend, do not autoplay!
Change app name
App name can be changed.
Remove app
Apps cannot be removed, only updated to no markets.
Get started – Store
• Create Microsoft account
• Create Store account
• Reserve app name
Thank you for coming!
the end

Contenu connexe

Similaire à Windows Store apps - Lessons Learned

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
 
Windows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsWindows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsOliver Scheer
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptxMugiiiReee
 
FirefoxOS Window Management
FirefoxOS Window ManagementFirefoxOS Window Management
FirefoxOS Window ManagementAlive Kuo
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKBrendan Lim
 
Break Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyBreak Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyUmair Vatao
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...Robert Nyman
 
PROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part IIPROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part IISivaSankari36
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: IntroductionInnerFood
 
iOS for C# Developers - DevConnections Talk
iOS for C# Developers - DevConnections TalkiOS for C# Developers - DevConnections Talk
iOS for C# Developers - DevConnections TalkMiguel de Icaza
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsMotorola Mobility - MOTODEV
 
Cross platform mobile development in c#
Cross platform mobile development in c#Cross platform mobile development in c#
Cross platform mobile development in c#danhermes
 
Android accessibility for developers and QA
Android accessibility for developers and QAAndroid accessibility for developers and QA
Android accessibility for developers and QATed Drake
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)rudigrobler
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinBarry Gervin
 
A comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter componentA comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter componentKaty Slemon
 
XPages Mobile Controls
XPages Mobile ControlsXPages Mobile Controls
XPages Mobile ControlsPeter Presnell
 
Tool Development 01 - Introduction to Tool Development
Tool Development 01 - Introduction to Tool DevelopmentTool Development 01 - Introduction to Tool Development
Tool Development 01 - Introduction to Tool DevelopmentNick Pruehs
 

Similaire à Windows Store apps - Lessons Learned (20)

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...
 
Windows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 ApplicationsWindows Phone 8 - 3 Building WP8 Applications
Windows Phone 8 - 3 Building WP8 Applications
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
 
FirefoxOS Window Management
FirefoxOS Window ManagementFirefoxOS Window Management
FirefoxOS Window Management
 
Introduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDKIntroduction to Palm's Mojo SDK
Introduction to Palm's Mojo SDK
 
Break Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyBreak Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-study
 
The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...The web - What it has, what it lacks and where it must go - keynote at Riga D...
The web - What it has, what it lacks and where it must go - keynote at Riga D...
 
PROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part IIPROGRAMMING IN JAVA- unit 4-part II
PROGRAMMING IN JAVA- unit 4-part II
 
React Native: Introduction
React Native: IntroductionReact Native: Introduction
React Native: Introduction
 
iOS for C# Developers - DevConnections Talk
iOS for C# Developers - DevConnections TalkiOS for C# Developers - DevConnections Talk
iOS for C# Developers - DevConnections Talk
 
Top Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on TabletsTop Tips for Android UIs - Getting the Magic on Tablets
Top Tips for Android UIs - Getting the Magic on Tablets
 
Cross platform mobile development in c#
Cross platform mobile development in c#Cross platform mobile development in c#
Cross platform mobile development in c#
 
Android accessibility for developers and QA
Android accessibility for developers and QAAndroid accessibility for developers and QA
Android accessibility for developers and QA
 
An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)An end-to-end experience of Windows Phone 7 development (Part 1)
An end-to-end experience of Windows Phone 7 development (Part 1)
 
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
 
A comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter componentA comprehensive guide on developing responsive and common react filter component
A comprehensive guide on developing responsive and common react filter component
 
XPages Mobile Controls
XPages Mobile ControlsXPages Mobile Controls
XPages Mobile Controls
 
Tool Development 01 - Introduction to Tool Development
Tool Development 01 - Introduction to Tool DevelopmentTool Development 01 - Introduction to Tool Development
Tool Development 01 - Introduction to Tool Development
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
 
Diving Into Xamarin.Forms
Diving Into Xamarin.Forms Diving Into Xamarin.Forms
Diving Into Xamarin.Forms
 

Windows Store apps - Lessons Learned

Notes de l'éditeur

  1. WeareconsultantswithJayway
  2. This is what we’ll talk about.appsconceptsstore
  3. First some context on whatwe’vedoneDemo:ReseguidenRixFM och BanditLänsförsäkringarRicoh
  4. Howmanyareused to workingwith Blend?The Blend code has beenmergedinto VS.But Blend still has someadvantages,one is workingwithresources.
  5. Design and UI is reallyimportant for Windows 8 apps.Important to be able to workwith design fluently.Unlike WP and earlier XAML versions, the Data tab in Blend is missing  cannot use XML data for view models.
  6. What we like to do is:In code, set view model in ctorviewModel.Init in OnNavigatedToDataContext is inherited to child elements
  7. What we like to do is:Design view model on pageInherits from real VM – sets data as needed in design time
  8. Appbar inherits binding from ancestors.If a separate DataContext is needed, it cannot be set on the AppBar itself, will not apply.
  9. Krav för godkännande…sanning med modifikation
  10. Demo
  11. Bakom gardinerna…För den här kontrollen ska vänstermarginalen vara 10 isf 20. För den här kollektionen vill jag använda en listview isf gridview.
  12. Bakom gardinerna…
  13. Simulator doesn’t care about manifest settings concerning rotation
  14. Rememberthat in fillview the usermighthave a hard timereachingwithboththumbs
  15. The anatomyof an appNavigation functionality in the Frameclass
  16. An app stores itsstate in a dictionaryheld by the suspension manager helperclassprovided by VS. What has this to do with navigation? Whenresuming from terminatedstate, wewant to restore page navigation state
  17. Alsousefulifyouwant to save filled in user data during navigation (not necessaryifsavingstate in SaveStatemethod)
  18. Just works.Have to learnmoredetails forGamesCustomcontrols
  19. No separate events for mouse, pen, touch – all the same.Raw events areavailable – buteasier APIs exist (gestures).
  20. Trackeachindividual fingerCode for mouse-specificEvent-history
  21. Straightforward
  22. Gestures like zoom, rotation and movement
  23. Also supportsinertia – like slowing downWorks beautifullywithrender transform
  24. Demo-app for FlatFrogsurface table
  25. New problems compared to regularscreenNo up or downEveryoneshould be able to reacheverytningDuplicate elements
  26. Problems withonestaticgesture eventPointerPressed – manypopups (hand on table)Hold – onlyone at a timeDoubleClick – betterTrick: grid inside canvas – to capturerouted events and route to canvasAllowedmultipleconcurrent events
  27. Hard to get transform rightBest result:Usecomposite transform and Cumulativevalues from manipulationRepeatButtondoes not handleconcurrentusages
  28. Show windows store liveCreateapp – reservename
  29. Great tool, checks all kinds of things.Leave machine alone while it runs!Probably runs as step 1 of the certification process  you have to pass. (we’ll get back to that...)
  30. Talked about a lot, majority of rejects was this error.Must provide – both in app and in metadata (=on the web)Privacy policy: http://bit.ly/RWGouoPublish an app: http://bit.ly/R28Rtj
  31. Everything done via live account.Often you publish as a customer – tell them to create a separate live account and forward the email.Really tedious to have to ask for confirmation codes and have them (not) tell you when an email has arrived.Clicking ’remember me’ saves you a lot of hassle.Checklist:Create accountReserveappname
  32. Company: must be identical to papers.Abbreviations cause delays.E.g. MTG Radio ABWe have always gone for age 12+, to be on the safe side.E.g. radio streams could contain anything...
  33. Not agent like windows phone, but an element in the app that prevents suspend = the app continues to run.But... The WACK does not understand this. We had to disable autoplay for MTG Apps
  34. Can be done.Reserve new nameChange name everywhere in appPublish updateOld name can now be removed
  35. Apps cannot be removed!What you can do is to publish an update that is not available in any countries!Will cause the app to disappear from the Store, but get an update on the machines that it has been installed on.You can never force-delete an app on all machines that it’s installed on.