使用 Web Client Software Factory 2010 时创建数据访问层

发布于 2024-09-08 05:42:53 字数 111 浏览 0 评论 0 原文

我正在探索 WCSF,想知道数据访问层是如何创建的?我发现的一些文章已有两年历史,讨论如何使用 Web 服务工厂。我正在使用 VS 2010 和 .Net 4.0。我正在寻找一些带有现实世界示例的示例和教程。

I am exploring WCSF and wondering how is the data access layer created? Some of the articles I have found are two years old and talk about using Web Service Factory. I am using VS 2010 and .Net 4.0. I am looking for some sample and tutorials with real world examples.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

謸气贵蔟 2024-09-15 05:42:53

Web 客户端软件工厂不提供创建数据访问层的自动化指导。它的重点主要是提供指导以促进复合 Web 应用程序的开发(即由单独的模块组成的 Web 应用程序,通常由不同的开发团队开发)。

有多种方法可以完成数据访问,但您可能需要查看的一些资源是 ASP.Net MVC 书呆子晚餐教程S#arp 架构项目, Code Camp Server 源,以及 微软模式与实践数据访问指南。所有这些都使用存储库模式的变体,这是遵循领域驱动设计的团队中的主要方法。

The Web Client Software Factory doesn't provide automated guidance for creating the data access layer. It's focus is primarily on providing guidance to facilitate composite Web application development (i.e. Web applications which are comprised of individual modules, often developed by different development teams).

There are several approaches for accomplishing data access, but a few resources you might want to check out are the ASP.Net MVC Nerd Dinner tutorial, the S#arp Architecture project, the Code Camp Server source, and the Microsoft Pattern & Practices Data Access Guidance. All of these use variations of the Repository pattern which is the predominate approach among teams following Domain-Driven Design.

戴着白色围巾的女孩 2024-09-15 05:42:53

WCSF2010 源文件中隐藏了一个很好的参考实现,以及一些其他示例。在 http://webclientguidance.codeplex.com 上,单击“Web Client Software Factory 2010 源”,然后下载 WCSF2010Source.zip。在里面您将找到 Trunk\Source\GlobalBankRI\GlobalBank.Commercial.EBanking (VSTS Tests).sln,它是 WCSF 许多方面的一个很好的示例,包括通过 WCF 服务进行数据访问。 Trunk\Source 文件夹中还有一些其他更简单的示例。

只有 ETF 模块已完全构建完成。每个视图呈现器都使用 ETFController 来管理所有呈现器通用的数据。 ETFController 使用 IAccountServiceAgent 的实例,由 AccountServiceAgent 实现(用于非单元测试),该实例注册为模块。 AccountServiceAgent 使用充当 WCF 引用代理的类。要使用的代理实例 AccountServiceProxy 是硬编码的。

WCSF 的实际源代码位于 BlocksTrunk\Source 中。

是的,一点也不容易找到。我不记得是什么让我下载了这个并在里面寻找这样的例子。当然不是我在网站上读到的任何内容。

我已经使用此示例构建了一个 Web 应用程序,该应用程序可以访问 SQL 数据并抓取网站(如果您想看一下)。它仍在开发中,但数据访问位非常稳定:http://lcbodrinkfinder.codeplex.com/

There is a good reference implementation hidden in the WCSF2010 Source file, and a few other examples. On http://webclientguidance.codeplex.com, click Web Client Software Factory 2010 Source and then download WCSF2010Source.zip. Inside you'll find Trunk\Source\GlobalBankRI\GlobalBank.Commercial.EBanking (VSTS Tests).sln, which is a pretty good example of many aspects of WCSF, including data access through a WCF service. There are some other simpler examples in the Trunk\Source folder.

Only the ETF module is fully built out. Each view presenter uses an ETFController to manage data common to all presenters. The ETFController uses an instance of IAccountServiceAgent, realized by AccountServiceAgent (for non-unit testing), which is registered as a module. AccountServiceAgent uses a class that acts as a proxy for the WCF reference. The proxy instance to use, AccountServiceProxy, is hardcoded.

The actual source code for WCSF is in BlocksTrunk\Source.

Yeah, not at all easy to find. I don't remember what made me download this and look inside for such examples. Certainly not anything I read on the website.

I've used this example to build a web app that access SQL data and scrapes a website, if you'd like to take a look. It's still under development, but the data access bits are pretty firm: http://lcbodrinkfinder.codeplex.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文