业务层依赖于db表结构还是WebPages? [英] Business layer depends upon db table structure or WebPages?

查看:103
本文介绍了业务层依赖于db表结构还是WebPages?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法决定多少没有。 BLL课程将是他们在我的网络项目中。?

我很困惑,那个网页表格应该有BLL课程吗?或者取决于数据库表结构。

在我的2层项目中我有5个表和11个webforms。

请举例说明我的问题。

i cant decide how many no. of BLL classes will be their in my web project.?
i am confused that ..each Web form should have there BLL class? Or Depends upon database table structure.
in my 2 tier project i have 5 tables and 11 webforms.
please give some examples over my question.

推荐答案

通常BLL类映射到DB。请记住,DB与表示层(此处为Web表单)是隔离的,所以这不是一种常见的方法你不应该将webforms映射到BLL。



有关业务层的更多信息此处 [ ^ ]。



问候。
Hi, generally BLL class is mapped to DB. Remember that DB is isolated from presentation layer (web forms here) so it's no a common approach you shouldn't map webforms to BLL.

More info about Business Layer here[^].

Regards.


BLL作为Data Tier和Presentation Tier之间的桥梁。在传递给表示层之前,所有数据都通过业务层。业务层是业务逻辑层,数据访问层和价值对象以及用于添加业务逻辑的其他组件的总和。



查看更多详情

http://msdn.microsoft.com/en-us/library/bb470374.ASPX [ ^ ]

C#.NET中的三层架构 [ ^ ]
BLL working as the bridge between Data Tier and Presentation Tier. All the Data passes through the Business Tier before passing to the presentation Tier. Business Tier is the sum of Business Logic Layer, Data Access Layer and Value Object and other components used to add business logic.

See more details
http://msdn.microsoft.com/en-us/library/bb470374.ASPX[^]
Three Layer Architecture in C# .NET[^]


Hi Utm,



业务逻辑层包含所有业务逻辑。它的职责是验证组件的业务规则并与数据访问层进行通信。业务逻辑层是我们编写从表示层获取数据并通过数据访问层将数据发送到数据库的函数的类。



我的建议:



BLL类与我们在UI上需要的相关。



实体类与我们在数据库中需要的内容相关。



有时候我们正在使用面向服务的架构,在这种情况下我们不能直接传递实体所以我们需要根据我们需要设计的DTO(数据传输对象)在UI上。



业务逻辑层将数据发送到数据访问层,不会根据表示层向数据库发送业务逻辑层设计。



C#中的3层架构 [< a href =http://www.codeproject.com/Articles/11128/tier-architecture-in-Ctarget =_ blanktitle =New Window> ^ ]



http://www.dotnetfunda.com/articles/show/71/3-tier-architecture- in-aspnet-with-csharp [ ^ ]
Hi Utm,

Business logic layer contains all of the business logic. Its responsibility is to validate the business rules of the component and communicating with the Data Access Layer. Business Logic Layer is the class in which we write functions that get data from Presentation Layer and send that data to database through Data Access Layer.

My Suggestion:

BLL Classes related to what we need on UI.

Entity Classes related to what we need in database.

Sometime we are working with Service oriented Architecture in that case we can't pass entity directly so we need DTO (data transfer object) that we design according to what we need on UI.

Business Logic Layer sends data to Data Access Layer, does not send to Database so Business Logic Layer Design according to presentation layer.

3-tier architecture in C#[^]

http://www.dotnetfunda.com/articles/show/71/3-tier-architecture-in-aspnet-with-csharp[^]


这篇关于业务层依赖于db表结构还是WebPages?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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