how to create windows application with mvc

2019-05-27 06:06发布

问题:

hii is it possible to create windows application with mvc

回答1:

MVP (Model-View-Presenter) and MVP-VM (Model-View-Presenter-ViewModel) is used most often with WinForms.

See SO question: MVP examples for Windows Forms

Dan Bunea's Blog Post: Model View Presenter

Jeremy D. Miller's Blog Post: A Simple Example of the "Humble Dialog Box"

Referance: Mitch Wheat



回答2:

MVC the pattern: definitely yes! That's platform independent, really.

See some resources:

  • Looking for clean WinForms MVC tutorial for C#
  • Selecting a MVC/MVP Implementation for a Winforms Project
  • Mvc for Winforms - Mapping the View event to the Controller action


回答3:

Keep only user interface code in the Form object(s). Any interaction between the UI and the data or manipulation of the data should go in its own controller class(es). The domain objects or the data itself is the model.



回答4:

Read the http://www.objectmentor.com/resources/articles/TheHumbleDialogBox.pdf but you may want to look at WPF and MVVM