I am currently studying my last year of study in the field of computer science and am working on my final project and dissertation. I will use ASP.NET Web Forms and C # to create a 3-layer project - I cannot call it a 3-level project, since it will most likely never be hosted on anything other than my local PC for testing, since It is designed for uni only.
My main question is:
In my opinion, the idea of 3-Layer is that the BLL refers to the DAL, and the user interface refers to the BLL to create a complete separation of problems. However, I made a small mock up of the project, following a few tutorials to get a 3-layer interface, and most basic tutorials still require links between the user interface and the BLL.
For example, in a project I created, which is a very simple e-commerce system for products and categories, I created the Product and ProductDAL classes in DAL, and then the ProductBLL class in BLL. With this setting, using only one database table (now forget the categories), BLL, apparently, serves only as a kind of interface between the UI and DAL, the methods are exactly the same as in the DAL, and only call the DAL version.
The problem is that in order to access the DAL through the BLL, I have to pass the Product object to the arguments of the BLL method, which means to first create a product object in the user interface, which means a link to the DAL from the user interface. Is this the right way to do something?
I can get around simple cases like this by creating a method in the BLL that takes the appropriate fields, for example. strings and ints to create the product object and return it to the AddProduct method. However, when it comes to binding different product attributes to shortcuts in the user interface, I still need access to the Product object.
Essentially, do I need to do loading methods in the BLL to access the properties of the product object? If not, what methods actually go there, can you give me some examples of methods that can go into the BLL in this kind of product script?
Thank you in advance and apologize if this was asked earlier - I read a lot of posts about the three-layer architecture, but most of them are very simple and available only for one table.