











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This lecture is delivered by Prem Vikas at Jaypee Institute of Information Technology University for discussing following points of Java Network Programming: Java, Beans, Component, Technology, Limitations, Need, Platform, Independent, Microsoft
Typology: Slides
1 / 19
This page cannot be seen from the preview
Don't miss anything!
An Introduction
Java Short Course Day-
Today’s Lecture
Component Technology JavaBeans
Examples
Component Software-
Java Beans
o JavaBeans implemented as an architecture-independent and platform-independent Application Programming Interface (API) for creating and using dynamic Java software components
o Mission Statement at JavaSsoft Write once, run anywhere, reuse everywhere Write Once Changes are not required to add up the functionalities, new features can be added, old features can be enhanced, but features are not dependent on each other Run Anywhere Cross platform execution along with support for distributed computing Reuse Everywhere In websites, applications, documents, where supported We will explore the architecture of Java Beans in rest of the lecture and will try to understand how JavaBeans fulfills its claim
Meeting Goals
Compact and easy to create and use Compact is required for the transfer of components over the network Applet APIs are already in used at browsers and are proven efficient in terms of size and execution Fully portable The JavaBeans API, coupled with the platform-independent Java system on which it is based, creates the platform-independent component solution Flexible design-time component editor support The JavaBeans architecture includes support for specifying design- time properties and editing mechanisms to facilitate visual editing of JavaBeans components Leverage for robust distributed computing mechanisms Java Solutions, RMI, CORBA, DCOM support or any other
Structure of Java Bean-
o Data / Methods Access Public, Protected, Private Just like a Java Class
o Interfaces A bean provides access to its functionality by means of interfaces Public Methods of a Bean define interfaces
Protected Methods
Private Methods
Public Methods
Data
Interface A Interface B
Using Beans with Builder Tools
Beans are used in specific Builder Tools
Visually lay out the application, using beans where appropriate. Customize the beans using visual property editors. Connect the beans using the builder tool's facilities, and write event- handler code. Package the application with the beans and share it with the world.
Provided by builder tool The builder tool communicates with bean using beans interfaces So ease of use is provided by the bean’s architecture
Java Beans API
o The complex functionality of JavaBeans is handled by means of JavaBeans API java.beans package is also referred to as JavaBeans API The technology JavaBeans is an interface and the functionalities are implemented by means of JavaBeans API
o Important Component Services provided by JavaBeans API Property management Introspection Event handling Persistence Application builder support
By understanding these services and how they work, you'll have much more insight into exactly what type of technology JavaBeans is
Property Management-
o The property management facilities in the JavaBeans API are responsible for handling all interactions relating to bean properties
o Properties are discrete, named attributes of a bean that determine its appearance and behavior
o Properties are important in any component technology because they isolate component state information into discrete pieces that can be easily modified.
o Example: How beans properties are accessed and used
Can be accessed scripting environments such as JavaScript or VBScript (as object field) Programmatically, using public accessor methods Visually, using property sheets in application builder tools
Property Mangement-
Services for revealing the beans structure, primarily for Builder tools Low Level Services: For builder tools to access the internal structure of bean either public or private, necessary for communication with bean High Level Services: For developer, provide access to the public properties of beans, use for builder for providing Visual Property Editor
Accessing public properties of a Bean is done by means of low level reflection services These services gather information about a bean and determine its public properties, methods, and events by applying simple design patterns. Design patterns are set of consistent rules or conventions
Creating Beans
Designing a Bean
Installing the BDK
Testing Beans with the BeanBox Test Container
Packaging Beans with JAR Files
Bean Requirements
Exports: properties, methods, events
Subset of components internal state
Invoked to execute component code
Notification of a change in state User activities (typing, mouse actions, …)
Developer can change appearance
Save current state so it can be reloaded