n 层设计混乱

发布于 2024-08-03 08:44:39 字数 467 浏览 0 评论 0原文

谁能给我提供一个网页链接,其中显示了 n 层设计的正确方法以及 VS2005 和 C# 中的示例源代码?

我有一点很困惑,如果我创建如下所示的层:

   UI
   |
Business Logic
   |
  Data Access

那么我怎样才能实现真正的 OOP?

因为在 OOP 中,所有活动都应该封装在一个对象中。

根据我的想法,这应该是这样分层的:

   UI
   |
Business Objects
   |
Business Logics
   |
Data Access

但是当尝试像这样设计图层时,我遇到了循环引用问题。

我的一个朋友告诉我,他用反射解决了这个问题。

那么将 ac# 应用程序分层的行业标准方法是什么?

一个紧迫的问题是,哪一层托管 OR 映射?

Can anyone provide me with a web link that shows a correct approach of n-Layered design with example source-code in VS2005 and C#?

I am confused in one point, If I am creating layers like the following:

   UI
   |
Business Logic
   |
  Data Access

then how can I achieve true OOP?

Coz In OOP all activities should be encapsulated within an Object.

According to my thought, this should be layered like this:

   UI
   |
Business Objects
   |
Business Logics
   |
Data Access

But when trying to design layers like this I experienced Circular Reference Problem.

One of my buddy told me that, he solved this problem with Reflection.

So what is the industry-standard approach in separating a c# application into layers?

And a burning question is, which layer hosts the OR-Mapping?

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

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

发布评论

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

评论(1

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