业务层依赖于db表结构还是WebPages?

编程入门 行业动态 更新时间:2024-10-24 04:33:16
本文介绍了业务层依赖于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之间的桥梁。在传递给表示层之前,所有数据都通过业务层。业务层是业务逻辑层,数据访问层和价值对象以及用于添加业务逻辑的其他组件的总和。 查看更多详情 msdn.microsoft/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 msdn.microsoft/en-us/library/bb470374.ASPX[^] Three Layer Architecture in C# .NET[^]

Hi Utm, 业务逻辑层包含所有业务逻辑。它的职责是验证组件的业务规则并与数据访问层进行通信。业务逻辑层是我们编写从表示层获取数据并通过数据访问层将数据发送到数据库的函数的类。 我的建议: BLL类与我们在UI上需要的相关。 实体类与我们在数据库中需要的内容相关。 有时候我们正在使用面向服务的架构,在这种情况下我们不能直接传递实体所以我们需要根据我们需要设计的DTO(数据传输对象)在UI上。 业务逻辑层将数据发送到数据访问层,不会根据表示层向数据库发送业务逻辑层设计。 C#中的3层架构 [ ^ ] www.dotnetfunda/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#[^] www.dotnetfunda/articles/show/71/3-tier-architecture-in-aspnet-with-csharp[^]

更多推荐

业务层依赖于db表结构还是WebPages?

本文发布于:2023-11-15 23:45:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1599038.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:结构   业务   依赖于   db   WebPages

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!