Using and Developing JavaBeans
Rev. 1.1
This four-day course runs from an introduction to the JavaBeans architecture through in-depth coverage of implementation techniques and issues. The course taken as a whole is intended to give the student with no prior JavaBeans experience (but a good working knowledge of the Java language) a firm understanding of the component model, of how to use it in application development by using predeveloped Beans, and of how to develop JavaBeans from scratch. The course contains many example programs and exercises using the Bean Development Kit (BDK).
The first module is an introduction to the JavaBeans component model, to the builder tool using the BDKs BeanBox as a stand-in for a commercial builder tool and to practical issues of finding, understanding and using JavaBeans as found on the market. This module concentrates on the use of existing Beans in rapid application development. It is appropriate both for programmers who want to develop JavaBeans, and as a standalone module for rapid application developers who may not have Java coding experience but wish to use existing JavaBeans in their work.
The second module focuses on requirements and techniques for building JavaBeans from Java source code. It details the requirements of the Beans specification in naming Beans features as public methods on a Java class. The introspection process is liberally treated, including automatic analysis and custom information using BeanInfo classes. Property editors and graphical customizers are covered to conclude the module. Throughout, the BDKs BeanBox is used as a testing tool and also as an exemplar of the role a commercial Beans builder tool plays in Beans development. Generated code from the BeanBox is dug up and disassembled in a few cases as a way of investigating the importance of certain standards and techniques.
LEARNING OBJECTIVES
Course Duration: 4 days
Prerequisites: For the first module the student should have a basic understanding of Java software architecture (e.g. Module 1 from Object Innovations' Java Programming course). Some experience with GUI building, perhaps in similar RAD environments, will be helpful. The second module will require a good background in Java programming, including object-oriented use of the language, GUI programming, and an understanding of streams and serialization.
1. The JavaBeans Component Model
Overview
Role of a Bean
Life of a Bean
Properties
Methods
Events
Beans Standards in Other APIs
2. Builder Tools and the BeanBox
The BeanBox
Design-time vs. Run-time
JARs, Manifests Identifying Beans
Adding Beans to a GUI
Binding Properties
Connecting via Events
Using Non-Visual Beans
Saving Boxes of Beans
3. Developing Software Using Beans
Procuring Beans
Finding Out about a Bean
Exercising Beans
Beans in Applications
Generating an Applet
Module 2: JavaBeans Development
1. Implementing JavaBeans
Defining Properties
Firing Events
Defining Event Handlers
JARring the Bean
Testing in the BeanBox
Bound Properties
Vetoable Properties
Bean Serialization
2. Events in JavaBeans
Review of Java Event Model
Defining a Custom Event Class
Defining a Listener Interface
Implementing Event Source Behavior
Implementing an Event Handler
Events in the BeanBox
Generated Event Handlers Some Sleuthing
Generated Connections in an Applet
3. Introspection
Introspection Who Needs It?
Reflection Summary
Instantiating a Bean
The Introspection Process
BeanInfo
Automatic Analysis
4. Providing BeanInfo
Custom Profiles Using BeanInfo
Associating an Icon with a Bean
Simplifying the List of Methods
Feature Descriptors
Supporting Non-Standard Names
Additional BeanInfo
5. Customization
Property Sheets
Property Editors
Connection Using Property Views
Implementing a Property Editor
Customizers
The BeanDescriptor
Implementing a Customizer
Appendices
Appendix A. References
Appendix B. Quick Reference: Beans Naming Conventions
System Requirements
Hardware (Recommended)
CPU: Pentium 120 or equivalent or faster
RAM: 32 MB (64 MB)
Disk: 200 MB (500 MB)
Software
JDK version 1.2 or higher
Preferably with the Core API source code unpacked into directories
Preferably with full HTML documentation also installed
BDK version 1.1 platform-independent version
No commercial builder tools / IDEs are required, but they can be used if preferred
Copyright © 1999 Object Innovations, Inc.
All Rights Reserved