tags:

views:

66

answers:

1

I have been working on coming up with the best wy to put the classes for the best OOP. Sometimes I wonder if I am trying to over kill the thought process.

I am thinking now to have as an examples the Categories Object

Files

  1. Cateogories.cs - Object File
  2. CateogoriesDAL.cs - Data Access Layer
  3. CateogoriesBLL.cs - Business Logic Layer
  4. CateogoriesWS.cs - Web Service

When you call form any application local or external you would call the web service and it would get what you need.

Examples: You would create a Categories Object so you could pass it to the Web Service Layer when you wanted to Save (Insert or Update) a Category. All of the business rules would be in the Business Logic Layer.

How do you implement the OOP?

+1  A: 

You might want to look into using an Object/Relational-Mapper (ORM) such as Entity Framework or NHibernate to simplify things. You could then use a simple domain driven approach with Repositories, Services etc.

EDIT: The repositories are responsible for the actual interaction with the data layer; Get/Save entities. Then you could use Domain Services for actual "business logic".

TheCloudlessSky