Windowstemplatestudio: Add More Documentation around MVVM Basic Pattern

Created on 26 Jul 2017  路  10Comments  路  Source: microsoft/WindowsTemplateStudio

Ideally, the template/documentation should fill-in some back-end model objects and show how those hook to the existing View/ViewModel patterns in WTS.

There should also be additional info about how you have an over-arching application/command model so that things can be interconnected.

Can Close Out Soon Documentation MVVM Basic

Most helpful comment

So it looks like we need to document:

  • Adding an app level VM
  • VM lifecycle (and possibly how to change it. e.g. persistence, reuse or make singleton, etc.)
  • Sharing/passing data between VMs
  • Passing data when navigating (there may be existing templates that already do this which can be used as examples.)
  • anything else...?

If someone is choosing MVVM Basic as they're just getting started with the pattern and don't want to learn a specific framework, we need to do more to help them.

I think this is going to need a separate, specific document. While what I wrote above could go in the "more info" description we'll need a new doc for the above points.
@ralarcon feel free to reassign to me to create this new doc once you've done the other changes.

All 10 comments

getting-started-endusers.md also needs other updates:

  • The pages sections need descriptions (could be copied from the templates.)
  • Need to add entries for the pages and features added since this was last updated.

Taking care of documentation update for Pages / Features.

We saw the MVVMBasic as a simplification of any existing frameworks so we understood the users were familiar with the pattern and its applicability to UWP apps.

@crutkas we need to plan to create the MVVMBasic documentation as a framework if we consider is worthy.

I don't think we need to create a lot of documentation for MVVMBasic but needs something for people who need more information about how it compares to other options.

Just a few paragraphs should be enough.
Something like:

MVVM Basic is not a framework but provides the minimum functionality to create an app using the Model-View-ViewModel (MVVM) pattern.
Use it if you can't or don't want to use a 3rd party MVVM Framework.

MVVM Basic is not intended to be a fully features MVVM Framework and does not include some features that other frameworks do. ViewModel-first navigation, IOC, and messaging being the most obvious ones. If you want these features then choose a framework that supports them.

Projects created with MVVM Basic contain two important classes, Observable and RelayCommand.
Observable contains an implementation of the INotifyPropertyChanged interface and is used as a base class for all view models. This makes it easy to update bound properties on the View.
RelayCommand contains an implementation of the ICommand interface to make it easy to have the View call commands on the ViewModel, rather than handle UI events directly.

This could be part of the "more info" in the wizard and can be included in the getting started. @michael-hawker does this make sense?

Ideally, the template/documentation should fill-in some back-end model objects and show how those hook to the existing View/ViewModel patterns in WTS.

@michael-hawker we're still working on how best to integrate WTS with different data sources. The challenge is that different people do things very different ways. This makes building something into the tool/generated projects or providing guidance very difficult. If you have some thoughts, I'd love to hear them. Either here or on #396

There should also be additional info about how you have an over-arching application/command model so that things can be interconnected.

@michael-hawker I'm not sure what you're specifically after here. Are you talking about a command that can be activated from any VM or something else?

There should also be additional info about how you have an over-arching application/command model so that things can be interconnected.

@mrlacey about as a developer using MVVM Basic how I would store state for the application itself in its own VM and have a coherent model to share/access that data. In addition, info around how to pass info from one VM to another when constructing/navigating to another piece of UI.

I know there's a lot of MVVM docs out there, but having info to aid developers off of a template and in context to a project I feel would be a big boost.

So it looks like we need to document:

  • Adding an app level VM
  • VM lifecycle (and possibly how to change it. e.g. persistence, reuse or make singleton, etc.)
  • Sharing/passing data between VMs
  • Passing data when navigating (there may be existing templates that already do this which can be used as examples.)
  • anything else...?

If someone is choosing MVVM Basic as they're just getting started with the pattern and don't want to learn a specific framework, we need to do more to help them.

I think this is going to need a separate, specific document. While what I wrote above could go in the "more info" description we'll need a new doc for the above points.
@ralarcon feel free to reassign to me to create this new doc once you've done the other changes.

The other changes are in place. Re-assigning... This is not urgent so feel free to remove the in-progress label if you want.

From a beginners perspective using MVVM Basic, i'm more after how Navigation is handled under the pattern/ MVVM basic.

Basic documentation about MVVM Basic has now been added.
Please continue to suggest further documentation improvements.

Was this page helpful?
0 / 5 - 0 ratings