Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

10 tips for porting to Windows Phone 8

1,833 views

Published on

Presentation I gave at #MobDevCon providing tips for porting mobile apps to Windows Phone 8

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

10 tips for porting to Windows Phone 8

  1. 1. Matt Lacey @mrlacey http://mrlacey.com/
  2. 2. me Freelance developer Doing “mobile” development over 10 years Organise the Windows Phone User Group Wants to help you build awesome apps YOU Developer Experienced on other mobile platforms Some Windows Phone awareness Want to build awesome apps
  3. 3. native x-platform games
  4. 4. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  5. 5. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  6. 6. principles language&
  7. 7. 1. Pride in craftsmanship 2. Be fast and fluid 3. Authentically digital 4. Do more with less 5. Win as one
  8. 8. The OS implementation of the principles
  9. 9. Can follow the principles without implementing the language
  10. 10. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  11. 11. Apps can be more than just white text on a black background
  12. 12. Are drop shadows, gradients, rounded corners and gloss really a part of your brand?
  13. 13. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  14. 14. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  15. 15. http://www.flickr.com/photos/winterofdiscontent/3231416496/ .net
  16. 16. async C# 5
  17. 17. var client = new WebClient(); client.DownloadStringCompleted += (sender, args) => MessageBox.Show(args.Result.Length.ToString(), "Response length", MessageBoxButton.OK); client.DownloadStringAsync( new Uri("http://www.mobdevcon.com/"));
  18. 18. private async Task ShowPageLength() { var client = new HttpClient(); var response = await client.GetStringAsync( "http://www.mobdevcon.com/"); MessageBox.Show(response.Length.ToString(), "Response length", MessageBoxButton.OK); }
  19. 19. [CompilerGenerated] private struct <MakeAwaitableRequest>d__0 : IAsyncStateMachine { public int <>1__state; public MainPage <>4__this; public AsyncVoidMethodBuilder <>t__builder; private object <>t__stack; private TaskAwaiter<string> <>u__$awaiter3; public HttpClient <client>5__1; public string <response>5__2; private void MoveNext() { try { TaskAwaiter<string> awaiter; bool flag = true; switch (this.<>1__state) { case -3: goto Label_00DD; case 0: break; default: this.<client>5__1 = new HttpClient(); awaiter = this.<client>5__1.GetStringAsync("http://www.mobdevcon.com/").GetAwaiter(); if (awaiter.IsCompleted) { goto Label_008A; } this.<>1__state = 0; this.<>u__$awaiter3 = awaiter; this.<>t__builder.AwaitUnsafeOnCompleted<TaskAwaiter<string>, MainPage.<MakeAwaitableRequest>d__0>(ref awaiter, ref this); flag = false; return; } awaiter = this.<>u__$awaiter3; this.<>u__$awaiter3 = new TaskAwaiter<string>(); this.<>1__state = -1; Label_008A: string introduced7 = awaiter.GetResult(); awaiter = new TaskAwaiter<string>(); string str = introduced7; this.<response>5__2 = str; MessageBox.Show(this.<response>5__2.Length.ToString(), "Response length", MessageBoxButton.OK); } catch (Exception exception) { this.<>1__state = -2; this.<>t__builder.SetException(exception); return; } Label_00DD: this.<>1__state = -2; this.<>t__builder.SetResult(); }
  20. 20. public IList<BlogPost> FindPopularPosts(IList<BlogPost> allPosts) { var popularPosts = new List<BlogPost>(); foreach (var post in allPosts) { if (post.Views >= 10000) { popularPosts.Add(post); } } return popularPosts; }
  21. 21. public IList<BlogPost> FindPopularPosts(IList<BlogPost> allPosts) { return allPosts.Where(p => p.Views >= 10000).ToList(); }
  22. 22. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  23. 23. MVP data binding+
  24. 24. <TextBlock Text="{Binding SomeString}" /> <Button Command="{Binding DoSomething}" Content="do something" />
  25. 25. http://flic.kr/p/9ny7B6
  26. 26. MVVMLight Caliburn.Micro MVVMCros s
  27. 27. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  28. 28. http://flic.kr/p/9vjqMk
  29. 29. http://flic.kr/p/aNbQui
  30. 30. toast, tile & raw no interception no notification center
  31. 31. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  32. 32. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  33. 33. Good news Better than WP7 Great tools Bad news Low spec devices Large/complex apps Images Background agents
  34. 34. frame rate counters redraw visualizations cache visualizations memory counters application analysis execution profiling memory profiling
  35. 35. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  36. 36. .resx .xlf bindings custom
  37. 37. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  38. 38. 1. Metro 2. Visuals 3. Controls 4. .net 5. MVVM 6. Lifecycle 7. Navigation 8. Memory 9. Localization 10. Beyond 8.0
  39. 39. http://dev.windowsphone.com/ http://www.developer.nokia.com/ http://mrlacey.com/

×