C# Forms - MVC 框架?
我需要开发一个带有数据库后端的表单应用程序。将来这可能会链接到 ASP.NET 页面。我正在考虑将其作为 MVC 来完成,并在以后重用。
那么,您使用什么样的 MVC 框架?
我对快速构建表单以及将控件链接/绑定到数据库字段的任何框架感兴趣。
I need to develop a forms application with a DB backend. In future this may be linked to ASP.NET page. I was thinking of doing this as an MVC and reuse later.
So, What kind of MVC frameworks do you use?
I am interested in building forms quickly and any frameworks that link/bind control to database fields.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Windows 窗体没有真正著名的 MVC 框架。这可能有一个很好的理由 - 由于技术的本质,使用 Windows 窗体实现 MVC 确实很困难。我认为将 MVVM 与 Windows 窗体一起使用会更好,我是作为 MVC 的忠实粉丝这么说的。
否则,您需要向我们提供有关您正在做的事情的更多详细信息,然后我们可能会提供一些更好的建议。
There are no really famous MVC frameworks for Windows Forms. There is probably a good reason for this - it's really difficult to implement MVC with Windows Forms due to the nature of the technology. I think you're much better off using MVVM with Windows Forms and I'm saying this as a huge fan of MVC.
Otherwise you need to give us more details of what you're doing and then we could probably offer some better advice.
此 O/R-Mapping-Framework 包括 MVC 和命令模式的解决方案,推荐用于桌面 -应用。
有一个演示应用程序演示了一个简单的 Win-Forms-应用程序。
This O/R-Mapping-Framework includes a Solution for the MVC and Command-Pattern, which is recommended for Desktop-Applications.
There is a Demo-Application which demonstrates a simple Win-Forms-Application.
据我所知,对于 web 应用程序 (mvc2) 来说,winforms 没有特定的 mvc 框架。您必须自己实现 mvc (或更好的 mv Presenter)模式。请参阅此链接 http://msdn.microsoft.com/en-us/magazine/ cc188690.aspx
In my knowledge there isn't a specific mvc framework for winforms, as for web applications (mvc2) . You'll have to implement the mvc (or better mv presenter) pattern by yourself. See this link http://msdn.microsoft.com/en-us/magazine/cc188690.aspx
MVC 实际上只是一种构建代码的模式。
如果您确实打算稍后将您的应用程序移植到网络上,那么我建议您使用 MVVM 模式将其编码为 WPF 应用程序,因为从长远来看,这会减少工作量。
或者,如果从一开始就使用 ASP。
MVC is really only a pattern to structure your code around.
If you are really going to take your app and port it to be available over the web later on then may I suggest that you code it as a WPF application using the MVVM pattern as this will involve less work in the long run.
Alternatively if use ASP from the start.