views:

117

answers:

5

From the title, I believe it to be a straight forward question, but looking into the "world of Business Objects" I can't seem to put my finger on anything solid as to what a Business Object should be. Are there any best practices that I should follow, or even any design patterns?

I have found a book, "Expert C# Business Objects", would this be my best starting point to get a better understanding?

+4  A: 

A business object refers to the business behavior or data associated with the entity that it represents.

In an application you have code that does what the application is supposed to do (the business stuff) and code that technically allows that to run and interact with the user. For example, in a MVC pattern, the business stuff will be the Model's job.

I think this explains it better. You could also take a look at the MVC pattern and see the responsibility of each layer. Once you understand that, it would then be easier to see what qualifies as a "business object".

dpb
A: 

Perhaps a concrete example might help. Say you're writing an menu planning application. Your business objects here would be things like Menu, Ingredient, UserAccount, Invoice - those objects that encapsulate the logic of your business model.

Things that aren't business objects would include things like MenuForm, Database, Transaction.

Frank Shearar
+1  A: 

Business objects are the elements part of your domain model.

What is the domain model? The domain model describe what your system does from point of view of the real-world. The domain model describes the logical relationship between the elements and the constraint between them.

Business object, business entites, or simply entities are somehow exchangeable terms. There refer to what the software solution will represent in the real world, this can be client, account, documents, etc. This can be whatever your solution is supposed to address.

This then excludes purely technical objects which are only there only to solve implementation issues.

We use the term entities, because these elements exist (they have an existence) outside of the software. In other words, the software is a representation of these elements.

See:

ewernli
Thanks for this information. It certainly is a larger scaled area than I first thought.
Ardman
You might then also be interesting in this other question: http://stackoverflow.com/questions/2333307/should-enterprise-java-entities-be-dumb/2333921#2333921
ewernli
A: 

A Business Object is an object that represents business entity and optionally may contain Business Logic.

Padmarag
A: 

I still do not get a 100% understanding of how business objects (BO) differ from data transfer objects (DTO).

Seems to me that DTOs contains data only, while BOs contain the data and the code to deal with the data?!?

So one BO can "contain" the data of multiple DTOs, right?

Uwe Keim