简体   繁体   English

什么是ASP.NET MVC的客户端/服务器等效项

[英]What is the Client/Server Equivalent for ASP.NET MVC

I used to build a website on ASP.NET MVC. 我曾经在ASP.NET MVC上建立网站。 Now I want to build another web service. 现在,我想构建另一个Web服务。 This time, I want to use a client application (running on Windows) and no web pages are needed. 这次,我想使用客户端应用程序(在Windows上运行),不需要任何网页。 What technology should I choose? 我应该选择什么技术? I am still using C# on both server- and client-side, and I might use mySQL. 我仍然在服务器端和客户端都使用C#,并且可能会使用mySQL。 Thank you very much. 非常感谢你。

I would strongly suggest WPF for client side. 我强烈建议客户端使用WPF。 It has a similar MVC architecture and uses XAML for UI which is simple to learn but very powerful. 它具有类似的MVC架构,并使用XAML进行UI学习,虽然简单易学,但功能非常强大。 Server can be a service if no gui is needed. 如果不需要gui,则服务器可以是服务。

You could use a classic 3-tiers architecture: 您可以使用经典的3层架构:

  • UI client application in WPF (which provides the nice MVVM pattern for UI/Logic separation) WPF中的UI客户端应用程序(为UI /逻辑分离提供了很好的MVVM模式)
  • WCF webservices for the backoffice, IIS hosting (C# assemblies) 用于后台的WCF Web服务,IIS托管(C#程序集)
  • Entity Framework as an ORM 实体框架作为ORM

It is ASP.NET Web API , which is new in ASP.NET MVC 4 <1> . 它是ASP.NET Web API ,它是ASP.NET MVC 4 <1>中的新增功能。

ASP.NET MVC 4 is under RC by the time of writing. 在撰写本文时,ASP.NET MVC 4处于RC之下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM