Windows 8 Development - Life Cycle Events
09 June 2014
In another post, I mentioned that you do not need WinJS at all to write a Windows Store Application. Not only is this true of the user controls, but it is also (mostly) true with regard to the application life cycle.
Windows.UI.WebUI.WebUIApplication gives you a minimum set of general events. It covers activation, navigation, suspension, and resumption of the application. If you are relying on something other than WinJS (e.g. BackboneJS) for your presentation layer, then this might be all that you need.
If you are using the WinJS library as your GUI, then WinJS.Application is a convenient wrapper around the underlying WinRT library events. It gives you more control over your application life cycle by adding additional events at various points during the duration of the WinJS process. This is especially true at application startup and for GUI related events.
To use the WinJS events, at a minimum, you have to include base.js and call WinJS.Application.start().
is licensed under a Creative Commons Attribution 4.0 International License