0

What is the most common way to organize objects in a Business Object Layer?

For Example, I've worked with a BLL with that took this approach:

  • Common Folder - contains static utility files
  • Interfaces Folder - All Interfaces
  • Dal - Data Access Objects
  • Services - Objects that access Services
  • Project Root - Contains the business objects

I've also seen Interfaces mixed in business objects, and BLL projects that have objects in model and Library folders.

Josh
  • 8,219
  • 13
  • 76
  • 123
  • I would group logical objects together and separate all infrastructure code. Have a look at this: http://microsoftnlayerapp.codeplex.com/ – Wouter de Kort Mar 20 '13 at 13:37

1 Answers1

0

It is far better to arrange them in logical groups though. Your Business logic might have many sections and file pertaining to a specific section should be in the same section.

e.g. say Discounts, you might have a service which can calculate discounts, at the same time you might have objects which yield discount information. It would be better to put all of them in one folder.

Murtuza Kabul
  • 6,438
  • 6
  • 27
  • 34
  • Within a logical group such as "Discounts," would you have an Interface folder or just keep the Interfaces mixed with the classes? Would you keep the other folders such as Common, Dal and Services off the root since they are not part logical group? – Josh Mar 20 '13 at 14:35
  • Depends, if it is a small project and I do not have too many files inside each logical group, I will not create sub-folders. Otherwise, having subfolder inside each logical group is a good idea. – Murtuza Kabul Mar 21 '13 at 13:03