Web Api或Mvc最适合我的项目? [英] Web Api or Mvc which is best for my project?

查看:104
本文介绍了Web Api或Mvc最适合我的项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我想开发这样的服务,接受来自任何类型设备(Android,Ios,Windows)的请求。在提出请求后,我想处理业务逻辑。无论我从业务层获得什么结果,我都希望通过服务超越它到设备。

目前我正在考虑使用web api。

所以我想知道是否需要mvc实现或个人web api项目可以处理所有这些。



业务层< ===> Web Api< ===>设备类型[ios,windows,android,...]



plz回复...

Hello, I want to develop such a service which accepts request from any type of device (Android, Ios, Windows). And after request is taken i want to handle business logic. And whatever result i will get from business layer i want to surpass it to the Devices via services.
Currently i am thinking about to use web api.
So I want to know is that is there will be any need of mvc implementation or individual web api project can handle all this.

business layer <===> Web Api<===> Device type [ios, windows, android,...]

plz reply...

推荐答案

MVC是一种用于创建Web应用程序的设计模式。

WebAPI类似于MVC(在控制器,模型,路由等方面),你可以通过消费它将它暴露给任何设备,即Android,iOS,WP。



所以简短的回答是:如果你想在基于网络的项目中使用你的服务,你当然可以想到一个MVC。



-KR
MVC is a design pattern to create a web application.
WebAPI is similar to the MVC (in terms of Controllers, Models, Routes etc), you can expose it to any device i.e Android, iOS, WP by consuming it.

So the short answer would be: If you want your service to be consumed on web-based project, you can certainly think of an MVC.

-KR


这篇关于Web Api或Mvc最适合我的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