Andrew McDonough

Please note: This page is imported from my wiki, which hasn't been updated in over 10 years. Some of the formatting was lost during the import. I'll try to get around to fixing it someday.

Java Beans

A bean is reusable software software component.

It is a type of object that obeys the following rules.

  • It must have a zero argument public constructor argument e.g. public MyBean() { …
  • It implements the Serializable interface
  • Its fields are accessed via get and set methods
  • Implements listener mechanisms

JavaBeans used to be used only for client side GUI Development where they could be dragged from a beanbox into a view. They are now used on the server side as Enterprise Java Beans.

The usebean attribute concern non-visual beans

The main advantage of a bean is introspectoin

Enterprise Java Beans are Entity Beans

Entity beans model business ‘Nouns’

http://www.unix.org.ua/orelly/java-ent/ebeans/ch06_01.htm


Andrew McDonough

Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.

Follow Andrew on Twitter or Connect on LinkedIn