建筑问题 [英] Architectural question

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

问题描述

你好,


我刚开始在.net 2.0中使用VB6的背景知识。我有两个

项目要完成。第一个是网站,第二个是
客户端应用程序。目前大多数网站功能

将是报告访问权限,但会有一些插入/更新

功能。在未来,该网站将执行与客户端应用程序相同的

功能,但接口需要与
不同。


我已经构建了具有数据访问层,业务

逻辑层和表示层的架构。但是当我考虑将来使用时,我认为将DAL和BLL放在一个web

服务中然后简单地创建我的两个项目作为演示文稿是有意义的

使用此服务的图层。如果我这样做,我还需要

我的网站中的另一个数据层,用于可能出现的特殊查询

或特定于网络功能的工作?


我不确定这是否真的是最好的方法,因为我没有

经验来判断。有更好的方法吗?

网络服务会降低用户的处理速度吗?我会将

两层放在同一个Web服务中,还是应该将BLL保留在

网站中,并为客户端应用程序或其他变体构建另一个?

我已经阅读了很多这方面的文章并且已经逐步完成了教程

但是在我移动之前我真的很喜欢有经验的接受

前进。非常感谢帮助。


罗文

Hi there,

I am just starting in .net 2.0 with a background in VB6. I have two
projects to complete. The first being a website and the second is a
client application. For now the majority of the website functionality
will be report access however there will be some insert/update
functionality. In the future the website will perform the same
functions as the client app though the interfaces will need to be
different.

I''ve constructed the architecture with a Data Access Layer, a Business
Logic Layer, and the Presentation Layer. But as I am thinking about
future use I think it makes sense to put the DAL and BLL in a web
service and then simply create my two projects each as a Presentation
Layer that consume this service. If I do this would I also need
another Data Layer in my website for ad hoc queries that may come up
or for work that is web function specific?

I am uncertain if this truly is the best approach since I have no
experience to base judgement. Is there a better way to do this?
Would a web service slow user processing down at all? Would I put the
two layers in the same web service or should I keep the BLL in the
website and build another for the client app or some other variation?
I have read many articles on this and have stepped through tutorials
but would really like an experienced take on it before I move
forward. Help is greatly appreciated.

Rowan

推荐答案

Hello Rowan,


RI'已经构建了具有数据访问层,

RBLL放入Web服务然后简单地创建我的两个项目作为

RPresentation使用此服务的层。


只将WS *放在* BLL& DAL图层,它解开你的家属和你的

可以轻松改变WS


RIf我这样做我还需要在我的网站上另一个数据层用于广告

hoc查询

Rmay出现或是针对特定于网络功能的工作?


为什么?让我们揭示不同的服务契约,它将使用不同的
客户端,并保持逻辑相同

你应该像WS一样玩外观上课


RI不确定这是否真的是最好的方法,因为我没有

重新体验基础判断。有没有更好的方法呢?

一个网络服务是否会降低用户的处理速度?我会在同一个Web服务中将两个层放在一起吗?或者我应该将BLL保留在

Rwebsite中并为客户端应用程序或其他一些变体构建另一个?


尝试尽可能简单,无需更改BLL


---

