Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Toolkit.Mvvm to replace MVVMBasic& MVVMLight templates #3753

Closed
mrlacey opened this issue Jun 23, 2020 · 20 comments
Closed

Microsoft.Toolkit.Mvvm to replace MVVMBasic& MVVMLight templates #3753

mrlacey opened this issue Jun 23, 2020 · 20 comments
Assignees
Labels
Caliburn.Micro Issues specifically related to generating a project with the Caliburn.Micro framework. Can Close Out Soon Work relating to this issue has been completed. framework The issue is a request to support a specific additional framework. meta Used to indicate the issue relates to how the project is run or the tool works. MVVM Basic Issues specifically related to generating a project with the MVVM Basic framework. MVVMLight Issues specifically related to generating a project with the MVVMLight framework. UWP Relates to generated UWP projects WPF Relates to generated WPF projects
Milestone

Comments

@mrlacey
Copy link
Collaborator

mrlacey commented Jun 23, 2020

With the Windows Community Toolkit looking to take over from MVVM Light (which has ceased active development) and release a replacement, adopting support for this should be considered.

It would depend on the toolkit version getting to a full release version (AFAIK this will be in v7.0, but there's no timeline for this yet) but it might be worth starting to think about this now.

This is a tracking issue as much as anything and opened to keep track of any discussion on the subject.

Some questions that will (eventually) need answering

  • Does this mean MVVMBasic (MB) can be "retired"? It was originally created, at least in part, due to a lack of a Microsoft supported framework being available. When there's one in the toolkit this argument goes away.
  • Should Microsoft.Toolkit.Mvvm (MTM) be added as a new framework option? Or as a replacement for MVVMLight (ML)? If not a replacement, how long should MVVMLight be maintained?
  • If a replacement, can support for "right-click>add" be maintained for existing apps using MB or ML?
  • If a replacement, would a document on migrating be enough? Or is tooling going to be required?

Note. Replacing MB & ML with MTM would greatly ease the development and testing effort required in template development.

I would expect this to necessitate a major version change. As such, it may be worth doing this at the same time as other big changes. (.NET 5/WinUI3--perhaps?)

X-Ref: CommunityToolkit/WindowsCommunityToolkit#3230

@mrlacey mrlacey added MVVMLight Issues specifically related to generating a project with the MVVMLight framework. MVVM Basic Issues specifically related to generating a project with the MVVM Basic framework. framework The issue is a request to support a specific additional framework. meta Used to indicate the issue relates to how the project is run or the tool works. WPF Relates to generated WPF projects UWP Relates to generated UWP projects labels Jun 23, 2020
@mrlacey mrlacey added this to the Backlog milestone Jun 23, 2020
@mrlacey
Copy link
Collaborator Author

mrlacey commented Jun 23, 2020

Looks like we may also need to consider CaliburnMicro in relation to this also.... Caliburn-Micro/Caliburn.Micro#708

@michael-hawker
Copy link

Thanks @mrlacey for filing this issue. We've definitely been talking to @sibille about this path forward as well. We didn't want to ship a new MVVM framework in the Toolkit and not have the WTS on board as well.

Especially now that Caliburn.Micro has announced development stopping as well, this new MVVM package would probably replace all three of those in WTS, so the options would be 'None', 'WCT MVVM', and 'Prism'?

Happy to sync more as we finalize the PR, move to create documentation/samples, and get a more official/stable preview out in the coming weeks. I have a couple of final loose ends to tie-up next week before we official green-light and move forward, but the positive responses from the community have been very encouraging towards this path.

@michael-hawker
Copy link

michael-hawker commented Jun 23, 2020

Also, it's good to note that the new WCT MVVM package is .NET Standard based, so using it and supporting it with other directions for WTS in the future like WPF, Uno, Xamarin, and WinUI 3 should be relatively straight-forward and simplified. 🙂

@Sergio0694
Copy link
Member

Hey @mrlacey - thank you for following up on this and creating this issue! 😄

I'm super excited for the response so far and the feedback from the early testers, so really looking forward to seeing how this moves forwards! I've already prepared a draft of the docs, and I'll be happy to get a docs PR started in the near future as well so that it might also be useful to clear things up for people interested in the PR and coming from other frameworks (eg. MvvmLight as you mentioned). Glad to hear the Windows Template Studio team is looking at the new project! 🚀

@sibille
Copy link
Collaborator

sibille commented Jun 24, 2020

Great questions and discussion @mrlacey, @michael-hawker and @Sergio0694

Yes, our idea is to replace MVVMBasic and MVVMLight with the new WCT MVVM framework.

Regarding the best way to update existing apps, I think we should evaluate how big the change is (considering also the changes WinUI3 will bring) and decide based on that, what's the best way to move support an update.
Bundling the big changes together in a mayor release seems a good way to reduce update effort.

Would also love to hear from devs currently using MVVMLight + MVVMBasic what their plans and needs are.

If CaliburnMicro is no longer maintained we should also remove it as an option, I believe an update path is more complicated in this case, as the frameworks are quite different.

@scottkuhl
Copy link
Contributor

scottkuhl commented Jul 9, 2020

I like the direction this going. MVVM Light and Caliburn have seemed to be on life support lately. I agree that's its best to remove them. I try to teach using Template Studio and students that wander down those paths often get frustrated. I always steer them to Code Behind or MVVM Basic.

Now that Studio has added WPF support, anything that can reduce the maintenance effort is a good step.

@scottkuhl
Copy link
Contributor

so the options would be 'None', 'WCT MVVM', and 'Prism'?

I thought Prism had effectively dropped support of UWP in the past. Is it even a viable option moving forward?

@mrlacey
Copy link
Collaborator Author

mrlacey commented Jul 9, 2020

so the options would be 'None', 'WCT MVVM', and 'Prism'?

I thought Prism had effectively dropped support of UWP in the past. Is it even a viable option moving forward?

Uno are aiming to support Prism on WinUI so it might not be dead https://platform.uno/blog/uwp-winui-and-uno-platform-get-prism-support-thanks-to-uno-team-oss-contribution/

@michael-hawker
Copy link

@scottkuhl thanks for the input, that's really encouraging to hear and part of our reasoning on having a new light-weight MVVM package in the Windows Community Toolkit.

The great part too is since it'll be .NET Standard base with Windows Template Studio also supporting WPF now; they can just as easily have the same option there as well! 🙂

We'll hopefully be releasing a preview package on NuGet in a few weeks and have better samples and docs ready at that time. Hoping to get the PR merged in within the next week and then it'll be available on our MyGet for easier pre-preview consumption. 😋

mrlacey added a commit to mrlacey/WindowsTemplateStudio that referenced this issue Aug 10, 2020
Early work in preparation for microsoft#3753
Requires configured NuGet source for toolkit MyGet endpoint

Still a WIP - C# tested manually, VB needs more testing
@mrlacey mrlacey self-assigned this Aug 10, 2020
@mrlacey mrlacey added the in-progress The issue is currently being actively worked on. label Aug 10, 2020
@mrlacey
Copy link
Collaborator Author

mrlacey commented Aug 10, 2020

I'm working on adding these as an extra framework option for review/testing.
My expectation is that we'll have (at least on the nightly builds) the new option along with existing ones for some time.

How existing frameworks will be retired is yet to be determined.

@mrlacey
Copy link
Collaborator Author

mrlacey commented Aug 10, 2020

When any existing frameworks are eventually removed it will be worth creating a follow-up task to tidy-up and simplify the templates and remove some of the current complexity.

@mrlacey mrlacey added the Caliburn.Micro Issues specifically related to generating a project with the Caliburn.Micro framework. label Sep 27, 2020
@mrlacey
Copy link
Collaborator Author

mrlacey commented Sep 28, 2020

To document current thinking:

  • We'll add the Microsoft.Toolkit.MVVM (MTM) version once it is out of preview. This is due to be in the Community Toolkit v7.0 and has no scheduled release date yet.
  • The MTM version will become the default option in the wizard (UWP & WPF)
  • When the MTM templates are released the MVVMBasic (MB), MVVM Light (ML), and Caliburn.Micro (CM) templates will be marked as deprecated.
  • Deprecated templates will still be available in the wizard for (probably, at least) six months
  • During the deprecation period, documentation will be provided (and linked from the wizard) that explains: why the deprecation notice, how to migrate to MTM, and what will happen after the deprecation period.
  • After the deprecation period the MB, ML & CM templates will be removed from the wizard (and repository)
  • A "best-effort" will be made to allow existing apps to use the right-click>Add functionality after the deprecation period but ongoing support is not guaranteed. (The amount of work needed to support this is still to be reviewed)
  • Whether the WinUI3 versions of templates include support for deprecated frameworks will depend on when the MTM and WinUI3 templates are available.
  • Currently, the expectation is that Prism templates will be included in the future. This is based on the current understanding that Uno will be supporting the UWP version. This will continue to be monitored and appropriate action will be taken if that's not the case.
  • Code-Behind templates are not affected by this change (other than no longer being the UWP default.)

@mrlacey mrlacey changed the title Migrate (replace?) MVVMBasic & MVVMLight templates to (with) Microsoft.Toolkit.Mvvm Microsoft.Toolkit.Mvvm to replace MVVMBasic, MVVMLight, & Caliburn.Micro templates Sep 28, 2020
@yoshiask
Copy link

I have to say, I just recently started using WTS, and this is one of the things that would make it perfect for me. (The other big thing being Uno support, but I know how much effort that would take.) Is this template going to be released as soon as WCT 7.0 does? Will it take some time after the release for it to be useable in WTS?

@mrlacey
Copy link
Collaborator Author

mrlacey commented Oct 22, 2020

I have to say, I just recently started using WTS, and this is one of the things that would make it perfect for me. (The other big thing being Uno support, but I know how much effort that would take.) Is this template going to be released as soon as WCT 7.0 does? Will it take some time after the release for it to be useable in WTS?

The exact timeline for releasing this is still to be determined.
It won't get an official release until WCT7.0 is out of preview.
However, it may go into the nightly build of WinTS before then.

@mrlacey
Copy link
Collaborator Author

mrlacey commented Nov 7, 2020

Docs for migrating existing apps built with MVVM Basic to use MVVM Toolkit can be found at https://github.com/windows-toolkit/MVVM-Samples/blob/master/docs/mvvm/MigratingFromMvvmBasic.md.
These will eventually be published on docs.microsoft once the toolkit is out of preview.

@mrlacey
Copy link
Collaborator Author

mrlacey commented Nov 12, 2020

This will go into nightly builds shortly.
Expect the release in whatever comes after 3.9 (don't yet know if this will be 3.10 or 4.0)

@mrlacey mrlacey added Can Close Out Soon Work relating to this issue has been completed. and removed in-progress The issue is currently being actively worked on. labels Nov 18, 2020
@mvegaca
Copy link
Collaborator

mvegaca commented Nov 19, 2020

WinUI3 Templates updated to MVVM Toolkit to Preview 4 in PR #3960

@michael-hawker
Copy link

Wanted to give folks a heads up, we had some people reach out to us after our .NET Conf talk. Seems like some community members are trying to work to keeping Caliburn.Micro alive as called out on the previously linked thread: Caliburn-Micro/Caliburn.Micro#708.

Not sure how that effects plans or if you want to spin that part out as a separate issue. I think the original discussion around the MVVM Toolkit replacing both MVVM Basic and MVVM Light at least is still solid.

@michael-hawker
Copy link

See issues have been filed for tracking 7.0.0-preview5 #4104 and #4067 which we shipped last week.

We'll be hoping to ship our final bits next week, so we don't expect any changes to the MVVM bits outside of if we identify any other bug or XML doc fixes before release.

@mrlacey mrlacey changed the title Microsoft.Toolkit.Mvvm to replace MVVMBasic, MVVMLight, & Caliburn.Micro templates Microsoft.Toolkit.Mvvm to replace MVVMBasic& MVVMLight templates Mar 11, 2021
@mrlacey
Copy link
Collaborator Author

mrlacey commented Mar 15, 2021

I believe the only thing preventing this from being ready for release is updating the documentation accordingly.
I'll raise a separate issue for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Caliburn.Micro Issues specifically related to generating a project with the Caliburn.Micro framework. Can Close Out Soon Work relating to this issue has been completed. framework The issue is a request to support a specific additional framework. meta Used to indicate the issue relates to how the project is run or the tool works. MVVM Basic Issues specifically related to generating a project with the MVVM Basic framework. MVVMLight Issues specifically related to generating a project with the MVVMLight framework. UWP Relates to generated UWP projects WPF Relates to generated WPF projects
Projects
None yet
Development

No branches or pull requests

7 participants