Java Beans THETOPPERSWAY.COM. Contents What is a Java Bean? Advantages Properties Bean Developers Kit (BDK) What makes Bean possible? Support for Java.

Slides:



Advertisements
Similar presentations
Copyright © 2001 Qusay H. Mahmoud JavaBeans An introduction to component-based development in general Introduction to JavaBeans – Java components – client-side.
Advertisements

Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
JavaBeans: Introspection and Customization Umer Farooq CS6704: Design Patterns & Component FrameworksJanuary 30, 2002.
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01.
Java Beans & Serialization CS-328 Dick Steflik. Java Beans Java based component technology –originally developed to provide java with a component technology.
JavaBeans introduction Klaus-Peter Heidrich for the University of Karlstad Inst. for Information Technology Dept. of Computer Science.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS eCommerce Technology Lecture 4: Web Architecture.
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.
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.”
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.
C++ fundamentals.
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.
Introducing JavaBeans Identify the features of a JavaBean Create and add a bean to an application Manipulate bean properties using accessor and mutator.
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.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
Component-Based Software Engineering Introduction to Java Beans Paul Krause and Sotiris Moschoyiannis.
Java Beans.
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
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.
Introduction to Java Beans by Anders Børjesson. Introduction to JavaBeans2 JavaBeans components JavaBeans are the components in the Java environment Many.
JavaBeans Components. To understand JavaBeans…  Proficient experience with the Java language required  Knowledge of classes and interfaces  Object-Oriented.
TM Introduction to JavaBeans™ Dimitrios Psarros Questra Consulting (716) x225.
Introduction To System Analysis and Design
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
1 First BlueJ Day, Houston, Texas, 1st March 2006 Writing BlueJ Extensions Ian Utting University of Kent.
Java Programming: Advanced Topics 1 JavaBeans Chapter 8.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
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 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
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.
First Bean Compose SimpleBean Demo Simple Bean Discuss Manifest and Jar Add Properties to SimpleBean.
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.
Intelligent Agent Framework1 From Chapter 7 of Constructing Intelligent Agents with Java.
Advanced Java Session 4 New York University School of Continuing and Professional Studies.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
Introduction to Java Beans by Anders Børjesson. Introduction to JavaBeans2 JavaBeans components JavaBeans are the components in the Java environment –COM.
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.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
SwE 455 Tutorial. What is Evolve? Evolve is a tool for defining components and connecting them together to form new components. Also provides a runtime.
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
Chapter 32 JavaBeans and Bean Events
Chapter 36 JavaBeans and Bean Events
Component-Level Design
Java Beans Sagun Dhakhwa.
DHTML,AJAX,JB, EJB By: Gaurav Srivastav.
Reusability 11/29/2018© 2006 ITT Educational Services Inc.
SwE 455 Tutorial.
JavaServer Faces: The Fundamentals
Pre-assessment Questions
Knowledge Byte In this section, you will learn about:
Component-Based Software Engineering
Seminarium on Component-based Software Engineering
Java Programming: Advanced Topics
Presentation transcript:

Java Beans THETOPPERSWAY.COM

Contents What is a Java Bean? Advantages Properties Bean Developers Kit (BDK) What makes Bean possible? Support for Java Bean

What is Java Bean?... “A Java Bean is a reusable software component that can be manipulated visually in a builder tool.” JavaBeans is a portable, platform-independent component model written in the Java programming language, developed in collaboration with industry leaders. It enables developers to write reusable components once and run them anywhere -- benefiting from the platform-independent power of Java technology. The goal of JavaBeans is to create a system whereby application developers can take a set of beans from a stock library and wire them together to make a full application The JavaBeans Specs are available at

Advantages of Java Beans It obtains all the benefits of Java “write-once, run-anywhere (WORA)” paradigm. The properties, events and methods of a bean that are exposed to an application builder tool can be controlled. A Bean may be designed to operate correctly in different environment, which makes it useful in global market. The configuration settings of a Bean can be saved in persistent storage and restored at a later time. A Bean may register to receive events from other objects and can generate events that are sent to other objects.

Features of JavaBeans Support for introspection so that a builder tool can analyze how a bean works Support for customization so that when using an application builder a user can customize the appearance and behavior of a bean Support for events as a simple communicator than can be used to connect up beans Support for properties both for customization and for programmatic use Support for persistence so that a bean can be customized in an application builder and then have its customized state saved away and reloaded later

Types of Bean application builder tools Sun provides two Bean application builder tools:- 1. Bean Developer Kit (BDK)-BeanBox compatible with ealier version of Java 2, version Bean Builder- compatible with Java 2, version 1.4 or later.

Bean Developer Kit (BDK) Visually Manipulated, Builder Tools Property Sheet Method Tracer BeanBoxToolBox

Bean Developer Kit (BDK)...

Selecting the events

Attaching Events

Generating Adapter...

Types of files use Java Archive(JAR) files:- A JAR files allows us to efficiently deploy a set of classes and their associated resources. Manifest files:- A developer must provide a manifest file to indicate which components in a JAR file are Java Beans.

What makes this possible? Properties Persistence Introspection Customization Events.

Properties Attributes. Can be read/write, read-only or write-only. Several types of properties: Simple Boolean Indexed.

Constructors Simple Properties public T getN() public void setN( T value) Boolean Properties public boolean isN() public boolean getN() public void setN(boolean value) Indexed Properties public T getN(int index) public T[] getN() public void setN(int index, T value) public void setN(T[] values) Here N is the name of the property and T is its type.

Introspection A mechanism that allows the builder tool to analyze a bean to determine its capacities. Two ways to analyze a bean: low-level reflection APIs. vendor provided explicit information (Customization). Application builder will provide default BeanInfo class.

Persistence Allows the graphical builder to recall the state of a bean. writeObject and readObject Allows the customization of objects. Appearance and behavior can be stored and recalled.

Customization Similar to Introspection. Develop your own BeanInfo class which extends SimpleBeanInfo. Develop your own Editor class which extends PropertyEditorSupport to custom build your property editor.

Events Two types of objects are involved: “ Source ” objects. “ Listener ” objects. Based on registration. Makes use of parametric polymorphism.

Events 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

Support BDK & Bean Builder - Sun NetBeans – Jbuilder - Inprise Visual Age for Java - IBM Visual Cafe - Symantec Corporation JDeveloper Suite - Oracle

Conclusion Easy to use. Difficult to build. Like all OO design, needs careful planning. Similar to the String library in C++. Wide selection of JavaBeans in the future.

THETOPPERSWAY.COM THANKS