G
Guest
Hi to all,
Im trying to understand how to separate the different layers inside an application (appearance layer, data layer, bussiness layer)...
i have a database of products very simple with a table that its "Products" and another that its "ProductsType"
I created a class with the same properties as fields i have in the Products Table
at the same time in this class i have as methods as StoredProcedures about products i have in the DataBase (for example:MethodAddProduct, MethodDeleteProduct,MethodGetProductById(int ID)), etc....
and another class with the same properties as fields i've in the ProductsType Table (food, drinks, etc...)
This are my questions:
Its this a good way to work with it?...
What its the best way for bind the classes that will contain the information (for instance of a product), and the appearance(interface) layer?
Im trying to understand how to separate the different layers inside an application (appearance layer, data layer, bussiness layer)...
i have a database of products very simple with a table that its "Products" and another that its "ProductsType"
I created a class with the same properties as fields i have in the Products Table
at the same time in this class i have as methods as StoredProcedures about products i have in the DataBase (for example:MethodAddProduct, MethodDeleteProduct,MethodGetProductById(int ID)), etc....
and another class with the same properties as fields i've in the ProductsType Table (food, drinks, etc...)
This are my questions:
Its this a good way to work with it?...
What its the best way for bind the classes that will contain the information (for instance of a product), and the appearance(interface) layer?