I would appreciate if someone can provide some insight into which one is more beneficial.
如果有人能够提供一些更有益的信息,我将不胜感激。
RESTful service in WCF can provide the same functionaly as ASP.Net MVC Controller, i.e URLS can be formed appropriately using Controller/Action.
WCF中的RESTful服务可以提供与ASP.Net MVC Controller相同的功能,即可以使用Controller / Action适当地形成URL。
Is there real benefit of using one over the other.
使用其中一个是否真的有益处。
WCF Rest service will provide.. 1) Cert Authentication out of the box 2) Logging 3) Message Headers etc
WCF Rest服务将提供.. 1)开箱即用的证书认证2)记录3)消息标题等
MVC 1) Different Action Results out of the box
MVC 1)开箱即用的不同行动结果
If someone has used or debated these two technologies . please let me know
如果有人使用或辩论过这两种技术。请告诉我
UPDATE:
更新:
I went ahead with the MVC Model as it gives me lot of flexibility and I can use the same action to render different views with CustomActionInvoker, which is really cool!!!
我继续使用MVC模型,因为它给了我很大的灵活性,我可以使用相同的动作用CustomActionInvoker渲染不同的视图,这真的很酷!
-RN
-RN
3 个解决方案
#1
0
WCF makes your service more manageable and offers more protocol options like TCP, Named Pipes, PerChannel, and MSMQ.
WCF使您的服务更易于管理,并提供更多协议选项,如TCP,命名管道,PerChannel和MSMQ。
#2
0
WCF gives you the ability to specify multiple methods of binding to the service through the web.config including restful urls, giving you greater flexibility. In conrast, mvc provides you with the ability to easily construct resful urls and output data via code in much the same way as you do a web application, which is really easy and requires minimal additional knowledge if you already know mvc.
WCF使您能够通过web.config指定多种绑定到服务的方法,包括restful urls,为您提供更大的灵活性。相反,mvc为您提供了通过代码轻松构建可靠URL和输出数据的能力,其方式与您执行Web应用程序的方式非常相似,如果您已经了解mvc,这非常简单并且需要最少的额外知识。
My recommendation would be to go with wcf if the service is really important to the overall solution, likely to be called in a different or many ways or has or is likely to have special security requirements.
如果服务对整体解决方案非常重要,可能会以不同或多种方式调用,或者具有或可能具有特殊安全要求,那么我的建议是使用wcf。
On the other hand I would go mvc if this is meant to be a quick and simple isolated solution or perhaps is just providing a different representation of data being output in an existing .net mvc application.
另一方面,如果这是一个快速简单的孤立解决方案,或者只是提供在现有.net mvc应用程序中输出的数据的不同表示,我会转到mvc。
#3
0
At this point in time, your best option is ASP.NET MVC. It provides cleaner access to the HTTP primitives you need to be able to design RESTful solutions.
此时,您最好的选择是ASP.NET MVC。它提供了对能够设计RESTful解决方案所需的HTTP原语的更清晰的访问。
The only significant advantages of WCF Rest is the ability to self-host the service and if you want to use ADO.NET Data Services to deliver OData/Atom services, then obviously WCF is your best choice.
WCF Rest的唯一显着优势是能够自托管服务,如果您想使用ADO.NET Data Services提供OData / Atom服务,那么显然WCF是您的最佳选择。
#1
0
WCF makes your service more manageable and offers more protocol options like TCP, Named Pipes, PerChannel, and MSMQ.
WCF使您的服务更易于管理,并提供更多协议选项,如TCP,命名管道,PerChannel和MSMQ。
#2
0
WCF gives you the ability to specify multiple methods of binding to the service through the web.config including restful urls, giving you greater flexibility. In conrast, mvc provides you with the ability to easily construct resful urls and output data via code in much the same way as you do a web application, which is really easy and requires minimal additional knowledge if you already know mvc.
WCF使您能够通过web.config指定多种绑定到服务的方法,包括restful urls,为您提供更大的灵活性。相反,mvc为您提供了通过代码轻松构建可靠URL和输出数据的能力,其方式与您执行Web应用程序的方式非常相似,如果您已经了解mvc,这非常简单并且需要最少的额外知识。
My recommendation would be to go with wcf if the service is really important to the overall solution, likely to be called in a different or many ways or has or is likely to have special security requirements.
如果服务对整体解决方案非常重要,可能会以不同或多种方式调用,或者具有或可能具有特殊安全要求,那么我的建议是使用wcf。
On the other hand I would go mvc if this is meant to be a quick and simple isolated solution or perhaps is just providing a different representation of data being output in an existing .net mvc application.
另一方面,如果这是一个快速简单的孤立解决方案,或者只是提供在现有.net mvc应用程序中输出的数据的不同表示,我会转到mvc。
#3
0
At this point in time, your best option is ASP.NET MVC. It provides cleaner access to the HTTP primitives you need to be able to design RESTful solutions.
此时,您最好的选择是ASP.NET MVC。它提供了对能够设计RESTful解决方案所需的HTTP原语的更清晰的访问。
The only significant advantages of WCF Rest is the ability to self-host the service and if you want to use ADO.NET Data Services to deliver OData/Atom services, then obviously WCF is your best choice.
WCF Rest的唯一显着优势是能够自托管服务,如果您想使用ADO.NET Data Services提供OData / Atom服务,那么显然WCF是您的最佳选择。