Where does business logic go?

  • Thread starter Thread starter Simon Harvey
  • Start date Start date
S

Simon Harvey

Hello Chaps,

Me and a collegue have been talking about where the best place to put
business logic is.

I think that the best place is where Microsoft suggest - in a seperate
business logic layer. The alternative is to have all the logic in with the
business entity objects, thus eliminating the business logic layer.

The reason that I prefer the seperate layer is because I think its more
flexible.

I was hoping someone might have further insight into this for us

Thanks all

Simon
 
Yes, the standard for enterprise applications is to have a separate business
logic layer.
However, for smaller, less formal applications that are unlikely to grow
large amounts over time, having many layers can be overkill.
 
A small addition - business entity objects are unnecessary unless you want
to encapsulate some complex operations on entity data into the business
entity classes.
According to Microsoft, using business entity objects as simple data holders
is not a good practice. More regular means such as DataSets should rather be
used for this purpose.
The business logic classes, therefore, should use these DataSets and perform
the logic itself over data stored there. If there are explicit constraints,
however, these
should be defined by means of the DataSet XSD schema.
 
Hi Dmitriy,

in message
According to Microsoft, using business entity objects as simple data holders
is not a good practice. More regular means such as DataSets should rather be
used for this purpose.
<snip>

Do you have a reference for this?

Regards,
Daniel
 
Back
Top