On Apr 1, 2005 11:22 PM, Nando <[EMAIL PROTECTED]> wrote:
> So if you wouldn't mind, in a similar light, how would you define a business
> object then? What's the difference between a bean and a business object?
> When you use the term "business object", what exactly are you describing?

Sometimes a business object can be as simple as a bean, e.g., a
Product in an e-commerce application is just a set of data with
getters and setters but it represents a significant entity in the
business model. Normally, I'd say most business objects have some
behavior - business logic - associated with them. A shopping cart is a
good example of a business object with behavior since it can usually
provide a total of items in the carts, calculate taxes (maybe) -
things that go beyond the raw data inside the object. A Person object
might have a date of birth (attribute, with a getter and maybe a
private setter) and then an age behavior, dynamically calculated from
the date of birth.

Whereas...

A bean, whilst it can be a business object, can also be just a
convenience or an implementation detail.

And a transfer object is always a convenience introduced for
implementation purposes that serves no business purpose.

So, it's sort of a sliding scale...

> Why is it called a "business object"?

Because it is part of your business model where 'business' is whatever
the application does, and it often (but not always) represents
something in the real (business) world.
-- 
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to