Download presentation
Presentation is loading. Please wait.
Published byAnabel McDowell Modified over 9 years ago
1
Introduction to Software Components: the JavaBeans specs Babak Esfandiari
2
Software Components Component: "Encapsulated software object that provides a certain functionality or service and can be used in conjunction with other components to build applications." one should be able to develop applications by selecting components from a catalog and compose them. the catalogs and the components might reside on remote hosts
3
Software Components To be reusable, components: – expose a public interface – behave according to explicit specifications – are oblivious to their clients – can be assembled graphically
4
JavaBeans Java's component model
5
JavaBeans Concepts “ A Java Bean is a reusable software component that can be manipulated visually in a builder tool” -> JDK1.1 introspection customization events properties persistence
6
Introspection JavaBeans assembly tools such as the BeanBox are able to discover Bean properties and expose them using introspection – the Java Reflection API is used – Beans must follow a certain number of coding idioms default constructor public methods getters/setters events
7
Customization once Bean properties are discovered, they can be changed using introspection it is possible to change the way properties are accessed and modified
8
Events JavaBeans use the Java Event model – EventObject class – EventListeners
9
Persistence Instantiated JavaBeans' states can be saved and restored using serialization long-term persistence achieved with XML
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.