JavaBeans Components. To understand JavaBeans…  Proficient experience with the Java language required  Knowledge of classes and interfaces  Object-Oriented.

Slides:



Advertisements
Similar presentations
3 Copyright © 2005, Oracle. All rights reserved. Basic Java Syntax and Coding Conventions.
Advertisements

Copyright © 2001 Qusay H. Mahmoud JavaBeans An introduction to component-based development in general Introduction to JavaBeans – Java components – client-side.
JavaBeans: Introspection and Customization Umer Farooq CS6704: Design Patterns & Component FrameworksJanuary 30, 2002.
Component Models and Technology Component-based Software Engineering
Java Beans & Serialization CS-328 Dick Steflik. Java Beans Java based component technology –originally developed to provide java with a component technology.
Principles of Object-Oriented Software Development The language Java.
JavaBeans introduction Klaus-Peter Heidrich for the University of Karlstad Inst. for Information Technology Dept. of Computer Science.
By Dr. Jiang B. Liu 12. The Java Beans. Java Beans n JavaBeans is a portable, platform-independent software component model written in Java. It enables.
JavaBeans A component architecture. What is JavaBeans? NC World (New Computing) Dictionary: JavaBeans n. 1. JavaSoft technology. 2. Component object model.
For more Lectures and Notes Visit
JAVA BEANS By Madhuri Kakumanu. What is a Java Bean? “ A Java Bean is a reusable software component that can be visually manipulated in builder tools.”
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology.
M.Sc. Course, Dept. of Informatics and Telecommunications, University of Athens S.Hadjiefthymiades “Web Application Servers” Basics on WAS WAS are necessary.
How is Java different from other languages Less than you think: –Java is an imperative language (like C++, Ada, C, Pascal) –Java is interpreted (like LISP,
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Introducing JavaBeans Lesson 2A / Slide 1 of 30 JDBC and JavaBeans Pre-assessment Questions 1.Which of the given symbols is used as a placeholder for PreparedStatement.
Java Beans.  Java offers software component development through java Beans  Java Beans are based on a software component model for java.  The model.
Java Beans Component Technology Integrated, Visual Development Environments Reusable Platform-Independent Modular.
Component-Based Software Engineering Introduction to Java Beans Paul Krause and Sotiris Moschoyiannis.
Java Beans.
Advanced Java New York University School of Continuing and Professional Studies.
Microsoft Visual Basic 2005: Reloaded Second Edition
Jaeki Song ISQS6337 JAVA Lecture 16 Other Issues in Java.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
JavaBeans vs. ActiveX Noah Mendelsohn Lotus Development Corp. August 27, 1997 ™ ™ Noah Mendelsohn Session JT2: JavaBeans vs. ActiveX Page 1.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Last update October 18, 2004 Advanced Programming 2004 Java Beans.
TM Introduction to JavaBeans™ Dimitrios Psarros Questra Consulting (716) x225.
Chapter 17: Applets, Images, and Sound. Objectives Learn about applets Write an HTML document to host an applet Use the init() method Work with JApplet.
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Java Programming: Advanced Topics 1 JavaBeans Chapter 8.
Components Components are specialized self contained Software entities that can be replicated, Customized and inserted into applications. Components come.
Java Bean Definition “A Java Bean is a reusable software component that can be manipulated visually in a builder tool.”
1 Chapter 21 JavaBeans, Bean Events, and MVC Architecture.
1 CSC 222: Object-Oriented Programming Spring 2012 netBeans & GUIBuilder  netBeans IDE create/edit/run a project  GUIBuilder JFrame, JButton, JTextField,
Introduction to Java Beans CIS 421 Web-based Java Programming.
Introduction to Java 120 February 2004Sifei HE © 2004 Introduction to Java for CS381, EE4.Web By Sifei HE Department of Computing.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Intro to Applets. Applet Applets run within the Web browser environment Applets bring dynamic interaction and live animation to an otherwise static HTML.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 27 JavaBeans and.
Java Beans. Definitions A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification) The JavaBeans.
Obsydian Component Model Ranjit Sahota Chief Architect Obsydian Development Ranjit Sahota Chief Architect Obsydian Development.
Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
JavaBean Component Java bean is a reusable software component that can be manipulated visually in a builder tool Graphic bean and Non-graphic bean Javabean.
Introduction to Java Beans From Anders Børjesson.
Introduction to Software Components: the JavaBeans specs Babak Esfandiari.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 32 JavaBeans and Bean.
Lorenz: Visitor Beans: An Aspect-Oriented Pattern Aspect-oriented pattern: describes a solution to a tangling problem in a particular context.
Java Programming: Advanced Topics1 Introduction to Advanced Java Programming Chapter 1.
Java Beans THETOPPERSWAY.COM. Contents What is a Java Bean? Advantages Properties Bean Developers Kit (BDK) What makes Bean possible? Support for Java.
Slides prepared by Rose Williams, Binghamton University Chapter 20 Java Never Ends.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Chapter 32 JavaBeans and Bean Events
J2EE Platform Overview (Application Architecture)
Chapter 36 JavaBeans and Bean Events
Introduction to Advanced Java Programming
Java Beans Sagun Dhakhwa.
JavaBeans and JSP CS-422.
Reusability 11/29/2018© 2006 ITT Educational Services Inc.
JavaServer Faces: The Fundamentals
Component-Based Software Engineering
Java Programming: Advanced Topics
Presentation transcript:

