将每个模块构建为.NET中的服务并在MVC Web应用程序中使用它 [英] Building each module as service in .NET and consuming it in MVC web app

查看:59
本文介绍了将每个模块构建为.NET中的服务并在MVC Web应用程序中使用它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去两年我一直在构建mvc应用程序,大部分时间我都有一个类库作为BLL,一个是DAL和DTO。但是现在我想构建不同的模块,并将每个模块作为前端的RESTful服务使用。与此同时,我希望有一个公共库,我可以在其中进行身份验证和常见对象。对不起,问题是如此开放,但任何人都可以建议我如何实现这一点,这样我就可以保持每个.net模块分开并松散耦合,但在前端消耗一次RESTful服务?



我尝试了什么:



我用不同的dll构建了不同的类库但不知道如何构建模块以便它们如何松散耦合,易于更改。

I have been building mvc apps for the last two years and most of the time I have one class library as a BLL, one DAL and DTO. However now I want to build different modules and have each module consumed as a RESTful service on the frontend. At the same time, I want to have a common library where I can hand authentication maybe and common objects. Sorry the question is so open ended but can anyone suggest how I can achieve this so I can keep each .net module separate and loosely coupled but consume a RESTful service once on the frontend?

What I have tried:

I have built different class libraries with different dlls but not sure how to structure modules so they loosely coupled and easy to change.

推荐答案

请参阅我对该问题的评论。我看不到任何特殊问题,除了您的申请特有的问题,您没有与我们分享。您可以从这里开始:使用WCF 3.5设计和构建RESTful Web服务指南 [ ^ ]。



-SA
Please see my comments to the question. I cannot see any special problems there except possible problems specific to your application, which you did not share with us. You can start here: A Guide to Designing and Building RESTful Web Services with WCF 3.5[^].

—SA


这篇关于将每个模块构建为.NET中的服务并在MVC Web应用程序中使用它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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