WBR,Michael Nemtsev [.NET / C#MVP]。

我的博客: http:/ /spaces.live.com/laflour

团队博客: http://devkids.blogspot.com/

我们大多数人面临的最大危险并不是我们的目标太高而且我们

想念它,但它太低了我们达到了它 (c)米开朗基罗
Hello Rowan,

RI''ve constructed the architecture with a Data Access Layer, a
RBusiness Logic Layer, and the Presentation Layer. But as I am
Rthinking about future use I think it makes sense to put the DAL and
RBLL in a web service and then simply create my two projects each as a
RPresentation Layer that consume this service.

Only put WS *upon* the BLL & DAL layers, it untied your dependecies and your
can change the WS easily

RIf I do this would I also need another Data Layer in my website for ad
hoc queries that
Rmay come up or for work that is web function specific?

Why? Let''s expose difference service contracs which will be used different
clients, and keep the logic the same
You WS should play like "facade" class

RI am uncertain if this truly is the best approach since I have no
Rexperience to base judgement. Is there a better way to do this?
RWould a web service slow user processing down at all? Would I put
Rthe two layers in the same web service or should I keep the BLL in the
Rwebsite and build another for the client app or some other variation?

Try to simplyfy as much as possible, without any changes to BLL

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo


Ysgrifennodd Rowan:
Ysgrifennodd Rowan:

你好,
Hi there,



< snip />

<snip />


>

我构建了具有数据访问层,业务的架构
逻辑图层和表示层。但是当我考虑将来使用时,我认为将DAL和BLL放在一个web

服务中然后简单地创建我的两个项目作为演示文稿是有意义的

使用此服务的图层。如果我这样做,我还需要

我的网站中的另一个数据层,用于可能出现的特殊查询

或特定于网络功能的工作?
>
I''ve constructed the architecture with a Data Access Layer, a Business
Logic Layer, and the Presentation Layer. But as I am thinking about
future use I think it makes sense to put the DAL and BLL in a web
service and then simply create my two projects each as a Presentation
Layer that consume this service. If I do this would I also need
another Data Layer in my website for ad hoc queries that may come up
or for work that is web function specific?



< / snip>


关于你的一般观点,我认为这些日子普遍接受

n-tier方法是个好主意。至少,正如你的建议,

它允许你将不同的UI层连接到相同的后端代码。


我不是当然,你为什么要谈论多个DAL / BLL。您可能需要在数据层中使用许多对象,实际上您可能需要在
业务逻辑层中;但这与说你有多个数据访问层/业务逻辑层的b $ b不同。当然,您需要创建和使用的对象需要取决于您在项目分析阶段开发的应用程序模型




至于这方面的经验,我们没有任何实现业务逻辑和数据访问层作为Web服务的经验。我们

使用.NET远程处理,使用基于TCP / IP的SAO。这是我们的主要动机,这是为了获得除了表示层处理之外的其他任何东西,而不是Web服务器和应用服务器上的
。这使得我们可以构建一个相当安全的架构,其中的Web服务器与我们的

Windows域隔离,调用业务层和数据访问层,这是

在域上,因此可以使用基于Windows的安全性访问

数据 - 无需在任何地方存储数据库凭据。


我们的演示文稿图层只与业务层对象进行对话:永远不会是
DAL对象。后者总是从业务逻辑

层访问,从而进一步隔离我们的业务数据中的面向公众(包括

仅内部)Web服务器。


如果要使用Web服务,你将不得不考虑安全性。

确保只调用WS您的UI组件(以及

不是来自可访问Web服务器的随机Web浏览器)。如果您向您的应用程序添加数据处理设施

,这个

将特别重要。


我想我不会在报告申请时,我必须说一下SQL的危险性吗?


HTH

彼得


为什么要将Web服务引入混合?所有这一切

你说到那一点是有道理的。塞满你所有的数据访问

通过网络服务听起来像一个可怕的想法,除非你有一些

压倒性的因素迫使你的手没有告诉我们。

它只会导致痛苦并使你的表现陷入困境。


我怀疑你读过太多MSDN文章。我会坚持你精心设计的业务和数据层。完成

之后,在

架构方面,你远远领先于大多数.NET应用程序。我打赌你会做得好!

Jason Kester

外籍软件咨询服务
http://www.expatsoftware.com/

---

获取您自己的旅游博客,包含行程地图和照片!
http://www.blogabond。 com /

Why do you want to introduce Web Services into the mix? Everything
you said up to that point made sense. Cramming ALL your data access
through a web service sounds like a terrible idea unless you have some
overwhelming factor forcing your hand that you haven''t told us about.
It can only cause pain and bring your performance to a crawl.

My suspicion is that you''ve read one too many MSDN articles. I''d
stick with your well designed business and data layers. Having done
that, you''re well ahead of most .NET applications in terms of
architecture. I bet you''ll do well!
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/

---
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/


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

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