在C#和WCF库模式web服务?

在C#和WCF库模式web服务?

问题描述:

任何人都可以确认到存储库图案web服务集成的最佳途径....嗯,事实上我有我的仓库啪嗒啪嗒现在工作在C#。我有3个项目,数据访问,服务和我的presentation层。

Can anyone confirm the best way to integrate the repository pattern with webservices.... Well actually i have my repository patter working now in c#. I have 3 projects, DataAccess, Services and my presentation layer.

问题是我的presentation层是一些事情...我有一个ASP.NET MVC的网站,我有一个WPF应用程序,我们要创建另一个网站+外部公司需要我们的代码库访问也。

Problem is my presentation layer is a number of things... I have a ASP.NET MVC site, I have an WPF application and we are about to create another site + an external company needs access to our repository also.

目前我刚才添加的服务层作为参考每个站点的...但不是通过Web服务提供数据访问正常的方式? (WCF) - 如果是,这将打破这一服务层的情况?或者我应该在服务层转换为Web服务?

Currently i have just added the services layer as reference to each of the sites... But is not the normal way to provide data access via web services? (WCF) - if this is the case will this break the services layer? or should i convert the services layer to a web service?

有人知道的利弊是这一点,速度??

Anybody know what the PROS and CONS are of this, speed??

我想我明白你的困境。如果我理解正确的话那么你的服务层由纯属捏造的。 http://en.wikipedia.org/wiki/GRASP_(Object_Oriented_Design )

I think I understand your dilemma. If I understand correctly then your services layer consists of pure fabrications. http://en.wikipedia.org/wiki/GRASP_(Object_Oriented_Design).

如果我假设上述正确的话,那么你的服务层不应该在所有通过引入WCF的影响。 WCF本质上是一个额外的presentation层,提供互操作性,您的UI presentation层和任何业务逻辑层之间坐着。所以,你的WCF服务会再调用你的服务层,根据需要可访问资源库。

If I assume correctly above, then your services layer should not be impacted at all by the introduction of WCF. WCF is essentially an additional presentation layer that provides interoperability, sitting between your UI presentation layer and any business logic layers. So your WCF services would then call your services layer, which may access repositories as needed.

WCF提供了高度的互操作性,所以我认为这是一个很好的选择。我会用basicHttp绑定不过,如果你打算用不同的编程语言互操作,因为这是最灵活的。不要担心速度。有很多在那里的解决方案,以减轻由于WCF导致的任何瓶颈。

WCF provides a high degree of interoperability so I think it is an excellent choice. I would use basicHttp bindings though, if you intend to interop with different programming languages as this is the most flexible. Don't worry about the speed. There are plenty of solutions out there to mitigate any bottlenecks that result due to WCF.

祝你好运,让我知道如果我能以任何其他方式提供帮助。

Good luck, and let me know if I can help in any other way.