RAD Studio |  |

Using DataSnap
See Also
Collapse All

A multi-tiered client/server application is partitioned into logical units, called tiers, which run in conjunction on separate machines. Multi-tiered applications share data and communicate with one another over a local-area network or even over the Internet. They provide many benefits, such as centralized business logic and thin client applications.

Multi-tiered applications use the components on the DataSnap category in the Tool Palette. DataSnap provides multi-tier database capability to Delphi applications by allowing client applications to connect to providers in an application server.

To build multi-tiered database applications using DataSnap

1. Choose FileNewOther. The New Items dialog appears.
2. In the New Items dialog, select Delphi Projects and double-click VCL Forms Application. The Windows Designer displays.
3. From the DataSnap category of the Tool Palette, drag a TDCOMConnection component to the form. This will establish a DCOM connection to a remote server in a multi-tiered database application.
4. From the DataSnap category of the Tool Palette, drag a TSocketConnection component to the form. This will establish a TCP/IP connection to a remote server in a multi-tiered database application.
5. From the DataSnap category of the Tool Palette, drag a TSimpleObjectBroker component to the form. This will locate a server for a connection component from a list of available application servers.
6. From the DataSnap category of the Tool Palette, drag a TWebConnection component to the form. This will establish an HTTP connection to a remote server in a multi-tiered database application.
7. From the DataSnap category of the Tool Palette, drag a TConnectionBroker component to the form. This will centralize all connections to the application server so that applications do not need major rewriting when changing the connection protocol.
8. From the DataSnap category of the Tool Palette, drag a TSharedConnection component to the form. This will connect to a child remote data module when the application server is built using multiple remote data modules.
9. From the DataSnap category of the Tool Palette, drag a TLocalConnection component to the form. This will provide access to IAppServer methods that would otherwise be unavailable, and make it easier to scale up to a multi-tiered application at a later time. It acts like a connection component for providers that reside in the same application.

See Also

Connecting To Application Server

Deploying Multi-tiered Database Applications (DataSnap)

Using TLocalConnection or TConnectionBroker

Using TSimpleObjectBroker

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!