|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
General Java JavaBean Component Reuse
JavaBean Component Reuse
Dec. 1, 1997 12:00 AM
With industry momentum behind the development of powerful tools and diverse components, the JavaBean component market is growing rapidly. It is important to promote commercial quality JavaBeans components and tools; namely, components that can be used and reused by different users in different tools, can interoperate with other components from other vendors and are robust and functionally complete. A JavaBean component, or simply a Bean, is a platform-neutral component architecture that extends Java's "Write Once, Run Anywhere"ª capability. With tools like Sun Microsystems' Java Studio, developers can easily create reusable JavaBeans components that can be reassembled to create a wide variety of applications from spreadsheets to chat programs. Following are some guidelines for Java Beans component developers to help ensure that the maximum level of component reuse is achieved.
New Beans from Old Beans
Keeping the Next User in Mind
BeanInfo
Tips for creating BeanInfo:
Properties Not all properties should be made available as a bound property but consider whether or not some useful properties of the Bean are to be made bound. For example, a button might be made bound for its font size and type and background and foreground colors. Another example of useful bound property for a JavaBeans component is its internationalization locale: Changing the locale is likely to be of interest to other components that are interacting with this component. The JavaBean component architecture provides support for both constrained and bound properties. This support is orthogonal so that it is possible to have a property that is constrained but not bound. In practice, Beans that export a property as constrained should also export it as a bound property; then listeners would register for both notifications. This allows a simple two-phase protocol for reacting to changes in one such property. When a property is about to change the listener is invoked through VetoableChangeListener and given an opportunity to veto the proposed change. When the change has actually happened, the (same) listener is invoked through PropertyChangeListener and the listener can react to the change.
Customizers A Customizer can encapsulate deep expertise on the use of a component, and a Customizer can be delivered independently of the Bean itself. Some JavaBeans components may even want to include different Customizers to address the needs of different customers' backgrounds, markets and level of sophistication. Through careful consideration of these Bean characteristics, a JavaBean component developer secures a future in the emerging network software market without losing customers who use proprietary systems. By maximizing component reuse, a developer can also quickly attack new market opportunities and new ways to sell smaller packages of software. Reader Feedback: Page 1 of 1
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week
Breaking Cloud Computing News
|
|||||||||||||||||||||||||||||||||||||||||||||||||