In Delphi, what exactly is "das? What are components related to him? Midas (multitiered distributed application services) Multi-Layer Distributed Application Service
The multi-tier structure proposed by Delphi refers to the dbexpress, ADO, BDE, SQL link, datamoule, get another NT Server (the so-called Application Server), and there is only one front-end program
And the datamoule that is moved to the NT Server becomes a com Program (Remote datamodule ).
Note: the front-end must publish the "Das. dll" file to the system directory.
(1) The foreground program sends a request by calling the method (Interface) provided by the application server.
The application server will respond to this request and send a corresponding SQL command to the background database. The background database will return the dataset generated by executing the SQL command to the application server.
Note: Delphi provides the Type Library to help the application server define the com method (interface)
(2) The com program on the NT Server is transmitted to the background database through the intermediate software (dbexpress, ADO, BDE, SQL link.
When the application server sends the read dataset to the foreground, it must use the DCOM mechanism. the tdatasetprovider component provided by Delphi compresses the read dataset and splits it into a segment of data packets.
Pass through DCOM or TCP/IP to the front-end.
Note: Delphi provides the remotedatamodule Wizard to help you generate the com program structure.
Because the Delphi Program has a special mechanism for transmitting dataset, Delphi also implements an interface called iprovider (tdatasetprovider) to help the com program on the application server send dataset data.
(3) the front-end program communicates with the com program on the NT server through the DCOM mechanism.
The front-end application is through. the DLL communicates with the application server. DLL restores the received data packets from the application server to dataset and then drops the data packets to the tclientdataset component in the foreground program.
Note: The foreground program must provide the corresponding tclientdata component to correspond to each iprovider (tdatasetprovider) on the application server. when the user modifies the foreground data, only the dataset of the cache on the foreground is modified.
You need to use tclientdata. applyupdate to write the foreground variable data back to the background database.