SauDard
SauDard

Reputation: 47

3-tier architecture in Windows Form

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

Answers (3)

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

Stefan P.
Stefan P.

Reputation: 9519

My approach:

  1. Database (usually SQL Server 2008 or Express Edition)
  2. Windows Service (WCF exposing EF 4 orm, complex data validations, work-flows, business logic)
  3. Windows client (calls WCF using the client Wcf proxy, minimal data validation)

PS: The Business Logic is implemented in a single class, using partial class to split the code in several cs files.

Upvotes: 1

StuartLC
StuartLC

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

Related Questions