SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streamsHamid Ghorbani
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types pptkamal kotecha
 
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
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivityTanmoy Barman
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections frameworkRiccardo Cardin
 
Applets in java
Applets in javaApplets in java
Applets in javaWani Zahoor
 
MULTI THREADING IN JAVA
MULTI THREADING IN JAVAMULTI THREADING IN JAVA
MULTI THREADING IN JAVAVINOTH R
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in JavaSpotle.ai
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jspJafar Nesargi
 
Session bean
Session beanSession bean
Session beansandeep54552
 
Awt, Swing, Layout managers
Awt, Swing, Layout managersAwt, Swing, Layout managers
Awt, Swing, Layout managersswapnac12
 
Creating a data report in visual basic 6
Creating a data report in visual basic 6Creating a data report in visual basic 6
Creating a data report in visual basic 6mrgulshansharma
 

Was ist angesagt? (20)

Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
 
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
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
enterprise java bean
enterprise java beanenterprise java bean
enterprise java bean
 
Java awt
Java awtJava awt
Java awt
 
JNDI
JNDIJNDI
JNDI
 
Java swing
Java swingJava swing
Java swing
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
 
Applets in java
Applets in javaApplets in java
Applets in java
 
MULTI THREADING IN JAVA
MULTI THREADING IN JAVAMULTI THREADING IN JAVA
MULTI THREADING IN JAVA
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Jdbc Ppt
Jdbc PptJdbc Ppt
Jdbc Ppt
 
Session bean
Session beanSession bean
Session bean
 
Spring Core
Spring CoreSpring Core
Spring Core
 
Awt, Swing, Layout managers
Awt, Swing, Layout managersAwt, Swing, Layout managers
Awt, Swing, Layout managers
 
Creating a data report in visual basic 6
Creating a data report in visual basic 6Creating a data report in visual basic 6
Creating a data report in visual basic 6
 

Ă„hnlich wie 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 beans
Java beansJava beans
Java beanssptatslide
 
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
 

Ă„hnlich wie 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 beans
Java beansJava beans
Java beans
 
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
 

KĂĽrzlich hochgeladen

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
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
 
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
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
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
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

KĂĽrzlich hochgeladen (20)

The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
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
 
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-...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
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 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

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