JavaBeans Components

To understand JavaBeans…  Proficient experience with the Java language required  Knowledge of classes and interfaces  Object-Oriented development and design  Simple Java GUI application programming using AWT  Exposure to Java’s Delegation Event-Handling Model

JavaBeans Overview  Software Components  JavaBeans Definition  The JavaBeans API  Applying JavaBeans  The Basic Structure of a Bean

Software Components  Discrete, Reusable Software standard  Microsoft’s ActiveX  Distributed Network Environment  Cross-platform  Must be controlled dynamically  Assembled to form applications  Interoperablility standards

The Component Model  Introspection - Discovery and Registration  Event Handling  Persistence  Visual Presentation - Layout  Application Builder Support

Introspection  Discovery of Component at Run Time  Late Binding  Expose Component Functionality  Component is Isolated, yet Usable

Event Handling  Alert to Internal Change  Component Interactivity  Listeners

Persistence  Saving State  Storage and Retrieval  Uniform Persistence Mechanism needed

Visual Presentation - Layout  Dynamic Property Control  Physical Layout  Component Interaction and Spatial Requirement  Container/Component Behavior

Application Builder Support  Graphical application builders  Toolboxes and Palettes  Editing Properties  Components must Expose properties and behaviors

JavaBean Definition  What is a Bean?  The JavaBeans specification states: A JavaBean is a reusable software component that can be manipulated visually in a builder tool.

JavaBeans Benefits and Features  Simple and Compact  Portable  Leverage Strengths of Java Platform  Application Builder Support  Flexible Build-Time Component Editors  Distributed Computing Support

JavaBeans and Java  Java: “Write once, Run Anywhere”  JavaBeans mission statement: “….Reuse Everywhere”  Java provides no component model  JavaBeans specifies framework for reusability and interoperability for components  Java integration requires code-level knowledge  JavaBeans integration requires visual editor

JavaBeans API  Property Management  Event Handling  Introspection  Persistence  Application Builder Support  Customization  Multithreading

Property Management  Accessor Methods  Indexed Properties  Bound Properties  Constrained Properties

Event Handling  Event Sources  Unicast  Multicast  Event Listeners  Event Objects  Event Adapters

Introspection  Reflection  Design Patterns  Explicit Bean Information  Introspector

Persistence  Storage and Retrieval  Java Object Serialization  Bean controlled persistence

Application Builder Support  Edit and Manipulate Beans  Bundled with Bean Separately  Property Sheets  Property Editors  Customizers

Multithreading  Relies on conventional Java Programming techniques  synchronized keyword  Make sure Beans are thread-safe

Where and How Beans are Used  Web Pages  Liven up static HTML  Interactivity  Applications  Application Builder Tool  Handwritten Code  Bridge Technology

Structure of a JavaBean  Data  Methods  Events DataMethods JavaBean Events

JavaBeans and the Interface Data Public Methods JavaBean Interface A Interface B

What Constitutes a Bean?  Class must be instantiable  Class must have a default constructor (not officially required by spec, but by most builder tools)  Class must be serializable  Implement Serializable, Externalizable  Class must follow JavaBeans naming conventions (sometimes called design patterns)  Class must use delegation event model

Constructing a Bean  “Must be instantiable” requirement  Not abstract  Not an interface  “Default constructor” requirement  Application builder tools  Persistence

Serialization  Representation as a series of bytes  Storage to non-volatile location  Implement Serializable Interface  Implement Externalizable Interface

JavaBeans Design Patterns  Naming conventions for automatic Introspection  Example: Property named Height public int getHeight(); public void setHeight(int h);  Patterns for Event Registration

Delegation Event Model  Introduced in Java 1.1 AWT  Most Java AWT Components are Beans  Simple  Graphical  Reusable  JFC Swing Components are JavaBean compliant

A Simple Bean public class FirstBean implements java.io.Serializable { protected int theValue; public FirstBean() { } public void setMyValue( int n ) { theValue = n; } public int getMyValue() { return theValue; }

Visual Development Environments  Developer can focus on Business Application  Connect Components Visually  Code-Generation Engine  Stability  Ease of Generation  Knowledge of Underlying Language Helpful

Visual Programming  NetBeans  JBuilder  VisualAge for Java  Eclipse  JDeveloper

Security and JavaBeans  Same security model as Java  Beans are treated like applets  Untrusted applet -> Untrusted Bean  Trusted applet -> Trusted Bean  Program for Untrusted Environments

Summary  JavaBeans satisfies the requirements of a discrete, reusable component model  Visual and Non-Visual JavaBeans can be developed and used in diverse development environments  Java Classes can become JavaBeans by adhering to some minimum standards  Java’s Security Model transfers directly to JavaBeans