Last update October 18, 2004 Advanced Programming 2004 Java Beans.

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

Component Oriented Programming 1 Chapter 2 Theory of Components.
Basic Concepts in Component-Based Software Engineering
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. Towards Dynamic Execution Semantics in Semantic Web Services.
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.
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
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.
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.”
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen - Bolzano Lesson 2 – Components.
Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology.
Software Engineering Module 1 -Components Teaching unit 3 – Advanced development Ernesto Damiani Free University of Bozen-Bolzano Lesson 1 – Component-Based.
Vrije Universiteit amsterdamPostacademische Cursus Informatie Technologie Component Technology objects versus components -- definitions interoperability.
M.Sc. Course, Dept. of Informatics and Telecommunications, University of Athens S.Hadjiefthymiades “Web Application Servers” Basics on WAS WAS are necessary.
Component-Based Software Engineering CSM-15 Paul Krause.
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.
UNIT-V The MVC architecture and Struts Framework.
Component-Based Software Engineering Introduction to Java Beans Paul Krause and Sotiris Moschoyiannis.
Programming Languages and Paradigms Object-Oriented Programming.
Component Software: A New Software Engineering Course H. Conrad Cunningham, Yi Liu, Pallavi Tadepalli, and Mingxian Fu Software Architecture Research Group.
Java Beans.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 19 Slide 1 Component-based software engineering 1.
Jaeki Song ISQS6337 JAVA Lecture 16 Other Issues in Java.
©Ian Sommerville 2000 Software Engineering, 6th edition. Slide 1 Component-based development l Building software from reusable components l Objectives.
Software Component Technology and Component Tracing CSC532 Presentation Developed & Presented by Feifei Xu.
SWE 316: Software Design and Architecture Objectives Lecture # 19 Java Beans SWE 316: Software Design and Architecture  Understand  what JavaBeans (“Beans”)
MSIS 670 Object-Oriented Software Engineering Week 1 Introduction to Java: Applications
Component-based software architecture Overview Divides the problem into sub-problems each associated with component partitions. The interfaces of the components.
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.
CIS 644 Aug. 25, 1999 tour of Java. First … about the media lectures… we are experimenting with the media format please give feedback.
Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
Java Programming: Advanced Topics 1 JavaBeans Chapter 8.
Java Bean Definition “A Java Bean is a reusable software component that can be manipulated visually in a builder tool.”
Integrated Systems Division Service-Oriented Programming Guy Bieber, Lead Architect Motorola ISD C4I 2000 OOPSLA Jini Pattern Language Workshop Guy Bieber,
MSIS 655 Advanced Business Applications Programming Week 1 Introduction to Java
Component Oriented Programming 1 Introduction to COP.
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Introduction to Java Beans CIS 421 Web-based Java Programming.
Introducing Allors Applications, Tools & Platform.
First Bean Compose SimpleBean Demo Simple Bean Discuss Manifest and Jar Add Properties to SimpleBean.
First Bean Compose SimpleBean Demo Simple Bean Discuss Manifest and Jar Add Properties to SimpleBean.
Java Beans. Definitions A reusable software component that can be manipulated visually in a ‘builder tool’. (from JavaBean Specification) The JavaBeans.
IFS410 Advanced Analysis and Design Week 1 Introduction to Java: Applications
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
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.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Introduction to Java Beans From Anders Børjesson.
Introduction to Software Components: the JavaBeans specs Babak Esfandiari.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Introduction to business component technologies. Component definitions Szyperski: A software component is a unit of composition with contractually specified.
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.
The Service in Service Oriented Architecture November 2, 2005 Aderbad Tamboli Petris.
Java Beans - Basics CIS 421 Web-based Java Programming.
OpenLegacy Training Day Four Introduction to Microservices
Introduction to Advanced Java Programming
Java Beans Sagun Dhakhwa.
Distribution and components
Introduction to Microservices Prepared for
Week 4 Object-Oriented Programming (1): Inheritance
MSIS 670 Object-Oriented Software Engineering
Introducing Java.
Java Programming: Advanced Topics
Presentation transcript:

Last update October 18, 2004 Advanced Programming 2004 Java Beans

Advanced Programming 2004 Slide 14. 2Agenda Software Component JavaBeans Component Writing a simple beans

Advanced Programming 2004 Slide Example: Car as a hierarchical component CAR Brakes Engine BatteryLightsTires Fuel Tank Cylind er Shaf t

Advanced Programming 2004 Slide Why Component? –Component-based development enables higher level of software reuse –Component Based Software Development is the d e facto paradigm for developing large Software systems – » enterprise-scale distributed applications » N-tier Web applications

Advanced Programming 2004 Slide 14. 5Component Software component a software building block “A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties.” [Szyperski 97]

Advanced Programming 2004 Slide How Objects Differ from Components Components Can be written in any language More loosely coupled than objects Larger granularity than objects Support multiple interfaces, and interface- oriented design Support more forms of dynamic binding and dynamic discovery Have better mechanisms for third party composition More support for higher order services (security, transactions, etc) Designed to obey rules of the underlying component framework Objects Bound to OO languages Many tight dependencies such as impl. Inheritance, fragile base class Fine-grained units of composition Limited forms of connectors (method invocation) Limited sets of supported services such as security, transactions, etc. Designed to obey Object-oriented principles

Advanced Programming 2004 Slide Component and Composition Keyboard CD Rom Mouse Motherboard Memory Harddisk Video card Printer Monitor

Advanced Programming 2004 Slide Component - JavaBeans The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBeans components are known as Beans.

Advanced Programming 2004 Slide Properties, Methods and Events Properties are the named attributes associated with a bean. Methods of a Bean are the normal Java methods which can be called from other components. Events are a way of providing information to other components by notifying them about something which happened.

Advanced Programming 2004 Slide JavaBeans Requirements one or more Java classes packaged in JAR file, bean target class marked serializable implements Serializable default constructor, no-parameters

Advanced Programming 2004 Slide Writing a simple bean Creating a simple Bean Compiling and saving the Bean into a Java Archive (JAR) file Inspecting the Bean's properties, methods, and events

Advanced Programming 2004 Slide A simple Bean: SimpleBean.java import java.awt.*; import java.io.Serializable; public class SimpleBean extends Canvas implements Serializable { //Constructor sets inherited properties public SimpleBean(){ setSize(60,40); setBackground(Color.red); } Implements serializable No-parameter constructor

Advanced Programming 2004 Slide Compiling and packaging a beans Compile the Bean: javac SimpleBean.java Create a manifest file. Use your favorite text editor to create a file, we'll call it manifest.tmp, that contains the following text: Name: SimpleBean.class Java-Bean: True Create the JAR file. The JAR file will contain the manifest and the SimpleBean class file: jar cfm SimpleBean.jar manifest.tmp SimpleBean.class

Advanced Programming 2004 Slide Where to Get More Information JavaBeans™ API Specification Java™ Tutorial : JavaBeans™