Scaling Up to a Three-tiered Application

From InterBase
Jump to: navigation, search

Go Up to Building Multi-tiered Applications


In a two-tiered client/server application, the application is a client that talks directly to a database server. Even so, the application can be thought of as having two parts: a database connection and a user interface. To make a two-tiered client/server application into a multi-tiered application you must:

  • Split your existing application into an application server that handles the database connection, and into a client application that contains the user interface.
  • Add an interface between the client and the application server.

There are a number of ways to proceed, but the following sequential steps may best keep your translation work to a minimum:

1. Create a new project for the application server, duplicate the relevant database connection portions of your former two-tiered application, and for each dataset, add a provider component that will act as a data conduit between the application server and the client.
2. Copy your existing two-tiered project, remove its direct database connections, add an appropriate connection component to it.
3. Substitute a client dataset for each dataset component in the original project.
4. In the client application, add code to apply updates to the application server.
5. Move the dataset components to the application server’s data modules. Set the DataSet property of each provider to specify the corresponding datasets.

For more information, see Connecting to the application server and Creating and using a client dataset in the Delphi Developer’s Guide.

Advance To: