English 中文(简体)
有几个数据存取的逻辑组成部分与只有一个
原标题:Having several data access logical components vs having just one
  • 时间:2009-10-05 18:42:38
  •  标签:

www.un.org/Depts/DGACM/index_spanish.htm

Say DB有三个表格:Customer,OrderProducts。 多功能层可以只使用一个类别(卡一个数据存取逻辑部分)在所有三个表格上进行CRUD业务,或者可以使用三个不同类别(卡三个不同的逻辑部分):

1) Customer Data Access Logic Component www.un.org/Depts/DGACM/index_spanish.htm 2) Order Data Access Logic Component www.un.org/Depts/DGACM/index_spanish.htm 3) Products Data Access Logic Component

www.un.org/Depts/DGACM/index_spanish.htm

就我所知,有三个数据存取的逻辑组成部分(因此有三个类别)的唯一不利之处是,LL层将需要(利用思考)三个不同的类别(DAL层)而不是一个?

www.un.org/Depts/DGACM/index_spanish.htm

So what are some pros and cons of: www.un.org/Depts/DGACM/index_spanish.htm a) having three data access logical components? www.un.org/Depts/DGACM/index_spanish.htm b) having just one data access logical component?

www.un.org/Depts/DGACM/index_spanish.htm

页: 1

最佳回答

Nearly all of the applications I have seen use separate classes per DB table. This is also the way code generators typically work. Some reasons for this are: 1. you only need to instantiate objects for those tables you need to access, which has a smaller memory footprint (imagine a DB with 100 tables). 2. Code is more modular so that smaller pieces may be edited by different developers simultaneously.

也许只有一个目标的好处是,需要较少的即时电话,但这对大多数申请来说可能是微不足道的有利条件,因此我相信,组合办法通常较好。

最后,除非你事先不了解你的非行课名称,否则你就不需要思考。

问题回答

暂无回答




相关问题
热门标签