I had just designed a Project in 3-tier using VB.Net and SQL Server. I would like to know whether my project is really designed as a 3-tiered architecture? Awaiting your comments eagerly! Thanks in advance!
Presentation Layer(PL):
This contains the form and its controls that are 3 Labels, 3 TextBoxes(TXTBX), 2 Command Buttons(Search and Clear) and 1 DataGridView(DGV) and codes for validation, Grid Initialization, GridDisplay, etc that are written in form.vb file
Business Logic Layer(BLL):
This contains the methods that calls the DAL
Data Access Layer(DAL):
This contains the methods to connect to database.
Object File(OBJFILE):
This contains the Get and Set properties for the variables
Now when I click the Search Button in the PL, the program flow is as follows:-
The DGV is Initialized(setting DGV properties) through a function called DGVInit which lies within the form's .vb file
A new object is instantiated for the OBJFILE at the Base Class level.
The TXTBX values are bound to the object of the OBJFILE.
This object is now passed to a BLL's Search method, 'AgentSearch' as an argument through a function named 'DispDGV' in PL.
This 'AgentSearch' method in BLL calls a method(along with the object as an argument) named as 'Search' in DAL
This Search method in DAL executes a SP and returns the DataReader back to the BLL's 'AgentSearch' method.
The BLL's 'AgentSearch' method in turn returns the DataReader back to the 'DispDGV' method in form's .vb file.
This method assigns the returned DataReader to a DataTable and this DataTable sources out data to the DGV.
I have inserted an illustrated image of my project for the same purpose.
I have also posted the same question in MSDN with an image, that might be useful to visualize the Project.
http://social.msdn.microsoft.com/Forums/getfile/349324