Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BBL - A story about mobile navigation in Deezer for Windows

BBL - A story about mobile navigation in Deezer for Windows

Christopher MANEU

September 16, 2015
Tweet

More Decks by Christopher MANEU

Other Decks in Technology

Transcript

  1. A story about mobile navigation in Deezer for Windows Christopher

    Maneu Brown Bag Lunch @ Deezer 16/09/2015
  2. Why talking about navigation ? • Complex subject • Few

    guidances when your app scale (whenever the platform)
  3. Our requirements  Views should not navigate to views 

    Unified way to address a view  Being able to deeplink to a view  Being able to change the view on the fly (gatekeeping, A/B testing, …)  Integrate well in to the framework(s)
  4. public void OnAlbumsButtonClicked() { } Windows Phone navigation 101 NavigationService.NavigateTo(new

    Uri("/Pages/AlbumsPage.xaml", UriKind.Relative)); ×Views should not navigate to views ×Unified way to address a view ×Being able to deeplink to a view ×Being able to change the view on the fly (gatekeeping, A/B testing, …) √ Integrate well in to the framework(s)
  5. Deeplink all the things • The ViewModel / Activity /

    Controller is responsible to construct all the navigation URIs • A User control gets this URI and perform navigation on tap • We implement an UriMapper ! dz://mylibrary/albums => /Pages/AlbumsPage.xaml The Windows Phone Frame accepts an UriMapper
  6. Deeplink all the things √ Views should not navigate to

    views √ Unified way to address a view × Being able to deeplink to a view √ Being able to change the view on the fly (gatekeeping, A/B testing, …) √ Integrate well in to the framework(s)
  7. public void OnAlbumsButtonClicked() { } Windows 8 Navigation 101 NavigationService.NavigateTo(

    typeof(AlbumPage) ); ×Views should not navigate to views (WE NAVIGATE TO VIEW CLASS !!) ×Unified way to address a view ×Being able to deeplink to a view ×Being able to change the view on the fly (gatekeeping, A/B testing, …) √ Integrate well in to the framework(s)
  8. Windows 8 Navigation, Reinvented √ Views should not navigate to

    views √ Unified way to address a view × Being able to deeplink to a view √ Being able to change the view on the fly (gatekeeping, A/B testing, …) √ Integrate well in to the framework(s)
  9. The case of unexplained • A bug into Windows Phone

    navigation Framework • Causes random crashes • Several months of investigation • => WP Nav. Fw. Does not support Absolute URIs navigations within the app… • Dz://mylibrary/albums replaced by /MyLibrary/Albums
  10. The union of the deeplinks • One code to handle

    in-app and out-app deeplinks • A unified way to get parameters (from URI and query parameters)
  11. The union of the deeplinks new DeezerUriMapping { UriRegex =

    DeezerRuntimeSettings.BaseDeepLinkUrlRegEx + "?([a-z]*)?\\/album\\/(?<id>[0-9]*)", MappedUriTemplate = "/Pages/AlbumPage.xaml?id={id}", AutoMapQueryStringParameters = false });
  12. The union of the deeplinks √ Views should not navigate

    to views √ Unified way to address a view √ Being able to deeplink to a view √ Being able to change the view on the fly (gatekeeping, A/B testing, …) √ Integrate well in to the framework(s)  Pass object instances between views
  13. Deeplinks & Friends I want to navigate to a view

    / an URI _navigationService.Navigate(protocolArgs.Uri.Origina lString, null); I want to navigate to a view, but I already have this object _navigationService.Navigate(PageTokens.AlbumPage, currentAlbum);