Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Software Components: the JavaBeans specs Babak Esfandiari.

Similar presentations


Presentation on theme: "Introduction to Software Components: the JavaBeans specs Babak Esfandiari."— Presentation transcript:

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


Download ppt "Introduction to Software Components: the JavaBeans specs Babak Esfandiari."

Similar presentations


Ads by Google