Closed suchja closed 2 years ago
I assume that this is based on what was originally created for UWP where the ActivationHandlers are intended to make it easier to support the many different types of activation. There's more explanation of this in the UWP docs at https://github.com/microsoft/TemplateStudio/blob/main/docs/UWP/activation.md
@mrlacey thanks for the quick response and the reference. Based on that I found this document explaining the rich activation feature for Windows App SDK applications. It also states that the feature is still under development and should not be used in production. So I finally understand why I couldn't find any documentation.
Based on this information it might be too early to remove the activation service in the WinUI templates. However, I would really propose to update the documentation on https://github.com/microsoft/TemplateStudio/blob/main/docs/WinUI/activation.md to state that this feature is under development.
The ActivationService in Template Studio is not under development. It enables adding new activation handlers in a clean and modular way. Look at how App Notifications is implemented for an example.
Is your feature request related to a problem? Please describe.
While looking into a newly generated TS application (WinUI) the first time, I was pretty overwhelmed by the complexity. I understand that it tries to solve many problems and could figure out (and mostly like) the provided features. However, when looking into the activation service (
IActionHandler
and its implementation), I still see no need for it.Although I do understand the documentation, the problem the activation service in general tries to solve, is not clear to me. From my point of view (with limited knowledge in this area) it just adds additional complexity without having any benefit (at least the benefit is not documented).
I found the documentation for the
LaunchActivatedEventArgs
(which is used inDefaultActivationHandler
), but it states, that it is alwaysnull
for desktop applications. So it seems that this whole activation process is not required for desktop apps based on Windows App SDK!?!Describe the solution you'd like
Remove the activation service completely and do the required initialization of navigation in the
App.OnLaunched
.Describe alternatives you've considered
An alternative would be to improve the documentation with a clear answer to the question "what problem does the activation service solve?" In this case another example (besides the
DefaultActivationHandler
) for using the activation service would be great!Additional context
I have the need to initialize a (sqlite) DB (e.g. check that it is available, check that it contains tables and data and create tables when not available) during startup of my application.
Can I use the activation service to do my DB initialization and if yes, how? (I could imagine adding another implementation of
IActivationHandler
which only initializes my DB and then execute theDefaultActivationHandler
as well as my own. But is that the intention?)Applies to the following platforms: