Home arrow Delphi-Kylix arrow Using the Client Dataset in an N-Tiered Application
DELPHI-KYLIX

Using the Client Dataset in an N-Tiered Application


My last two articles demonstrated the use of the client dataset in a two-tier application. The two-tier architecture may be effective in some situations but in many circumstances it suffers from some serious drawbacks. This is where the concept of an n-tiered or multi-tiered architecture comes in.

Author Info:
By: Danish Ahmed
Rating: 5 stars5 stars5 stars5 stars5 stars / 8
January 02, 2008
TABLE OF CONTENTS:
  1. · Using the Client Dataset in an N-Tiered Application
  2. · Application Server
  3. · Client Application
  4. · Connecting to the Application Server

print this article
SEARCH DEVARTICLES

Using the Client Dataset in an N-Tiered Application
(Page 1 of 4 )

An n-tiered architecture or a three-tiered architecture is similar to the two-tiered architecture discussed in the previous article. Unlike the two-tiered architecture, however, an n-tiered architecture contains a middle tier that acts as an intermediary between the client application and the database server. Typically this architecture has three tiers -- user interface, business logic and data storage mechanism, each of which exists independently and usually on different platforms.

The middle tier itself may contain multiple layers or the architecture may include more than one data storage mechanism distributed over multiple computers. For this reason it is called an n-tiered architecture or a multi-tiered architecture. However, the objective of this article is to demonstrate how the client dataset along with a provider can be helpful in an n-tiered architecture and not discuss the architecture itself. So I will attempt to provide only a short overview of the architecture and how the client dataset can enhance its performance.

Two-Tiered vs. N-Tiered Architecture

A multi-tiered application is divided into three logical parts or tiers, as I have already mentioned: the data storage mechanism, business logic and user interface, which can be stored on different system.

In a two-tiered architecture, the business rules are included in the client application, which makes it more expensive as well as difficult to upgrade. It can be especially disadvantageous when the number of users is large. In such cases upgrading or modifying the business logic in a different client would require the upgrading of every client application. When the business logic is included in the client, even a slight variation in business rules can cause update errors that are difficult to reconcile.

In contrast, a multi-tiered application stores the business logic in the middle tier, which is centralized and is used by all client applications. This ensures that all client applications use a single set of business rules during an update, which can help avoid errors that arise when business rules reside in many client applications.

Apart from helping avoid logical errors, a centralized logic residing in the middle tier also helps reduce the size of the client application. Further, a two-tiered application requires a data access mechanism like BDE or ODBC to connect to the database server. We can make the database connection more flexible by using the client dataset and dataset provider, but the fact remains that a data access mechanism is still required. The client application would be required to install and manage the data access mechanism, making the application bulkier.

The client application in an n-tiered architecture can use communication protocols like HTTP, TCP/IP, DCOM and SOAP to connect to the server, thus removing the need to include data access mechanism information in the client application. This further reduces the size of the client application, because of which it is also called "a thin client."

A multi-tiered architecture also provides better security options. Since a client application interacts with the middle tier instead of the data source, you can isolate specific functionalities into the tier with different access restrictions. You can also add additional security layers or use security features supported by the communication protocol you are using.

When the number of users rises it puts strain on the network as well the machines, and the performance starts degrading. This can be avoided by distributing data processes over many machines. Load balancing can enhance performance significantly.

By using Delphi, you can create n-tiered applications faster and without a lot of effort. The application server and the client can be created separately and independently.


blog comments powered by Disqus
DELPHI-KYLIX ARTICLES

- Loading an XML Document into the DOM
- Delphi Wrapper Classes and XML
- Delphi and the DOM
- Delphi and XML
- Internet Access: Client Service
- Finishing the Client for an Internet Access ...
- The Client for an Internet Access Control Ap...
- User Management for an Internet Access Contr...
- Important Procedures for an Internet Access ...
- Server Code for an Internet Access Control A...
- Constructing the Interface for an Internet A...
- Building a Server Application for an Interne...
- Building an Internet Access Control Applicat...
- Client Dataset: Working with Data Packets an...
- Using the Client Dataset in an N-Tiered Appl...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials