Java Beans are reusable software components that can be visually manipulated in builder tools. They allow developers to write reusable components once and run them anywhere on any Java-enabled platform. Key features of Java Beans include properties, events, persistence, and introspection to allow visual manipulation in builder tools. Customization is also supported to allow customizing a bean's appearance and behavior.
6. Software Components “ A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties.” Szyperski ECOOP96
7. Composition not Inheritance In OO languages, new objects are created from old using the inheritance mechanism. Pluggable components are connected together by composition rather than inheritance. Most of the flexibility of inheritance can be gained from various compositional tactics.
20. Design Pattern rules Constructors A bean has a no argument constructor Simple Properties public T getN() public void setN ( T value) Boolean Properties public boolean isN() public boolean getN() public void setN(boolean value) Indexed Properties public T getN(int index) public T[] getN() public void setN(int index, T value) public void setN(T[] values)
21.
22.
23.
24.
25.
26.
27.
28.
29. Event source Event Adapter Fire event Event Object Register event listener Event Listener Forward event Event Object Provide interface