简体   繁体   English

MVC .NET 或 WEB API

[英]MVC .NET or WEB API

We want to write a new web site for customer using SQL DB and implement only one specific client.我们想为使用 SQL DB 的客户编写一个新网站,并且只实现一个特定的客户端。

what the recommended technology to be used:推荐使用什么技术:

  • Peure MVC.net纯MVC.net
  • Web API and client side using AJAX使用 AJAX 的 Web API 和客户端

I will be glad to hear the causes, the consideration and the cost.我会很高兴听到原因、考虑和成本。

Thanks!谢谢!

I tend to favour a web api to handle all of the database work (via entity framework), but use MVC for my front end application.我倾向于使用 Web api 来处理所有数据库工作(通过实体框架),但我的前端应用程序使用 MVC。

This way you have all the flexibility of an API should you want to use different frameworks in the future (Angular, ASP.net 5 etc), but you can still have the pleasure of working MVC in your front end site.这样,如果您将来想使用不同的框架(Angular、ASP.net 5 等),您就可以拥有 API 的所有灵活性,但您仍然可以享受在前端站点中使用 MVC 的乐趣。

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

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