Java Beans Jiang Shu Murali Krishnan Day 1

Java. Beans Jiang Shu, Murali Krishnan (Day 1) Alex Verstak, Umer Farooq (Day 2) 01/28/2002 CS 6704, Spring 2002

What is Java. Bean ¨ Java. Beans is a portable, platform- independent component model written in the Java programming language, developed in collaboration with industry leaders. ¨ The Java. Beans architecture brings the component development model to Java 01/28/2002 CS 6704, Spring 2002 2

Component Model ¨ Components are self-contained elements of software that can be controlled dynamically and assembled to form applications. – Software component (following a set of rules and guidelines; properties, events, persistence) – Builder tool – Visual manipulation 01/28/2002 CS 6704, Spring 2002 3

What is a Bean ¨ A Java Bean is a reusable software component that can be manipulated visually in a builder tool. – Simple / Complex – Visible or Invisible 01/28/2002 CS 6704, Spring 2002 4

Bean Features ¨ Typical unifying features that distinguish a Bean are: – Properties: enable developers to customize and program with Beans – Persistence: enables developers to customize Beans in an app builder, and then retrieve those Beans, with customized features intact, for future use – Events: enables Beans to communicate and connect together – Introspection: enables a builder tool to analyze how a Bean works – Customization: enables a developer to use an app builder tool to customize the appearance and behavior of a Bean 01/28/2002 CS 6704, Spring 2002 5

Bean. Box 01/28/2002 CS 6704, Spring 2002 6

Common Questions ¨ Applet vs. Java. Beans ¨ Java Foundation Class vs. Java. Beans ¨ JDK 1. 1 is needed 01/28/2002 CS 6704, Spring 2002 7

Common Questions (2) ¨ What is Enterprise Java. Bean – Enterprise Java. Beans is an API specification for building scalable, distributed, component-based, multi-tier applications. – It leverages and extends the Java. Beans component model to provide a rich object-oriented transactional environment for developers building enterprise applications. 01/28/2002 CS 6704, Spring 2002 8

Common Questions (3) ¨ What is Info. Bus – The Info. Bus is a compact Java API which allows cooperating Beans (also applets), on a Web page or in any other Java application, to communicate data to one another – Beans to be categorized as "data providers" and "data consumers". – The Info. Bus specification extends Java. Beans by providing a set of enhanced interfaces to share and exchange dynamic data. – Bean. Connect? 01/28/2002 CS 6704, Spring 2002 9

Common Questions (4) ¨ Bridges to Active. X – Migration Assistant developed by IBM and Taligent – GUI interface – Properties, Events, Methods – Copy implementation code – Currently adding “round-trip” ability 01/28/2002 CS 6704, Spring 2002 10

Common Questions (5) ¨ What is Glasgow – To create more sophisticated Java. Beans components and applications • The Extensible Runtime Containment and Services Protocol • The Drag and Drop Subsystem • The Java. Beans Activation Framework (JAF) – Edinburgh 01/28/2002 CS 6704, Spring 2002 11

More Info ¨ Java. Beans Components by Category (also called “Directory”) http: //industry. java. sun. com/solutions/1, 2346, beans, 00. html …. Electronic Commerce (44) Electronic Publishing (25) Entertainment (6) Financial Services (23) Health Care (8) …. 01/28/2002 CS 6704, Spring 2002 12

More Info (2) ¨ Java. Beans 1. 01 Specification ftp: //ftp. javasoft. com/docs/beans. 101. pdf ¨ Java. Beans API http: //java. sun. com/j 2 se/1. 3/docs/api/java/beans/packagesummary. html 01/28/2002 CS 6704, Spring 2002 13

More Info (3) ¨ Tutorial by Andy Quinn – Complete & Comprehensive http: //java. sun. com/docs/books/tutorial/javabeans/ ¨ Short Ones A. Java. Beans Part I, Part II and Part III by Greg Voss http: //java. sun. com/products/javabeans/training. html B. Java Beans 101 Tutorial Part I, Part II and Part III by Beth Stearns http: //developer. java. sun. com/developer/online. Training/index. html 01/28/2002 CS 6704, Spring 2002 14

More Info (4) ¨ Articles and Books http: //java. sun. com/products/javabeans/docs/ ¨ News Group news: comp. lang. java. beans ¨ Mailing List send mail to listserv@javasoft. com In the body of the message, type: SUBSCRIBE BEANS-INFO 01/28/2002 CS 6704, Spring 2002 15

Reference – Robert Englander, “Developing Java Beans”, O’Reilly, 1997 – Java. Beans Official Site http: //java. sun. com/products/javabeans/ – Java. Beans 1. 01 specification ftp: //ftp. javasoft. com/docs/beans. 101. p df 01/28/2002 CS 6704, Spring 2002 16
- Slides: 16