On Apr 1, 2005 6:44 AM, Mike Kear <[EMAIL PROTECTED]> wrote: > I thought a 'bean' was the lowest level of building block in an OO > application. If a bean already has the data included in it, why also > have a transfer object? What does it do that a bean doesnt?
A bean is really any object that has getters / setters - it's a style of object. A transfer object is really any object that is used to transfer data between different layers within the application. So a transfer object can be a bean (it often is, but it doesn't have to be). And a bean can be pretty complex. If your big fat business object has getters and setters for all of its state, it's also a bean (but that suggests that you either have a poor business process or a lack of encapsulation). One of the real problems here is that there are pretty much no black and white definitions in OO. Lots of terms have synonyms and lots of terms overlap depending on context. It's often why discussions of OO seem so opaque to folks who aren't used to OO and it acts as a major barrier to learning this stuff. The best way to learn it is by doing it with a mentor who is already very familiar with OO. If you're a solo practitioner (as I believe you are Mike?) then it's doubly hard to get into OO. The various blogs that talk about the authors' experiences learning OO can be helpful here (Joe Rinehart, Doug Hughes and Jared Rypka-Hauer spring immediately to mind). -- 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]
