基础架构2 [英] Basic Architecture 2

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

问题描述

我需要澄清一个应用程序应该如何结构化。在我看来,你应该有一个数据库服务器,一个中间服务器来承载大量的代码,以及一个前面的b $ b结束web服务器。但是,我已经收到了输入,我需要在ASP.NET中构建我的应用程序并在

Web服务器上运行。这对任何人来说都很奇怪吗?将应用程序执行推送到网络服务器是正常的?b $ b?

如何规模?为什么Web服务器还会执行

应用程序的核心代码?我是否因为构建.NET应用程序而错过了Microsoft的概念

?大多数人建立他们的网络界面.NET应用程序以在他们的

网络服务器上执行吗?


提前谢谢你。 Todd

解决方案

您首先要确定您的用户想要使用的界面,网络还是

桌面应用。 Fm开始建筑的q。


Todd <一个******* @ discussions.microsoft.com>在消息中写道

news:09 **************************** @ phx.gbl ... < blockquote class =post_quotes>我需要澄清应用程序应该如何构建。在我看来,你应该有一个数据库服务器,一个托管大量代码的中间服务器,以及一个前端Web服务器。但是,我收到的建议是我应该在ASP.NET中构建我的应用程序并在
Web服务器上运行。这对任何人来说都很奇怪吗?将应用程序执行推送到Web服务器是正常的吗?
那规模如何?为什么Web服务器也会执行
应用程序的核心代码?我是否缺少Microsoft构建.NET应用程序的概念?大多数人建立他们的网络接口.NET应用程序以在他们的网络服务器上执行吗?

提前谢谢你。 Todd



我想要一个网络界面。


对于带有Web界面的应用程序,应该是大量的/>
代码在Web服务器上执行,还是应该有一个

中间服务器执行大部分代码?

嗨Todd,


以下是我构建我的.Net应用程序的方式:


PageOne.aspx:包含HTML服务器 - 边控制

以及与之相关的事件。例如:


<%@ Page Language =" vb" AutoEventWireup =" false"

Codebehind =" PageOne.aspx.vb"

Inherits =" SITENAME.SiteClassName"的SmartNavigation = QUOT;真" %



< TABLE>

< TR>

< td align =" right" >< asp:button id =" cmdSubmit"

tabIndex =" 17" RUNAT = QUOT;服务器"高度= QUOT; 23像素" width =" 59px"

Text =" Submit">< / asp:button>

< / td>

< / TR>

< / TABLE>


(...)


< script语言= QUOT; VB" runat =" server">

Private Sub cmdSubmit_Click(ByVal sender As

System.Object,ByVal e As System.EventArgs)处理

cmdSubmit.Click

SubmitOrder()

End Sub


< / script>


PageOne.aspx.vb:包含所有与GUI相关的代码
GUI(aspx页面)

它从Business Class中包含的数据获取DLL

驻留在网站的bin目录中。


COMPONENT.DLL:包含我的所有业务规则和

与数据访问组件进行交互


DATAACCESS.DLL:连接到dB。


这是完全崩溃的,每个组件或层都有它的响应能力,而且它们不会混合。


我已经这样工作了几个月并且它工作

魔法对我来说!我花了很多时间在COMPONENT.DLL中创建了

泛型类,我得到了一个令人感激的
金额或可重用性。我可以虚拟地复制并过去从一个项目到下一个项目的一个班级,几乎没有任何重写/ b $ b写入,有时根本没有。例如,一个类

处理LDAP查询,另一个发送SMTP邮件,

一个处理System.IO类,一个生成Crystal /

PDF报告等。


还有更多要说的更多应该是你

开始...并且思考!! ; o)


希望这会有所帮助...


Ben


---- - 原始消息-----
我想要一个Web界面。

对于带有Web界面的应用程序,应该在Web服务器上执行大部分代码,还是应该有一个中间服务器执行大部分代码吗?



I need clarification on how an application should be
structured. In my mind, you should have a data base sever,
a middle server to host a bulk of the code, and a front
end web server. However, I have received input that I
should build my application in ASP.NET and running on the
web server. Does this seem strange to anyone? It is normal
to push application execution to the webserver? How can
that scale? Why would a web server also execute the
application''s core code? Am I missing Microsoft''s concept
for building .NET applications? Are most people building
their web interfaced .NET application to execute on their
web servers?

Thank you in advance. Todd

解决方案

You have to first of all decide what interface ur user wants to use, web or
desktop app. Fm there starts the q of architecture.

"Todd" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...

I need clarification on how an application should be
structured. In my mind, you should have a data base sever,
a middle server to host a bulk of the code, and a front
end web server. However, I have received input that I
should build my application in ASP.NET and running on the
web server. Does this seem strange to anyone? It is normal
to push application execution to the webserver? How can
that scale? Why would a web server also execute the
application''s core code? Am I missing Microsoft''s concept
for building .NET applications? Are most people building
their web interfaced .NET application to execute on their
web servers?

Thank you in advance. Todd



I want a web interface.

For application with web interfaces, should the bulk of
the code execute on the web server, or should there be a
middle server(s) executing the bulk of the code?


Hi Todd,

Here is how I structured my .Net apps :

PageOne.aspx : contained the HTML server-side controls
and the events associated with them. eg:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="PageOne.aspx.vb"
Inherits="SITENAME.SiteClassName" SmartNavigation="True" %


<TABLE>
<TR>
<td align="right"><asp:button id="cmdSubmit"
tabIndex="17" runat="server" Height="23px" width="59px"
Text="Submit"></asp:button>
</td>
</TR>
</TABLE>

(...)

<script language="vb" runat="server">
Private Sub cmdSubmit_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdSubmit.Click
SubmitOrder()
End Sub

</script>

PageOne.aspx.vb : contains all the code that related to
the GUI (the aspx page)
It gets its data from Business class contained in a DLL
residing in the ''bin'' directory of the web-site.

COMPONENT.DLL : contais all my business rule and
interacts wioth the data access component

DATAACCESS.DLL : connects to the dB.

It is all weel broken down, every component or layer has
its responibilities and they don''t mix.

I have been working like this for months and it work
magic for me ! I have spent a lot of time creating
generic classes in COMPONENT.DLL and I got a tremandous
amount or reusibility. I could virtually copy and past
one class from one project to the next with hardly any re-
write and sometimes not at all. For example, a class
handling LDAP queries, another one sending SMTP mails,
one dealing the System.IO class, one producing Crystal /
PDF reports, etc.

There would be a lot more to say more that should be you
started... and thinking !! ;o)

Hope this helps...

Ben

-----Original Message-----
I want a web interface.

For application with web interfaces, should the bulk of
the code execute on the web server, or should there be a
middle server(s) executing the bulk of the code?
.



这篇关于基础架构2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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