📄 82.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://bbs.tsinghua.edu.cn"><font face="黑体"><big><big>水木清华★</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center"> Delphi编程 (BM: strayli FlyingBoy) </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="454"> <p align="center">[<a href="index.htm">回到开始</a>][<a href="15.htm">上一层</a>][<a href="83.htm">下一篇</a>]
<hr><p align="left"><small>发信人: strayli (stray), 信区: Delphi <br>
标 题: A Technical View of Borland MIDAS (4) <br>
发信站: BBS 水木清华站 (Thu Nov 12 21:54:08 1998) WWW-POST <br>
<br>
Technology Details: Using Distributed datasets <br>
<br>
It is now time to start analyzing the technology involved in Delphi <br>
Distributed datasets. In other words, the paper now switches from theory to <br>
practice. This section gives an overview of the components involved in this <br>
technology, while the next section begins a detailed examination of the <br>
components. <br>
<br>
To start, I will look only at the core Delphi components. Later in the paper <br>
I will look at the additional OLEnterprise tools that came from OEC. <br>
<br>
There are four key Delphi tools that make distributed datasets possible. The <br>
first two appear on the server side: <br>
<br>
Remote data modules are just like standard data modules, only they help you <br>
broadcast data not to your current application, but to locations on the <br>
network. In particular, they turn a simple data module into a COM object, <br>
thereby allowing you to access the data module from a remote server via DCOM. <br>
<br>
<br>
The TProvider component resides on remote data modules just as a TTable <br>
object can reside on a standard data module. The difference is that a <br>
TProvider broadcasts a table across the network. Provider objects are also <br>
included in the TTable and TQuery objects as properties. However, if you <br>
access them as standalone components, then you will have more flexibility and <br>
power. In particular, you hook up a TProvider component to a TTable or TQuery <br>
so that other programs on the network can access the data from the TTable or <br>
TQuery via DCOM. The job of the remote data module is to give clients access <br>
to the specific providers available on a server. The client first connects to <br>
the remote data module, then queries the remote data module for a list of <br>
available providers on its server. <br>
On the client side, there are two components you use to access the data <br>
supplied by the server: <br>
<br>
The TRemoteServer component gives the client the ability to connect to the <br>
server, and particularly, to the remote data module on the server. More <br>
specifically, it connects to the COM interface supported by the remote data <br>
module. Despite the implication inherent in its name, TRemoteServers exist on <br>
the client side, not on the server side. TRemoteServer is the component that <br>
knows how to browse the registry in search of available servers. Once the <br>
server is found, the TRemoteServer will connect to it. <br>
The TClientDataSet component hooks up to the TRemoteServer component, and <br>
then attaches to a specific provider on the server. They give the data <br>
sources on the client app something to plug into when they want to connect to <br>
a remote dataset. In short, the TClientDataSet plays the same role as a <br>
TQuery or TTable, only it is serving up data from a remote site. Imagine the <br>
traditional TDatabase, TTable, TDataSource, TDBGrid configuration seen in <br>
many standard Delphi applications. In a remote dataset, you make a slight <br>
change to these configuration by using TRemoteServer, TClientDataSet, <br>
TDataSource and TDBGrid. In this new scenario, TRemoteServer plays a role <br>
roughly parallel to TDatabase, while TClientDataSet plays a role fairly <br>
similar to that traditionally played by TTable or TQuery. I don抰 mean to <br>
imply a one-to-one correspondence between TDatabase and TRemoteServer, but a <br>
rough similarity can be seen between the roles played by the two components. <br>
The diagram shown in Figure 1 depicts the architecture of a remote data set <br>
application. On the top of half of the picture is the server side of the <br>
equation, which consists of a remote data module, three tables, and three <br>
providers. On the client side, you find a TRemoteServer and three <br>
TClientDatasets. Attached to the client dataset you could have a series of <br>
data sources and visual controls. Notice that you need one provider and one <br>
client data set for each table you want to broadcast. Needless to say, you <br>
could have varying numbers of tables, as well as many other objects, forms, <br>
etc, on each side of the equation. My goal here is to focus on only the core <br>
elements in a proposed three-table scenario that must be present to make the <br>
ments in a proposed three-table scenario that must be present to make the <br>
concept of remote data sets work. <br>
<br>
<br>
<br>
Figure 1: The architecture of a remote dataset. <br>
<br>
<br>
-- <br>
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 202.38.72.60] <br>
</small><hr>
<p align="center">[<a href="index.htm">回到开始</a>][<a href="15.htm">上一层</a>][<a href="83.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -