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

 
java_beans.txt · Last modified: 2009/04/21 09:12 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki