Platform for windows 8 applications

  • 336 views
Uploaded on

Windows 8 Application Platform, Information to understand how does windows 8 applications run on the platform and get started for coding Windows 8 Applications.

Windows 8 Application Platform, Information to understand how does windows 8 applications run on the platform and get started for coding Windows 8 Applications.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
336
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Infusion is a cool place to work
  • 1. TechnologyPlatform – WinRT – Dev Options2. DirectionUser experience – Application Life Cycle – Application Packaging – Sharing & ContractsUser centric -
  • “Let’s talk Windows. We like to talk of Windows 8 as Windows reimagined with a new start screen, unified input across touch, mouse and keyboard but preserving all the great work that we did in Windows 7”.Makes Windows 7 even better --- Everything that runs on Windows 7 still runs on Windows 8 (in the same architecture)Reimagines Windows from chipset to experiencenew range of capabilities, scenarios and form factors
  • and one key point I want to make is that we don’t see Windows 8 as a slate OS or a tablet OS. We see it as a unifying OS. Spanning different kinds of devices and we’ve done a tonne of work to make that happen.
  • This is the summary for the previous demos.. Mention Windows on ARM since you can’t show it..
  • Mentions these are not in order of importance. Hint of Windows on ARM, but don’t add it as a bullet.
  • Every language is a first class citizen.. This is the official slide, Direct X is missing from this slide.. But you can show it..
  • You just saw that WinRT leverages the Async pattern to keep the UI responsive.. This happens across all languages.. The WINRT API has meta data that the platform uses to create projections that make using the API very natural.. There is a lot of power behind WInRT… a few lines of code and we had a dialog selecting a file using a common UX paradigm that all users will be familiar with promptly..
  • Windows 8 App = one foreground full screen window that allows the user to work more efficientlyThe other Windows 8 Apps are quickly suspended to preserve battery lifeAs a developer, you have to know how Windows manages your App lifetime and how to be a good citizen
  • Apps are suspended 5 seconds after leaving foreground.However, you get 10 seconds instead when you switch from one App to another.You can check it if you launch an App in Snap view and keep the Task Manager in the Filled view (I’m not able to find a workflow that ends up to the 5 seconds…)Suspended Apps are notified before being suspendingAfter that event, no more CPU for the application threadsIf you take too long to suspend… you’ll get terminatedWindows is free to “terminate” any Windows 8 App if memory pressure is detectedTerminated Apps are not notified before being terminatedSee http://msdn.microsoft.com/en-us/library/windows/desktop/aa366541(v=vs.85).aspx for API to use to detect when memory is running high/lowSee http://blogs.msdn.com/b/b8/archive/2012/04/17/reclaiming-memory-from-Windows 8-apps.aspx for details about memory management based on Working Set metrics in Windows 8
  • = “tombstoning” in Windows phone (read http://msdn.microsoft.com/en-us/library/ff817008(v=vs.92).aspx for the execution model in WP)This also visible with SysInternals Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) where you see the same “Suspended” in the CPU column. It was possible to “suspend” a process in Windows 7 with Process Explorer: this is now done by Windows itself for Windows 8 Apps.NOTE: Process Explorer is fully aware of Windows 8 Apps = “Immersive” has new blue color. See Options | Configure Colors | Immersive Process + see package in tooltipWhen you right-click | Resume on a Suspended Windows 8 App, it gets back automatically Suspending immediately by Windows
  • The user can still decide to explicitly “close”/”end” an App by using ALT+F4 or the following touch gesture = “drag the top of the App and drag it down to the bottom of the screen”: in that case, the App gets the suspend notification after 5 secondsThe system is also allowed to “terminate” the apps.. [users can do it too via task manager or Process Explorer]There is no event fired during termination… you should save all your stuff by “suspending” or even better, along the user navigation in the AppDEMO: use Testlimit64 –d 1024 to consume as much memory (working set) as possible and see that first the Windows 8 App working set are trimmed and then some Apps get terminated (download the tool from http://technet.microsoft.com/en-us/sysinternals/bb963901.aspx)Watch http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL405 for Mark Russinovich talk about Windows memory management + demos of Testlimit
  • Suspending:You have 5 seconds real time (not CPU time) to save what you need to save. If you take too long, the App will be terminated. Even when you use deferal for asynchronous processing.Resuming:Sometimes useful for checking for updates in case of a News App for example.Ex: you’ve stored the time of suspension and, on resuming, if there are more than x hours since then, the code checks for News updates.NOTE: when the App gets suspended, all the event handlers are still registered (sockets, system related,…) but will never get any CPU to run even if such an event occurs.
  • Suspending:You have 5 seconds real time (not CPU time) to save what you need to save. If you take too long, the App will be terminated. Even when you use deferal for asynchronous processing.Resuming:Sometimes useful for checking for updates in case of a News App for example.Ex: you’ve stored the time of suspension and, on resuming, if there are more than x hours since then, the code checks for News updates.NOTE: when the App gets suspended, all the event handlers are still registered (sockets, system related,…) but will never get any CPU to run even if such an event occurs.
  • Don’t wait until Suspending to save Settings or navigation informationNote: settings should apply immediately so… save them immediately too :^)XAML: new VS template implementation in Common\\SuspensionManager to save the Frames navigation state
  • If possible mention suspend/resume tool bar in visual studio to show Tools to simulate.If possible and I have time: go trough the suspend/resume tool bar in visual studio to show Tools to simulate.
  • * Not supported by XAML built in controls.
  • * Not supported by XAML built in controls.
  • HTML5Controls_EverydayWidgets (SDK Sample)Button – win-backbutton -> ui-dark.css -> Search Scope Current Document.Controls_Rating(SDK Sample)RatingsXAMLXAML progress and button controls sample (SDK Sample) – Show demo and code for Scenarios 2, 1, 5, 6.

Transcript

  • 1. Windows 8 ApplicationsPlatform & Development optionsRodelf EdwardSoftware ConsultantInfusion Developmentwww.infusion.com
  • 2. About meEMEA Windows 8 championConsultant on Microsoft technologiesMember of Dubai tech communityRodelf EdwardSoftware ConsultantInfusion Developmentwww.infusion.com
  • 3. Agenda• Windows 8 Applications Overview.• Windows 8 Applications Platform.• Development Options.• Application Packaging• Application Life Cycle.• UI Controls.• Project Templates.Windows 8 Applications - Platform & Development options
  • 4. Windows 8 ApplicationsOverview
  • 5. Windows reimaginedWindows 8 Applications - Overview
  • 6. Great experience across all hardwareWindows 8 Applications - Overview
  • 7. Windows 8 ExperienceWindows 8 Applications - Overview
  • 8. Key InvestmentsWindows 8 Applications - Overview
  • 9. Windows 8 ApplicationsPlatform
  • 10. Windows 8 PlatformWindows 8 Applications - Platform
  • 11. Windows 8 Applications - Platform
  • 12. DllImport "avicap32.dll" "capCreateCaptureWindow"static extern int string int int int int int int int DllImport "avicap32.dll"static extern bool int MarshalAs UnmanagedType ref string int MarshalAs UnmanagedType ref string int// more and more of the same
  • 13. Windows 8 Applications - Platform
  • 14. using Windows.Media.Capture;var new CameraCaptureUI new Sizevar await CameraCaptureUIModeif var new BitmapImage await FileAccessMode
  • 15. Windows 8 Applications - Platform
  • 16. Windows 8 ApplicationsDevelopment Options
  • 17. Development Options HTML / CSS XAML DX JavaScript / C++ C / C++Windows 8 Applications - Development Options
  • 18. Development OptionsHTML5 /JavaScript Structure Presentation Behavior HTML CSS JavaScriptWindows 8 Applications - Development Options
  • 19. Development OptionsXAML / C#,VB Structure Presentation Behavior XAML XAML C# / VBWindows 8 Applications - Development Options
  • 20. Project Templates demo – Project TemplatesWindows 8 Applications - Development Options
  • 21. Windows 8 ApplicationsApplication Life Cycle
  • 22. Windows 8 Applications - Application Life Cycle
  • 23. Windows 8 Applications - Application Life Cycle
  • 24. Introducing SuspendWindows 8 Applications - Application Life Cycle
  • 25. Termination Apps do not get notified when they are getting terminatedWindows 8 Applications - Application Life Cycle
  • 26. //Register for the Suspending event and call suspendingHandler when receivedWindows.UI.WebUI.WebUIApplication.addEventListener("suspending", suspendingHandler);//Handle the suspending event and save the current user session using WinJS sessionStatefunction suspendingHandler(eventArgs) {//We are getting suspended}//Register for the Resuming event and call resumingHandler when receivedWindows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler);function resumingHandler( ) {//We are getting resumed, in general do nothing}
  • 27. Tips for Making Your App Look and Feel FreshWindows 8 Applications - Application Life Cycle
  • 28. Saving/Restoring User Session StateWindows 8 Applications - Application Life Cycle
  • 29. Best Practices for Saving and Restoring State Scenario You should….Windows 8 Applications - Application Life Cycle
  • 30. demo - Application life cycleWindows 8 Applications - Application Life Cycle
  • 31. Application PackagingApp manifest and capabilities
  • 32. App manifest and capabilitiesWindows 8 Applications - Application Packaging
  • 33. demo - applicationcapabilitiesWindows 8 Applications - “Hello World!” Sample
  • 34. Windows 8 ApplicationsUI Controls
  • 35. * Not in XAML built-in controls set, available via 3rd party
  • 36. demo – App BarWindows 8 Applications - Controls
  • 37. Recap• More than Windows 7• Platform• Development Options• Application Life Cycle• Application Packaging• UI Controls.• Project Templates.
  • 38. Q&A
  • 39. Thank YouRodelf EdwardBlog: rodelfedwardtech.blogspot.comTwitter: http://twitter.com/rodelf_edwardLinkedIn: Search for Rodelf Edward www.infusion.com