SlideShare a Scribd company logo
1 of 23
Prepared by :- Hitesh Parmar
hitesh.parmar915@gmail.com
@i_hiteshparmar
ď‚— What is a Java Bean.
ď‚— Components and classes with respect to Java Bean.
ď‚— Java.Beans(Package).
ď‚— The Component and its type in Java Beans.
ď‚— Useful Terms while Using Java Beans.
ď‚— Software Components
ď‚— Visually Manipulated, Builder Tools
ď‚— Support
 “It’s a Component Architecture of Java which allow
you to define the Component ”
ď‚— Java Bean is nothing but the Java Class.
ď‚— Example:-
ď‚— Swing are all the Java Bean component
ď‚— Component (Button,TextField,Label)
ď‚— Java Bean classes follow certain Rule or Condition.
ď‚— All java Bean classes must Implement the Serializable
Interface.
ď‚— Component may be used by some apllication
builder.
ď‚— A bean has a no argument constructor.
Serializing
CLASS
Class Object
Component
Object
ď‚— Java Bean API makes it possible to write the
component s/w in a java programming language.
ď‚— This package will be used depending upon the need
of the Application (based on funcion of bean classes).
ď‚— Now when its only the use of the property or the
Getter & Setter Method at that time you might not
even make a use of this package.
ď‚— The component is nothing but the group of classes.
 Example:- Jbutton(it’s a component not a class).
ď‚— In order to a swing Button there are whole lot of class
are involved to build this Jbutton.
ď‚— Component is a single Functionality provided by
many different classes
ď‚— Component is a group of classses that interact with
eachother to fulfill the single purpose.
ď‚— Application developer uses different beans in his
application using the Java Beans.
ď‚— You can build two types of Components.
Component
GUI based
Non GUI based
Extends
Component
ď‚— Properties
ď‚— Event
ď‚— Persistence
ď‚— Introspection
ď‚— Customization
ď‚— Discrete, named attributes that determine the
appearance ,behavior and state of a component.
ď‚— Accessible programmatically through accessor
methods.
ď‚— Accessible visually through property sheets.
ď‚— Simple Properties
ď‚— Boolean Properties
ď‚— Indexed Properties
ď‚— 1 Simple Properties:-
ď‚— Represent a single value.
ď‚— The accessor methods should follow standard naming
conventions.
public <PropertyType> get<PropertyName>();
public void set<PropertyName>(<PropertyType> value);
Example:
public String getHostName();
public void setHostName( String hostName );
ď‚— 2 BooleanProperties:-
ď‚— They are simple properties
ď‚— The getter methods follow an optional design pattern
public boolean is<PropertyName>();
Example:
public boolean isConnected();
ď‚— 3 Indexed Properties:-
ď‚— Represent an array of values
public <PropertyElement> get<PropertyName>(int index);
public void set<PropertyName>(int index,<PropertyElement> value);
public <PropertyElement>[] get<PropertyName>();
public void set<PropertyName>(<PropertyElement>[] values);
Example:
public Color setPalette(int index);
public void setPalette(int index,Color value);
public Color[] getPalette();
public void setPalette(Color[] values);
ď‚— Bound:-
ď‚— a bound property notifies other objects when its value
changes
ď‚— generates a PropertyChange event with property name,
old value and new value
ď‚— Constrained:-
ď‚— an object with constrained properties allows other
objects to veto a constrained property value change
ď‚— Constrained property listeners can veto a change by
throwing a PropertyVetoException
ď‚— Two types of objects are involved:
 “Source” objects.
 “Listener” objects.
ď‚— Message sent from one object to another.
ď‚— Sender fires event, recipient (listener) handles the
event
ď‚— There may be many listeners.
Event
source
Event
listener
Fire event
Event
Object
Register listener
Sender fires event, recipient (listener) handles
the event
ď‚— Persistance
ď‚— Your Bean should be able to store its state, which means
there should be the serializable interface.
ď‚— Upon the Bean a builder tool should be able to make a
reflaction and be able to create an object of your
component.
ď‚— [Ex. Drag and drop a component in to a design area and
the builder tool should be able to create the instance of
that component and be able to display the property of
that bean via reflaction.]
ď‚— Customization
ď‚— Using the Bean customization, you can specify what
methods or the properties that you want to expose at rhe
run time environment, so such property will be
displayed in the propertysheet.
ď‚— Introspection
ď‚— Is nothing but a reflection using which the builder tool
can display all the events and the properties of the
component.
ď‚— Reflection API
ď‚— It helps us to find out what are the contents of the class,
so you can findout what are the methods, constructors
and variables in the class and you can find out the
details in return.
ď‚— Due to the process of the reflection builder tool can be
able to display what are the property of the Component
in the property sheet and also provides the details
regarding the Events and methods.
ď‚— Buttons
ď‚— Text Fields
ď‚— List Boxes
ď‚— Scroll Bars
ď‚— Dialogs
BeanBoxToolBoxToolBox BeanBox
Property Sheet
ď‚— BDK - Sun
 NetBeans – www.netbeans.org
