Windows 8 Application Platform, Information to understand how does windows 8 applications run on the platform and get started for coding Windows 8 Applications.
What's New in Teams Calling, Meetings and Devices March 2024
Platform for windows 8 applications
1. Windows 8 Applications
Platform & Development options
Rodelf Edward
Software Consultant
Infusion Development
www.infusion.com
2.
3. About me
EMEA Windows 8 champion
Consultant on Microsoft technologies
Member of Dubai tech community
Rodelf Edward
Software Consultant
Infusion Development
www.infusion.com
4. 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
13. 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
26. Termination
Apps do not get notified when
they are getting terminated
Windows 8 Applications - Application Life Cycle
27. //Register for the Suspending event and call suspendingHandler when received
Windows.UI.WebUI.WebUIApplication.addEventListener("suspending", suspendingHandler);
//Handle the suspending event and save the current user session using WinJS sessionState
function suspendingHandler(eventArgs) {
//We are getting suspended
}
//Register for the Resuming event and call resumingHandler when received
Windows.UI.WebUI.WebUIApplication.addEventListener("resuming", resumingHandler);
function resumingHandler( ) {
//We are getting resumed, in general do nothing
}
28. Tips for Making Your App
Look and Feel Fresh
Windows 8 Applications - Application Life Cycle
45. Thank You
Rodelf Edward
Blog: rodelfedwardtech.blogspot.com
Twitter: http://twitter.com/rodelf_edward
LinkedIn: Search for Rodelf Edward
www.infusion.com
Hinweis der Redaktion
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.