Skip to main content
Inspiring
June 30, 2007
Question

What is a 'bean'?

  • June 30, 2007
  • 3 replies
  • 534 views
I tried to google it and get 53 million answers to 'bean', so I'll throw it to the general CF public to answer me this.

What does the term bean mean to you?

I see it in so many threads, and everyone seems to know what it means - except me and the context isn't enough for me to grasp it. -Thx
This topic has been closed for replies.

3 replies

Chuck1411Author
Inspiring
June 30, 2007
thx guys, that helps a lot
Inspiring
June 30, 2007
Inspiring
June 30, 2007
A bean is a Java term for a value object. A value object is an OOP term for an object that represents a data item like car.cfc. Make sense?
Inspiring
June 30, 2007
As mentioned "bean" is a java term. Strictly unofficially, I think of CF's version of a bean (or value object) as an object like a Customer.cfc. Its purpose is to encapsulate customer information (or properites) and allow you to access/change them using getter/setter methods. The Customer.cfc may contain only simple values like strings or dates (firstName, lastName, customerJoinDate,..). But it can also be composed of other components like: Address.cfc


ColdFusion
http://www.dougboude.com/documents/dougboudeslexicon.cfm
http://www.mossyblog.com/archives/362.cfm
http://www.firemoss.com/blog/index.cfm?mode=entry&entry=207096B8-E081-2BAC-697F878438AD8E6A
Java
http://en.wikipedia.org/wiki/JavaBeans
http://java.sun.com/developer/onlineTraining/Beans/Beans1/simple-definition.html