Reputation: 47
I'm currently working on Inventory project on windows Form, and I would like to implement three tier architecture in it. I would like to know how many classes should I create in Business Layer, and Data Access Layer.
What if later, work on my project gets increase? Should I stick to single long coded Business Layer and Data Access Layer, or should I create several classes within business layer and Data Access Layer?
Upvotes: 2
Views: 2147
Reputation: 11155
Generally,nouns in your requirements model into classes in your application.There could be other causes to create classes,like helpers and wrappers and functions returning multiple values.
If you are inexperienced in designing it, please take the help from an experienced guy.
Good luck with your project.
Upvotes: 2
Reputation: 9519
My approach:
PS: The Business Logic is implemented in a single class, using partial class
to split the code in several cs files.
Upvotes: 1
Reputation: 107237
As per Srinivas, generally each table or logical grouping of tables would be represented by a separate DAL and BLL class.
If you use an ORM, then you will also have entity classes for each in addition to your layers.
If your project gets really large, the next separation is usually along the lines of namespaces, either with subfolders on the same project, or splitting each business concern to a separate assembly.
Upvotes: 2