05-09-2012, 11:40 AM
Java Beans
Java.ppt (Size: 134.5 KB / Downloads: 148)
Definitions
A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification)
The JavaBeans API provides a framework for defining reusable, embeddable, modular software components.
Intro to JavaBeans
What are JavaBeans?
Software components written in Java
Connect and Configure Components
Builder Tools allow connection and configuration of Beans
Begins ‘Age of Component Developer’
Bringing Engineering methods to Software Engineering (e.g. electronics…)
The JavaBeans API
Features implemented as extensions to standard Java Class Library
Main Component Services
GUI merging
Persistence
Event Handling
Introspection
Application Builder Support
User Interface Merging
Containers usually have Menus and/or toolbars
Allows components to add features to the menus and/or toolbars
Define mechanism for interface layout between components and containers
Persistence
Components can be stored and retrieved
Default – inherit serialization
Can define more complex solutions based on needs of the components
Event Handling
Defines how components interact
Java AWT event model serves as basis for the event handling API’s
Provides a consistent way for components to interact with each other
Introspection
Defines techniques so components can expose internal structure at design time
Allows development tools to query a component to determine member variables, methods, and interfaces
Standard naming patterns used
Based on java.lang.reflect
Application Builder Support
Provides support for manipulating and editing components at design time
Used by tools to provide layout and customizing during design
Should be separate from component
Not needed at run time
Creating a JavaBean
Requirements for a simple Bean
Packaging Bean in a JAR file
Additional Information – BeanInfo
Defining property editors
Defining Bean customizers
Naming Conventions
Java.ppt (Size: 134.5 KB / Downloads: 148)
Definitions
A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification)
The JavaBeans API provides a framework for defining reusable, embeddable, modular software components.
Intro to JavaBeans
What are JavaBeans?
Software components written in Java
Connect and Configure Components
Builder Tools allow connection and configuration of Beans
Begins ‘Age of Component Developer’
Bringing Engineering methods to Software Engineering (e.g. electronics…)
The JavaBeans API
Features implemented as extensions to standard Java Class Library
Main Component Services
GUI merging
Persistence
Event Handling
Introspection
Application Builder Support
User Interface Merging
Containers usually have Menus and/or toolbars
Allows components to add features to the menus and/or toolbars
Define mechanism for interface layout between components and containers
Persistence
Components can be stored and retrieved
Default – inherit serialization
Can define more complex solutions based on needs of the components
Event Handling
Defines how components interact
Java AWT event model serves as basis for the event handling API’s
Provides a consistent way for components to interact with each other
Introspection
Defines techniques so components can expose internal structure at design time
Allows development tools to query a component to determine member variables, methods, and interfaces
Standard naming patterns used
Based on java.lang.reflect
Application Builder Support
Provides support for manipulating and editing components at design time
Used by tools to provide layout and customizing during design
Should be separate from component
Not needed at run time
Creating a JavaBean
Requirements for a simple Bean
Packaging Bean in a JAR file
Additional Information – BeanInfo
Defining property editors
Defining Bean customizers
Naming Conventions