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
- Choose FileNewOther. The New Items dialog appears.
- In the New Items dialog, select Delphi Projects and double-click VCL Forms Application. The Windows Designer displays.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.