3 tire application design

Tejen

Well-Known Member
Joined
Feb 17, 2009
Messages
192
Reaction score
0
Hey guys im doing my campus project and i can't seen to figure out how to develope it using the above method.I did it the normal way and everything works fine i just cannot figure out what goes where in 3 tire design.Its a simple program that connects to a database ,adds data and searches for records using stored procedure method.Anyone care to help or provide me with a downloadable tut or anything.This project is due tomorrow.
 
Tier - It's 3 tier ;)
Essentially the GUI (program, where the users enter data), goes on the client side.

The BI component, i.e. the part that actually manipulates the data, goes on an application server.

The third tier is the database and hosts the data.

Example: a user at a bank enters client data at a branch for a new loan application (Tier1). The press submit, and the data is sent to an application server which calculates if they qualify for a loan (Tier2). The data is then stored on a database for further manipulation (tier3).

Your Tier2 and Tier3 appear to both be running on a single machine; simply break the logic components (those that manipulate data) from the data storage components (that which stores data) to create Tier2 and 3.
 
Thought you were on about some new 3 wheeled scooter design for a minute....
 
DataLayer-BusinessLayer-Presentation Layer.

Datalayer is referenced to businesslayer, and businesslayer is referenced to the presenation layer.
 
A good principle in a 3-tier design is to model ALL your data-entities as objects (classes) and only ever reference the classes in your presentation-tier (GUI). Associate all behavior for the entities as methods in the objects and remove any business logic from the presentation-tier.

The initial "design" of the application might take a bit longer to get down, but as soon as the data / business tiers are done, the presentation tier should be a breeze. It also makes maintenance and debugging a LOT easier - almost to the level of MVC. ;)
 
FarligOpptreden is correct and a good read of the model-view-controller(MVC) pattern will be useful. This follows the OO concept of abstraction where complexity is hidden i.e. a seperation of concerns.

This is taken to the next level where code dealing with data, presentation and the business model are abstracted from each other.
You might want to read up on EE5 frameworks such as JSF (Faces) as well as EJB3.

And its not meant to be TIREsome in the least but on the contrary having tiers within an enterprise application makes code more manageable.
 
Top
Sign up to the MyBroadband newsletter
X