This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Business Objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Business Objects" Watch "Business Objects" New topic
Author

Business Objects

vShyam Sundar
Ranch Hand

Joined: Oct 13, 2010
Posts: 60
Hi all,
I often heard the term Business object. Can any one explain what a business object is and how does it differs from a normal java object.


Thanks,
Shyam.
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2247

Business objects are objects that concentrate all the logic of your application. That is, instead of putting the logic in session beans, you put them in POJOs, and all the infrastructure stuff is controlled in fa├žades, which are session beans.

Business objects are pretty much the same as domain models, but, regarding the patterns presented in the Core J2EE Patterns book, I'd say that application services have more to do with services, which is one of the building blocks of a domain model.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
vShyam Sundar
Ranch Hand

Joined: Oct 13, 2010
Posts: 60
Thanks Robert for your reply. What do you mean by infrastructure stuff ? please explain this?


With EJB 2 business objects tend to represent entity bean objects with EJB3 spec domain objects tend to represent entity beans? Are business and domain objects same with EJB3. Comment on this.

Thanks,
Shyam.
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2247

Well champ, that's why we would be interested in using an application server, because of the infrastructure it provides. Things like transactions, security, and so on.

In the EJB2.x reality, one of the approaches is to create a model of objects with entity beans, but this concept was over after EJB 3.0. The other approach (which is used today) is to create an object model with POJOs. Ideally, a domain model should not have any infrastructure-related information (i.e. JPA annotations), but that's what most people do. Keeping your domain model pure will increase its reuse, because you'll be able to use it with any framework you want, and thus you won't be tied to any particular framework.
vShyam Sundar
Ranch Hand

Joined: Oct 13, 2010
Posts: 60
Thanks Robert. Got your point. As long as i am keeping my persistence layer separate, I can have the re usability.

What was the difference between Domain Logic and business logic. Is that domain logic deals with respect to entities like how they can be persisted and fetched and business logic refers to manipulation of this domain objects.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The term "domain object" is an academic way of saying "business object."

The term "business object" is a commercial way of saying "domain object."

In other words the adjectives "domain" and "business" mean the same thing and are used in different contexts. If we were building an object-oriented system in a research laboratory at a University, we might use the term "domain objects." If we were building an object-oriented system at a commercial bank, we might use the term "business objects."
vShyam Sundar
Ranch Hand

Joined: Oct 13, 2010
Posts: 60
Thanks Jimmy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Business Objects
 
Similar Threads
BO versus Business Entity
Difference between Business Object and Business Delegate
HttpSession object to EJB
Business Object Layer
Reg HFSJ mock exam question no.9 on page 754