ď‚— Jbuilder - Inprise
ď‚— Super Mojo - Penumbra Software
ď‚— Visual Age for Java - IBM
ď‚— Visual Cafe - Symantec Corporation
ď‚— JDeveloper Suite - Oracle
Introduction to java beans

More Related Content

What's hot

Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and OperatorsMarwa Ali Eissa
 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and FunctionsJussi Pohjolainen
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlArjun Thakur
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arraysHassan Dar
 
Session bean
Session beanSession bean
Session beansandeep54552
 
Applets in java
Applets in javaApplets in java
Applets in javaWani Zahoor
 
9. Input Output in java
9. Input Output in java9. Input Output in java
9. Input Output in javaNilesh Dalvi
 
Java string handling
Java string handlingJava string handling
Java string handlingSalman Khan
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesVMware Tanzu
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivityTanmoy Barman
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
Spring beans
Spring beansSpring beans
Spring beansRoman Dovgan
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring FrameworkMehul Jariwala
 

What's hot (20)

Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
 
JavaScript: Variables and Functions
JavaScript: Variables and FunctionsJavaScript: Variables and Functions
JavaScript: Variables and Functions
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
JDBC
JDBCJDBC
JDBC
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
 
Javascript arrays
Javascript arraysJavascript arrays
Javascript arrays
 
Session bean
Session beanSession bean
Session bean
 
Introduction to EJB
Introduction to EJBIntroduction to EJB
Introduction to EJB
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Java IO
Java IOJava IO
Java IO
 
9. Input Output in java
9. Input Output in java9. Input Output in java
9. Input Output in java
 
Java string handling
Java string handlingJava string handling
Java string handling
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutes
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring beans
Spring beansSpring beans
Spring beans
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 

Similar to Introduction to java beans

Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)SURBHI SAROHA
 
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTHBhavsingh Maloth
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answersKrishnaov
 
Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)SURBHI SAROHA
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkRajind Ruparathna
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptxRishiGandhi19
 
-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptxIshwariKulkarni6
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depthVinay Kumar
 
SoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPluginsSoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPluginsSmartBear
 
Spring IOC and DAO
Spring IOC and DAOSpring IOC and DAO
Spring IOC and DAOAnushaNaidu
 
SCR Annotations for Fun and Profit
SCR Annotations for Fun and ProfitSCR Annotations for Fun and Profit
SCR Annotations for Fun and ProfitMike Pfaff
 

Similar to Introduction to java beans (20)

Java beans
Java beansJava beans
Java beans
 
introduction of Java beans
introduction of Java beansintroduction of Java beans
introduction of Java beans
 
Unit iv
Unit ivUnit iv
Unit iv
 
Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)
 
Java beans
Java beansJava beans
Java beans
 
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTHWEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
WEB PROGRAMMING UNIT IV NOTES BY BHAVSINGH MALOTH
 
Javabeans .pdf
Javabeans .pdfJavabeans .pdf
Javabeans .pdf
 
Java interview questions and answers
Java interview questions and answersJava interview questions and answers
Java interview questions and answers
 
Java beans
Java beansJava beans
Java beans
 
Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)Java Beans Unit 4(part 2)
Java Beans Unit 4(part 2)
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx-Kotlin_Camp_Unit2.pptx
-Kotlin_Camp_Unit2.pptx
 
-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx-Kotlin Camp Unit2.pptx
-Kotlin Camp Unit2.pptx
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
SoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPluginsSoapUI Pro Plugin Workshop #SoapUIPlugins
SoapUI Pro Plugin Workshop #SoapUIPlugins
 
Spring IOC and DAO
Spring IOC and DAOSpring IOC and DAO
Spring IOC and DAO
 
SCR Annotations for Fun and Profit
SCR Annotations for Fun and ProfitSCR Annotations for Fun and Profit
SCR Annotations for Fun and Profit
 
Spring boot
Spring bootSpring boot
Spring boot
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfWilly Marroquin (WillyDevNET)
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 

