I am working on converting my one page to 3 layers.
I believe advantages were that it was more organized.
I am getting confused as what's happening since I have 3 layers now and I realized I don't have a clear understanding of what 3-tier is.
This is what I know or think I know
Data Access Layer = Gets all the connections/values
Business Access Layer = Runs those connections and values from DAL. Not sure but does the error checking here?
Presentation layer = This is where I am more confused...This part calls out BAL? Why have 3 layers if this is true?
The presentation layer interacts with the user, gets their requests and shows them information. Let's use a banking application as an example. A user wants to log into their account, get their balance, and transfer some finds.
Presentation Layer: Gives the user a login prompt, gets the user's login information, tell them they logged in successfully, shows them their balance, offers them the option to transfer funds, gets the transfer details, tells the user the transfer was approved.
Business Access Layer: Validates the user's login information. Calculates the balance to show to the user. Decides that the transfer is allowed and approves it.
Data Access Layer: Stores the user's login information. Stores the account balance information, held funds, and so on.
Basically:
Data Access Layer stores information. Business Access Layer decides what information to retrieve, makes decisions based on it, passes on the results. Presentation Layer gets information from and gives information to the user.