Seminarium on Component-based Software Engineering

Download Report

Transcript Seminarium on Component-based Software Engineering

Seminarium on
Component-based
Software Engineering
JavaBeans
David Snuijf
Java
 Released in alpha-form in 1995 by
Sun
 Originality: concepts of applets
 Java became common used by 1996
20/07/2015
Seminarium CBSE
2
Java – components
 Java component models:





Applet
JavaBeans
Enterprise JavaBeans
Servlets
Application client components
J2SE
J2EE
J2SE: Java 2 platform, Standard Edition
J2EE: Java 2 platform, Enterprise Edition
20/07/2015
Seminarium CBSE
3
Let’s get into
avaBeans
20/07/2015
Seminarium CBSE
4
JavaBeans – solution to..
 Enables software developers to
design and create reusable pieces of
software that easily integrate
 with each other
 with applications
 with development tools
20/07/2015
Seminarium CBSE
5
JavaBeans – Main aspects





Events
Properties
Introspection
Customization
Persistence
20/07/2015
Seminarium CBSE
6
JavaBeans
 Approach to composition:
 Connection-oriented programming / wiring
 Beans define:
 Event sources
 Event listeners
 By connecting one bean instance’s
listener to another bean instance’s
event source, events flow
 container structures
 InfoBus
20/07/2015
Seminarium CBSE
7
Let’s get into
nterprise JavaBeans
20/07/2015
Seminarium CBSE
8
Enterprise JavaBeans (EJB)
 Provide a framework for components
that may be "plugged in" to a server
 Enterprise JavaBeans is totally
different of JavaBeans, except that it
uses some similar concepts
20/07/2015
Seminarium CBSE
9
Enterprise JavaBeans – Goals





Easy for developers to create applications
Standard way for client/server applications
Compatible with and uses other Java APIs
EJB can interoperate with non-Java apps
EJB is compatible with CORBA
20/07/2015
Seminarium CBSE
10
Enterprise JavaBean component
Client
EJB Server
EJB Container
Home
Remote
or local
EJB Home
stub
EJB Object
stub
Home
EJB Home
Remote
or local
EJB Object
EJB Bean
20/07/2015
Seminarium CBSE
11
Kind of Enterprise JavaBeans
Four kind of EJB beans
 Stateless session
 Stateful session
 Entity
 Message-driven
20/07/2015
Seminarium CBSE
12
Questions?
?
20/07/2015
Seminarium CBSE
13
20/07/2015
Seminarium CBSE
14