Recently uploaded (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

Introduction to java beans

  • 1. Prepared by :- Hitesh Parmar hitesh.parmar915@gmail.com @i_hiteshparmar
  • 2. ď‚— What is a Java Bean. ď‚— Components and classes with respect to Java Bean. ď‚— Java.Beans(Package). ď‚— The Component and its type in Java Beans. ď‚— Useful Terms while Using Java Beans. ď‚— Software Components ď‚— Visually Manipulated, Builder Tools ď‚— Support
  • 3. ď‚— “It’s a Component Architecture of Java which allow you to define the Component ” ď‚— Java Bean is nothing but the Java Class. ď‚— Example:- ď‚— Swing are all the Java Bean component ď‚— Component (Button,TextField,Label)
  • 4. ď‚— Java Bean classes follow certain Rule or Condition. ď‚— All java Bean classes must Implement the Serializable Interface. ď‚— Component may be used by some apllication builder. ď‚— A bean has a no argument constructor. Serializing CLASS Class Object Component Object
  • 5. ď‚— Java Bean API makes it possible to write the component s/w in a java programming language. ď‚— This package will be used depending upon the need of the Application (based on funcion of bean classes). ď‚— Now when its only the use of the property or the Getter & Setter Method at that time you might not even make a use of this package.
  • 6. ď‚— The component is nothing but the group of classes. ď‚— Example:- Jbutton(it’s a component not a class). ď‚— In order to a swing Button there are whole lot of class are involved to build this Jbutton. ď‚— Component is a single Functionality provided by many different classes ď‚— Component is a group of classses that interact with eachother to fulfill the single purpose.
  • 7. ď‚— Application developer uses different beans in his application using the Java Beans. ď‚— You can build two types of Components. Component GUI based Non GUI based Extends Component
  • 8. ď‚— Properties ď‚— Event ď‚— Persistence ď‚— Introspection ď‚— Customization
  • 9. ď‚— Discrete, named attributes that determine the appearance ,behavior and state of a component. ď‚— Accessible programmatically through accessor methods. ď‚— Accessible visually through property sheets.
  • 10. ď‚— Simple Properties ď‚— Boolean Properties ď‚— Indexed Properties
  • 11. ď‚— 1 Simple Properties:- ď‚— Represent a single value. ď‚— The accessor methods should follow standard naming conventions. public <PropertyType> get<PropertyName>(); public void set<PropertyName>(<PropertyType> value); Example: public String getHostName(); public void setHostName( String hostName );
  • 12. ď‚— 2 BooleanProperties:- ď‚— They are simple properties ď‚— The getter methods follow an optional design pattern public boolean is<PropertyName>(); Example: public boolean isConnected();
  • 13. ď‚— 3 Indexed Properties:- ď‚— Represent an array of values public <PropertyElement> get<PropertyName>(int index); public void set<PropertyName>(int index,<PropertyElement> value); public <PropertyElement>[] get<PropertyName>(); public void set<PropertyName>(<PropertyElement>[] values); Example: public Color setPalette(int index); public void setPalette(int index,Color value); public Color[] getPalette(); public void setPalette(Color[] values);
  • 14. ď‚— Bound:- ď‚— a bound property notifies other objects when its value changes ď‚— generates a PropertyChange event with property name, old value and new value ď‚— Constrained:- ď‚— an object with constrained properties allows other objects to veto a constrained property value change ď‚— Constrained property listeners can veto a change by throwing a PropertyVetoException
  • 15. ď‚— Two types of objects are involved: ď‚— “Source” objects. ď‚— “Listener” objects. ď‚— Message sent from one object to another. ď‚— Sender fires event, recipient (listener) handles the event ď‚— There may be many listeners.
  • 16. Event source Event listener Fire event Event Object Register listener Sender fires event, recipient (listener) handles the event
  • 17. ď‚— Persistance ď‚— Your Bean should be able to store its state, which means there should be the serializable interface. ď‚— Upon the Bean a builder tool should be able to make a reflaction and be able to create an object of your component. ď‚— [Ex. Drag and drop a component in to a design area and the builder tool should be able to create the instance of that component and be able to display the property of that bean via reflaction.]
  • 18. ď‚— Customization ď‚— Using the Bean customization, you can specify what methods or the properties that you want to expose at rhe run time environment, so such property will be displayed in the propertysheet. ď‚— Introspection ď‚— Is nothing but a reflection using which the builder tool can display all the events and the properties of the component.
  • 19. ď‚— Reflection API ď‚— It helps us to find out what are the contents of the class, so you can findout what are the methods, constructors and variables in the class and you can find out the details in return. ď‚— Due to the process of the reflection builder tool can be able to display what are the property of the Component in the property sheet and also provides the details regarding the Events and methods.
  • 20. ď‚— Buttons ď‚— Text Fields ď‚— List Boxes ď‚— Scroll Bars ď‚— Dialogs
  • 22. ď‚— BDK - Sun ď‚— NetBeans – www.netbeans.org ď‚— Jbuilder - Inprise ď‚— Super Mojo - Penumbra Software ď‚— Visual Age for Java - IBM ď‚— Visual Cafe - Symantec Corporation ď‚— JDeveloper Suite - Oracle