The design and structure of an application is more important, as the technical details of its implementation. Upon developing any new project, we should settle on the issues such as the Technologies to use, Database Engine to employ, the Physical Architecture of the application etc. This article will provide some idea on the designing issues in a .NET application.

The following are some of the design issues for an enterprise application:

Which Language to choose?

A wide variety of .NET complaint Languages are available. The Language should be selected in a way that it should let us accomplish the tasks needed by the application.

Consider a GUI intense application or standard business application, in both the cases we could go for a language which supports good User Interface features and IDE s for RAD (Rapid Application development) such as Visual Basic or Visual C#.

Similarly, consider a gaming application or an application which requires intense communication with the underlying hardware of the machine. In such a case we will certainly go for a Language such as Visual C++ and not VB. But the fact is C# will suit both the cases.

Which Database Engine to employ?

This factor depends upon the following:

Web or Desktop User Interface

Some applications such as E-Commerce, Online shopping carts, Corporate Web Sites and essentially enterprise applications for remote users who have Internet access, clearly need a Web Interface and some need a Desktop User Interface; but there are other applications which make us think for a while before selecting the appropriate User Interface required.

Let's see the basic issues that will help to choose the suitable User Interface.

The application needs a Web UI if

The Web UI also allows using standard HTML interface elements. Some applications take a lot of processing power. Instead of having to update each individual workstation, we can increase the power of the central server.

The application needs a Desktop UI if

  • Need to be connected to any special hardware
  • Need Drag-and-Drop support
  • It is a gaming or CAD, CAM application which needs direct communication with the hardware
  • Need much richer set of User Controls
  • Deployment of the system can be done through a network, by distributing CDs, or using push servers
  • Upgrades can be done through a network, by distributing CDs, or using push servers

Physical Architecture

The following are some of the possible architectures for a .NET application

Two-Tier Application Architecture

Client Application uses ADO.NET to directly communicate with the Database Server.

two-tier.gif

Fig1. Two-Tier Architecture

This type of architecture is suitable for small applications with very less user interfaces and simple business logic.

How ever, this will not be helpful for an enterprise development environment.

Development Technique

Features

  • Development is quick and easy
  • Since the business rules are not separated from the UI, updating or modifications become very cumbersome. i.e., in any such case of modifications, all clients must be updated.
  • When there is any change in the database or the field names the whole code should be altered. Changing the code used to load data into a dataset is much more difficult.

Three-Tier Application Architecture using XML Web Services

All SQL resides in the Web Services, Datasets are built on the server and the data is retrieved from the store and returned as an XML stream to the client, where they can be rebuilt into datasets.

This architecture is appropriate for both Web and Win Applications.

This type of architecture will best suit when we need the richness of a desktop application but users connect to it from many different locations and access the data across an HTTP interface.

three-tier_ws.gif

Fig2. Three-Tier Architecture using Web Services

Features

Thus this architecture goes well to some extent for an Internet scenario.

Three-Tier Application Architecture using .NET Remoting

All SQL resides within the component called through the Remoting service and the datasets are built on the server and returned as an XML stream to the client where they can be re-built into datasets. Code can also be written to load data returned from the Remoting component, manually onto the controls on the forms.

This architecture is appropriate for an application that must be distributed between computers on a LAN. Working within a LAN environment, .NET Remoting can be used to wrap up the data access layer.

Thus this architecture goes well with an Intranet scenario.

three-tier_remoting.gif

Fig3. Three-Tier Architecture using .NET Remoting

Features

Logical N-Tier Architecture

This architecture consists of the front end, a business rule component, and a data layer component. This is the best approach which works equally well for all types of .NET applications.

N-tier.gif

Fig4. N-Tier Architecture

Features

Logical N-Tier Architecture using Web Services

An XML Web service is used to access the data layer. The typed dataset is returned across the HTTP layer to the business rule layer. The client application can then consume the dataset for the user interface presentation of the data.

Ntier_ws.gif

Fig5. N-Tier Architecture using Web Services

This is the best approach, in which case, the data layer is centralized and the client can be web or windows application.