Winforms or WPF MVC

All,

As far as I understand, ASP.NET MVC is an environment that implements the MVC pattern released by my Microsoft. I wonder why there are no Winforms or WPF MVC implementations? The reason I ask is because I plan to start a new big WinForms project, and ideally we are looking for an infrastructure that implements some kind of common template to improve the testability of our solution.

Thanks MK

+4
source share
6 answers

For WPF, the MVVM template is so deeply rooted in the structure itself that you really don't see it until someone points it to you. You really don't need a separate structure for this (although some types, such as Josh Smith RelayCommand, would be nice to have in BCL).

Windows Forms is no longer built anymore, so you don't see any new or thriving MVC frameworks for this platform. However, the Composite Application Block (CAB) patterns and methods were an attempt at such a structure.

Most people find the CAB too complex to their liking, but I personally find it a valuable endeavor, even if it were easier to use. It is still available and available in source code format, so you can take a look at it.

However, if at all possible, implement the application as a WPF application.

+3
source

If you want to use WPF, you should study the MVVM (Model View View-Model) pattern.

Here you can download the template for Visual Studio. I think this is part of the WPF Toolkit. Take a look at CodePlex.com.

Hope this helps!

+1
source

There are several similar SO questions here and here .

Just because there is no strict structure for MVC in webforms / wpf does not mean that you cannot follow the principles and code with MVC. I think the MVVM for WPF is similar, although I have no experience with this.

+1
source
+1
source

WinForms are dead. You better look at WPF + MVVM (+ Prism)

0
source

What a wonderful question I asked here: Why is there no MVC framework for WPF? I spent 6 years on the WPF platform to find out:

  • Further development of the WPF toolkit has never occurred since the release at the beginning.
  • Web browser hosting in WPF still has serious airspace issues.
  • The chart has never been fully ported to WPF.
  • VS2013 has never been provided with the MVVM WPF template for new projects.
  • Prism is confused.
  • The learning curve is steep.
  • The open community has hardly developed any open libraries. How Javascript did it.
  • Launch as an application in a browser. it was very difficult to get right.
  • Compared to Web-Client rendering, this is just slow.
  • And perhaps the worst of all Microsoft went to us. Until recently, they announced that they were back in the game, but if you look at their plans, it’s more like releasing Sunset than returning to the game.

    The solution for me is to reset WPF in favor of the MVC that I did. MVC has its quirks, but it is a much more convenient platform than the insightful structure, which is best suited to use the "Relay Command", which is a lot of nonsense.

Imagine that your boss said that we need this in a web browser and your answer is "He will be ready tomorrow" ...

0
source

Source: https://habr.com/ru/post/1301105/


All Articles