建筑问题 [英] architecture question

查看:72
本文介绍了建筑问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个项目,并且首席开发人员希望将所有

业务逻辑放在数据库端。他希望proc执行所有

逻辑并动态创建XML,解析数据等,然后将

最终结果返回给业务层。我推回说,业务

层应该做所有的逻辑,只需要SQL返回所需的数据和

然后让代码完成所有的XML创建,解析数据等我是

告诉我错了,这不是最好的做法。

现在,这个应用程序总共可以达到100分 - 每天500个用户,并且数据库执行所有处理可能会对性能造成影响。然后他提到了一些关于在数据库端使用临时表的东西,做一个

选择,然后插入临时表,然后在临时表上做一个选择

并执行业务逻辑。我也推迟了这个......


现在,我不是DBA而是开发人员,而且我已经看到了数据库的性能提升
当在数据库端执行此类逻辑时,
,所以我的问题是,哪个
将是最好的解决方案?

解决方案

" Jon" < Jo *@community.nospam.com写信息

新闻:%2 **************** @ TK2MSFTNGP04.phx.gbl ...


我正在研究一个项目,主要开发人员希望将所有

业务逻辑放在数据库端。他希望proc执行所有

逻辑并动态创建XML,解析数据等,然后将

最终结果返回给业务层。我推回说,

业务层应该完成所有的逻辑,只需让SQL返回所需的数据,然后让代码完成所有的XML创建,解析数据,

等我被告知我错了,这不是最好的做法。

现在,这个应用程序可以达到100分钟每天500个用户,并且数据库执行所有处理可能会对性能造成影响。然后他提到了一些关于在数据库端使用临时表的东西,做一个

选择,然后插入临时表,然后对temp进行选择

表并执行业务逻辑。我也推迟了这个......


现在,我不是DBA而是开发人员,我已经看到了DB'的表现

在数据库端执行此类逻辑时会命中,所以我的问题是

,这是最好的解决方案吗?



业务层对XML的作用是什么?它是否成为一个对象,或者是纯粹的数据,如报告数据?


PS


如果您的首席开发人员建议这样做,那么我认为您需要一个新的

首席开发人员。


谢谢

Robb Andrew


开发人员正在生成自己的XML以返回到C#web

服务。虽然他正在创建一个数据集并从他调用数据库的方法

返回,但是他有一个存储过程在

中生成XML,然后只使用它作为他填充网格的数据集,

列表框等等。

所以XML不用于报告,只是被创建然后

用于填充网格,文本框,标签,列表框等。


他正在创建自己的数据集XML而不是使用XML格式
在.NET中创建数据集时返回
,尽管他的数据集XML和.NET返回的那个实际上是彼此镜像的,所以为什么他要创建自己的

XML我不知道


" PS" < ec *********** @ hotmail.comwrote in message

news:u4 ************** @ TK2MSFTNGP06.phx。 gbl ...


" Jon" < Jo *@community.nospam.com写信息

新闻:%2 **************** @ TK2MSFTNGP04.phx.gbl ...


>我正在开发一个项目,主要开发人员希望将所有的业务逻辑放在数据库端。他希望proc能够完成所有的逻辑并动态创建XML,解析数据等,然后将最终结果返回给业务层。我推回说,
业务层应该做所有的逻辑,只需要SQL返回所需的数据,然后让代码完成所有的XML创建,解析数据等我告诉我错了,这不是最好的做法。
现在,这个应用程序每天可以达到100-500个用户的数据库,并且让数据库完成所有操作处理可能会影响性能。然后他提到了在数据库端使用临时表,做一个选择,然后插入临时表,然后在temp
表上做一个select并做业务逻辑。我也推迟了这个......

现在,我不是DBA而是开发人员,而且我已经看到DB在执行逻辑时遇到了性能问题。在数据库方面,所以我的问题是,这是最好的解决方案吗?



业务层对XML的作用是什么?它是否成为一个对象或

是XML纯数据报告数据吗?


PS



I''m working on a project and the lead developer wants to put all of the
business logic on the database side. He wants the proc to do all of the
logic and create XML on the fly, parse out data, etc, and then return the
final result to the business layer. I pushed back and said that the business
layer should do all of the logic, just have SQL return the data needed and
then have the code do all of the XML creation, parsing of data, etc. I was
told I was wrong and thats not the best practice.
Now, this app can hit the db by a total of 100-500 users a day, and having
the db do all of the processing can have a performance hit. Then he
mentioned something about using temp table in the database side, do a
select, then insert into the temp table, then do a select on the temp table
and do the business logic. I pushed back on that as well..

Now, I''m not a DBA but a developer and I''ve seen DB''s take performance hits
when doing logic such as this on the database side, so my question is, which
would be the best solution for this?

解决方案

"Jon" <Jo*@community.nospam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...

I''m working on a project and the lead developer wants to put all of the
business logic on the database side. He wants the proc to do all of the
logic and create XML on the fly, parse out data, etc, and then return the
final result to the business layer. I pushed back and said that the
business layer should do all of the logic, just have SQL return the data
needed and then have the code do all of the XML creation, parsing of data,
etc. I was told I was wrong and thats not the best practice.
Now, this app can hit the db by a total of 100-500 users a day, and having
the db do all of the processing can have a performance hit. Then he
mentioned something about using temp table in the database side, do a
select, then insert into the temp table, then do a select on the temp
table and do the business logic. I pushed back on that as well..

Now, I''m not a DBA but a developer and I''ve seen DB''s take performance
hits when doing logic such as this on the database side, so my question
is, which would be the best solution for this?

What does the business layer do with the XML? Is it becoming an object or is
the XML purely data like reporting data?

PS


If your Lead Developer is suggesting this, then I think you need a new
Lead Developer ASAP.

Thanks
Robb Andrew


The developer is generating his own XML to be returned to the C# web
service. Though he''s creating a dataset and returning that from his method
which calls the database, he has the stored procedure generating XML within
the proc and then just using that as his dataset to populate Grid,
listboxes, etc.
so the XML isn''t being used for reporting, is just being created and then
being used to populate grid, textboxes, labels, listboxes, etc.

he''s creating his own dataset XML instead of using the XML format that is
returned when creating a dataset in .NET, though his dataset XML and the one
that .NET returns actually mirror each other, so why is he creating his own
XML I have no idea

"PS" <ec***********@hotmail.comwrote in message
news:u4**************@TK2MSFTNGP06.phx.gbl...

"Jon" <Jo*@community.nospam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...

>I''m working on a project and the lead developer wants to put all of the
business logic on the database side. He wants the proc to do all of the
logic and create XML on the fly, parse out data, etc, and then return the
final result to the business layer. I pushed back and said that the
business layer should do all of the logic, just have SQL return the data
needed and then have the code do all of the XML creation, parsing of
data, etc. I was told I was wrong and thats not the best practice.
Now, this app can hit the db by a total of 100-500 users a day, and
having the db do all of the processing can have a performance hit. Then
he mentioned something about using temp table in the database side, do a
select, then insert into the temp table, then do a select on the temp
table and do the business logic. I pushed back on that as well..

Now, I''m not a DBA but a developer and I''ve seen DB''s take performance
hits when doing logic such as this on the database side, so my question
is, which would be the best solution for this?


What does the business layer do with the XML? Is it becoming an object or
is the XML purely data like reporting data?

PS



这篇关于建筑问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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