What defines a Business Object
Asked Answered
T

5

6

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?

Temptress answered 2/3, 2010 at 10:19 Comment(1)
The error here is a combination of the term "Business Object" being poor grammar and the innate confusion caused by a noun and a verb in English being indistinguishable in writing. Properly spoken "object" should be "obJECT" (the verb form) and the rules for subject/verb agreement dictate that "business" should be "businesses". Hence the term really should be "Businesses Object" and you'd see it in headlines like "Businesses Object to Proper Programming Practice". Or I'm making stuff up. You decide.</joke>Fasces
A
6

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".

Abroad answered 2/3, 2010 at 10:26 Comment(1)
The cited Wikipedia article is contrary to other popular definitions of a business object as explained by Rockford Lhotka in his book amazon.com/Expert-C-2008-Business-Objects/dp/1430210192 or in the book corej2eepatterns.com/Patterns2ndEd/BusinessObject.htm A Business Object and a Model represent separate concerns and should not be considered synonymous.Farthingale
F
5

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:

Forster answered 2/3, 2010 at 10:35 Comment(2)
Thanks for this information. It certainly is a larger scaled area than I first thought.Temptress
You might then also be interesting in this other question: #2333807Forster
M
1

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.

Miocene answered 2/3, 2010 at 10:32 Comment(0)
V
1

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?

Vulva answered 16/5, 2010 at 8:0 Comment(0)
A
0

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

Aleida answered 2/3, 2010 at 10:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.