SlideShare a Scribd company logo
Java & Java pla(orms
Ilio Catallo - info@iliocatallo.it
Outline
• Java technology
• JEE applica2ons
• References
Java technology
Java technology
Java is both a programming language and a pla-orm
The Java programming language
The Java programming language is a high-level, object-oriented
programming language firstly released in 1995
class App {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Pla$orms
A pla$orm is the hardware and so.ware environment in which a
program runs
Java pla'orms
A Java pla'orm is a par(cular environment in which Java
applica(ons run
Pla$orms
Pla$orms usually consist of a combina2on of the opera&ng system
and the underlying hardware
Pla$orms
Example: Microso) Windows on Intel architecture
Java pla'orm
The Java pla*orm is a so#ware-only pla*orm that runs on top of
other pla*orms
┌───────────────────────────────────┐
│ Java program │
├───────────────────────────────────┤
│ Java platform │
├───────────────────────────────────┤
│ Host platform │
└───────────────────────────────────┘
Java pla'orm
Every Java pla+orm consists of:
• A Java Virtual Machine (JVM)
• A set of applica8on programming interfaces (APIs)
Java virtual machine
The Java Virtual Machine (JVM) is an abstract computer that runs
compiled Java programs
┌───────────────────────────────────┐
│ Java program │
├─────────┬─────────────────────────┤
│ API │ │
├─────────┘ Java VM │
│ │
├───────────────────────────────────┤
│ Host platform │
└───────────────────────────────────┘
Java virtual machine
The JVM is virtual because it is implemented in so7ware on top of
a real host pla:orm
┌───────────────────────────────────┐
│ Java program │
├─────────┬─────────────────────────┤
│ API │ │
├─────────┘ Java VM │
│ │
├───────────────────────────────────┤
│ Host platform │
└───────────────────────────────────┘
Java virtual machine
Java programs are compiled into Java bytecode
Java virtual machine
Java bytecode is the machine language of the JVM
Java API
The Java API is a large collec2on of ready-made so9ware
components
Java API
It is grouped into libraries (packages) of related classes and
interfaces
Java API
For instance, the Collec0on API (java.util) provides the most
commonly used data structures
Java pla'orm specifica0ons
There exist three Java pla/orm specifica4ons
• Java Standard Edi-on
• Java Enterprise Edi-on
• Java Micro Edi-on
Java pla'orm specifica0ons
There exist three Java pla/orm specifica4ons
• Java Standard Edi,on
• Java Enterprise Edi,on
• Java Micro Edi-on
Java Standard Edi,on
Java Standard Edi,on (JSE) is a pla,orm specifica3on for
developing desktop applica,ons
Java Standard Edi,on
Java Standard Edi,on is the founda,on for developing in the Java
language, as it contains the set of Java standard libraries
Java Standard Edi,on
Java Standard Edi,on is just a specifica(on, not an implementa,on
Java Standard Edi,on
Vendors and open source projects are free to provide their own
implementa6on
• Oracle JDK
• OpenJDK
Java Enterprise Edi.on
Java Enterprise Edi.on (JEE) provides APIs and the run6me
environment for developing enterprise applica.ons
Java Enterprise Edi.on
Typical features of an enterprise applica1on
• Large-scale
• Distributed
• Highly-available
Java Enterprise Edi.on
Java Enterprise Edi.on is a superset of Java Standard Edi.on
Java Enterprise Edi.on
Therefore, JSE APIs can be used in any JEE applica:on
Java Enterprise Edi.on
JEE extends the JSE pla/orm with addi$onal APIs:
• Java Servlet API (javax.servlet)
• JavaServer Pages API (javax.servlet)
• Java Persistence API (java.persistence)
• Enterprise JavaBeans API (javax.ejb)
JEE specifica+on
Java Enterprise Edi.on is just a specifica(on, not an
implementa.on
JEE specifica+on
Namely, JEE is an umbrella specifica.on that references a number
of other more detailed specifica9on
┌──────────────────────────────────────────────┐
│ ┌──────────────┐ │
│ │ EJB │ │
│ ┌─────────────┐ │Specification │ │
│ │ Servlet │ └──────────────┘ │
│ │Specification│ │
│ └─────────────┘ ┌─────────────┐ │
│ │ JPA │ │
│ ┌─────────────┐ │Specification│ │
│ │ JSP │ └─────────────┘ │
│ │Specification│ │
│ └─────────────┘ │
└──────────────────────────────────────────────┘
JEE specification
JEE implementa,ons
Vendors and open source projects are free to implement one or
more JEE APIs
┌──────────────────────────────────────────────┐
│ ┌──────────────┐ │
│ │ EJB │ │
│ ┌─────────────┐ │Specification │ │
│ │ Servlet │ └──────────────┘ │
│ │Specification│ │
│ └─────────────┘ ┌─────────────┐ │
│ │ JPA │ │
│ ┌─────────────┐ │Specification│ │
│ │ JSP │ └─────────────┘ │
│ │Specification│ │
│ └─────────────┘ │
└──────────────────────────────────────────────┘
JEE specification
JEE implementa,ons
"Apache Tomcat 8.0 implements the Servlet 3.1 and JavaServer Pages
2.3 specifica?ons"
(Apache Tomcat 8.0 documenta3on)
JEE implementa,ons
"In addi(on to its own "na(ve" API, Hibernate is also an
implementa(on of the Java Persistence API (JPA) specifica(on"
(Hibernate ORM)
JEE Applica*ons
JEE Components
Java EE applica*ons are made up of components
JEE Components
A JEE component is a self-contained so/ware unit
JEE Components
You may already know a par0cular JEE component: servlets
public class MyServlet extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response);
public void doPost(HttpServletRequest request,
HttpServletResponse response);
public void init();
public void destroy();
}
JEE Components
There exist different types of JEE components
• Web components
• Business components
• Applica3on client components
JEE Components
Web components:
• Servlets
• JavaServer Pages (JSP) and JavaServer Faces (JSF)
JEE Components
Business components:
• Enterprise JavaBeans
JEE Components
Applica'on client components:
• Applets
• Applica+on Clients
JEE Containers
JEE components live within a container. A container is the JEE
run6me environment
JEE Containers
A container provides certain services to the components it hosts,
such as:
• Life-cycle management
• Dependency injec4on
• Concurrency
JEE Containers
Different kinds of components live in different kinds of containers
JEE servers
A Java EE server (also called applica&on server) implements the
en6re set of JEE APIs and provides the standard JEE containers
JEE servers
The reference JEE server is Oracle Glassfish. Possible alterna8ve
implementa8ons:
• IBM WebSphere
• Apache TomEE
• Red Hat JBoss
JEE servers
JEE server
┌────────────────────────────────────────────────────┐
│ Web container EJB container │
│ ┌──────────────────────┐ ┌─────────────────────┐ │
│ │ ┌─────────────┐ │ │ ┌─────────────┐ │ │
│ │ │ Servlet A │ │ │ │ EJB D │ │ │
│ │ └─────────────┘ │ │ └─────────────┘ │ │ ┌──────┐
┌─────────┐ │ │ ┌──────────┐│ │ ┌──────────┐│ │ │ │
│ Browser ├───┼─┤ │ JSP C │├───┤ │ EJB E │├─┼───┤ DB │
└─────────┘ │ │ └──────────┘│ │ └──────────┘│ │ │ │
│ │┌─────────────┐ │ │┌─────────────┐ │ │ └──────┘
│ ││ Servlet B │ │ ││ EJB F │ │ │
│ │└─────────────┘ │ │└─────────────┘ │ │
│ └──────────────────────┘ └─────────────────────┘ │
└────────────────────────────────────────────────────┘
Business logic
At the heart of any applica0on lies its business logic
"We call business logic any program code that pertains to the purpose
of a so6ware applica8on"
Business logic
In a chess game, the business logic handles:
• The board and pieces
• Their movements
• The rules of the game
Business logic
Such concerns are independent of, e.g., how pieces will be
displayed
Business logic
Such concerns are independent of, e.g., how pieces will be
displayed
The role of EJBs
In a JEE applica+on, EJBs encapsulate the business logic
@Stateless
public class FlightServiceBean {
List<SpecialDeal> getSpecialDeals() { ... }
List<Flight> findFlights(String queryString) { ... }
}
The role of EJBs
Moreover, the EJB container provides fundamental services such as
security and transac+ons
@Stateless
@TransactionManagement(TransactionManagementType.CONTAINER)
public class FlightServiceBean {
List<SpecialDeal> getSpecialDeals() { ... }
List<Flight> findFlights(String queryString) { ... }
}
The role of EJBs
Thanks to this, developers are free to focus of defining and
implemen6ng the business logic
JEE stack
However, many vendors and open source projects implement only
a subset of the JEE specifica;on
JEE stack
For instance, Apache Tomcat provides only a Web container
Web container
Web server
┌──────────────────────────┐
│ │
│ Web container │
│ ┌──────────────────────┐ │
│ │ ┌─────────────┐ │ │
│ │ │ Servlet A │ │ │
│ │ └─────────────┘ │ │ ┌──────┐
┌─────────┐ │ │ ┌──────────┐│ │ │ │
│ Browser ├───┼─┤ │ JSP C │├─┼───┤ DB │
└─────────┘ │ │ └──────────┘│ │ │ │
│ │┌─────────────┐ │ │ └──────┘
│ ││ Servlet B │ │ │
│ │└─────────────┘ │ │
│ └──────────────────────┘ │
│ │
└──────────────────────────┘
Can we built enterprise applica0ons without the whole JEE stack?
Can we write enterprise applica.on without the need of an applica.on
server?
The Spring Framework
The solu)on comes in the form of the Spring framework
The Spring Framework
…but this is something we will inves1gate in the next lecture ;-)
References
References
• Antonio Goncalves, Beginning Java EE 7, Apress Publica:ons
• Chris Richardson, POJOs in Ac:on, Manning Publica:ons
• D, Panda, R. Rahman, D. Lane, EJB3 In Ac:on, Manning
Publica:ons
• Oracle, GeGng Started
References
• Bill Venners, The lean, mean, virtual machine
• Oracle, Java EE 7 Tutorial
• Wikipedia, Java EE

More Related Content

What's hot

Authentication by encrypted negative password
Authentication by encrypted negative passwordAuthentication by encrypted negative password
Authentication by encrypted negative password
JAYAPRAKASH JPINFOTECH
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)
Prof. Erwin Globio
 
Taking User Input in Java
Taking User Input in JavaTaking User Input in Java
Taking User Input in Java
Eftakhairul Islam
 
How to download and install Python - lesson 2
How to download and install Python - lesson 2How to download and install Python - lesson 2
How to download and install Python - lesson 2
Shohel Rana
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
classall
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programming
mshellman
 
Java 101 intro to programming with java
Java 101  intro to programming with javaJava 101  intro to programming with java
Java 101 intro to programming with java
Hawkman Academy
 
Microsoft Office 2016
Microsoft Office 2016Microsoft Office 2016
Microsoft Office 2016Deana Strain
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
H2Kinfosys
 
Computer Virus
Computer VirusComputer Virus
Computer Virus
Rabab Munawar
 
Java buzzwords.pptx
Java buzzwords.pptxJava buzzwords.pptx
Java buzzwords.pptx
BHARATH KUMAR
 
Excel
ExcelExcel
Presentation on C programming language
Presentation on C programming languagePresentation on C programming language
Presentation on C programming language
Arunima Education Foundation
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
Nithin Kumar,VVCE, Mysuru
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 
Java swing
Java swingJava swing
Java swing
ssuser3a47cb
 

What's hot (20)

Authentication by encrypted negative password
Authentication by encrypted negative passwordAuthentication by encrypted negative password
Authentication by encrypted negative password
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)
 
Taking User Input in Java
Taking User Input in JavaTaking User Input in Java
Taking User Input in Java
 
How to download and install Python - lesson 2
How to download and install Python - lesson 2How to download and install Python - lesson 2
How to download and install Python - lesson 2
 
Microsoft Word Basics
Microsoft Word BasicsMicrosoft Word Basics
Microsoft Word Basics
 
introduction to visual basic PPT.pptx
introduction to visual basic PPT.pptxintroduction to visual basic PPT.pptx
introduction to visual basic PPT.pptx
 
Chapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to ProgrammingChapter 1 - An Introduction to Programming
Chapter 1 - An Introduction to Programming
 
Java 101 intro to programming with java
Java 101  intro to programming with javaJava 101  intro to programming with java
Java 101 intro to programming with java
 
Design rule 3
Design rule 3Design rule 3
Design rule 3
 
Microsoft Office 2016
Microsoft Office 2016Microsoft Office 2016
Microsoft Office 2016
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
 
Java input
Java inputJava input
Java input
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Computer Virus
Computer VirusComputer Virus
Computer Virus
 
Java buzzwords.pptx
Java buzzwords.pptxJava buzzwords.pptx
Java buzzwords.pptx
 
Excel
ExcelExcel
Excel
 
Presentation on C programming language
Presentation on C programming languagePresentation on C programming language
Presentation on C programming language
 
Java programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, MysuruJava programming material for beginners by Nithin, VVCE, Mysuru
Java programming material for beginners by Nithin, VVCE, Mysuru
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Java swing
Java swingJava swing
Java swing
 

Viewers also liked

Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
AMD Developer Central
 
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
SSA KPI
 
La tua europa
La tua europaLa tua europa
La tua europa
Luigi A. Dell'Aquila
 
INGENIERIA GEOGRAFICA Y AMBIENTAL
INGENIERIA GEOGRAFICA Y AMBIENTALINGENIERIA GEOGRAFICA Y AMBIENTAL
INGENIERIA GEOGRAFICA Y AMBIENTAL
Mateo47
 
El Hombre Y Su Comunidad (M.I)
El Hombre Y Su Comunidad  (M.I)El Hombre Y Su Comunidad  (M.I)
El Hombre Y Su Comunidad (M.I)
Tabernáculo De Adoración Adonay
 
Mercurial Quick Tutorial
Mercurial Quick TutorialMercurial Quick Tutorial
Mercurial Quick Tutorial
晟 沈
 
Growing a Data Pipeline for Analytics
Growing a Data Pipeline for AnalyticsGrowing a Data Pipeline for Analytics
Growing a Data Pipeline for Analytics
Roberto Agostino Vitillo
 
Desafío no. 32
Desafío no. 32Desafío no. 32
Managing the Maturity of Tourism Destinations: the Challenge of Governance an...
Managing the Maturity of Tourism Destinations: the Challenge of Governance an...Managing the Maturity of Tourism Destinations: the Challenge of Governance an...
Managing the Maturity of Tourism Destinations: the Challenge of Governance an...
FEST
 
EVALUACION EDUCACION FISICA
EVALUACION EDUCACION FISICAEVALUACION EDUCACION FISICA
EVALUACION EDUCACION FISICA
cursocecam07
 
Kti efta mayasari
Kti efta mayasariKti efta mayasari
Kti efta mayasari
KTIeftamayasari
 
CPP Language Basics - Reference
CPP Language Basics - ReferenceCPP Language Basics - Reference
CPP Language Basics - Reference
Mohammed Sikander
 
Understanding and using while in c++
Understanding and using while in c++Understanding and using while in c++
Understanding and using while in c++
MOHANA ALMUQATI
 
Evaluacion escala de rango 2016 2017
Evaluacion escala de rango 2016 2017Evaluacion escala de rango 2016 2017
Evaluacion escala de rango 2016 2017
Jesus Contreras Baez
 
C++ basics
C++ basicsC++ basics
C++ basics
husnara mohammad
 
Grade 10 flowcharting
Grade 10  flowchartingGrade 10  flowcharting
Grade 10 flowcharting
Rafael Balderosa
 
Apresentação java
Apresentação javaApresentação java
Apresentação javamunosai
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
Mohammed Sikander
 

Viewers also liked (20)

Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
Keynote (Nandini Ramani) - The Role of Java in Heterogeneous Computing & How ...
 
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
Java Platform and IDE Netbeans 6.7 for Developing Enterprise and Web Applicat...
 
La tua europa
La tua europaLa tua europa
La tua europa
 
INGENIERIA GEOGRAFICA Y AMBIENTAL
INGENIERIA GEOGRAFICA Y AMBIENTALINGENIERIA GEOGRAFICA Y AMBIENTAL
INGENIERIA GEOGRAFICA Y AMBIENTAL
 
El Hombre Y Su Comunidad (M.I)
El Hombre Y Su Comunidad  (M.I)El Hombre Y Su Comunidad  (M.I)
El Hombre Y Su Comunidad (M.I)
 
Mercurial Quick Tutorial
Mercurial Quick TutorialMercurial Quick Tutorial
Mercurial Quick Tutorial
 
12 SQL
12 SQL12 SQL
12 SQL
 
Growing a Data Pipeline for Analytics
Growing a Data Pipeline for AnalyticsGrowing a Data Pipeline for Analytics
Growing a Data Pipeline for Analytics
 
Desafío no. 32
Desafío no. 32Desafío no. 32
Desafío no. 32
 
Managing the Maturity of Tourism Destinations: the Challenge of Governance an...
Managing the Maturity of Tourism Destinations: the Challenge of Governance an...Managing the Maturity of Tourism Destinations: the Challenge of Governance an...
Managing the Maturity of Tourism Destinations: the Challenge of Governance an...
 
EVALUACION EDUCACION FISICA
EVALUACION EDUCACION FISICAEVALUACION EDUCACION FISICA
EVALUACION EDUCACION FISICA
 
Kti efta mayasari
Kti efta mayasariKti efta mayasari
Kti efta mayasari
 
CPP Language Basics - Reference
CPP Language Basics - ReferenceCPP Language Basics - Reference
CPP Language Basics - Reference
 
Understanding and using while in c++
Understanding and using while in c++Understanding and using while in c++
Understanding and using while in c++
 
Evaluacion escala de rango 2016 2017
Evaluacion escala de rango 2016 2017Evaluacion escala de rango 2016 2017
Evaluacion escala de rango 2016 2017
 
C++ basics
C++ basicsC++ basics
C++ basics
 
Grade 10 flowcharting
Grade 10  flowchartingGrade 10  flowcharting
Grade 10 flowcharting
 
ch 3
ch 3ch 3
ch 3
 
Apresentação java
Apresentação javaApresentação java
Apresentação java
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 

Similar to Java and Java platforms

J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
Emmanuel Alimpolos
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorial
jackschitze
 
Java chapter 1 basic introduction Unit-1.pptx
Java chapter  1 basic introduction Unit-1.pptxJava chapter  1 basic introduction Unit-1.pptx
Java chapter 1 basic introduction Unit-1.pptx
noosdysharma
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
Shaharyar khan
 
What is-java
What is-javaWhat is-java
What is-java
Shahid Rasheed
 
Java introduction
Java introductionJava introduction
Java introduction
The icfai university jaipur
 
Java basics notes
Java basics notesJava basics notes
Java basics notes
Nexus
 
Java programming basics notes for beginners(java programming tutorials)
Java programming basics notes for beginners(java programming tutorials)Java programming basics notes for beginners(java programming tutorials)
Java programming basics notes for beginners(java programming tutorials)
Daroko blog(www.professionalbloggertricks.com)
 
Java introduction
Java introductionJava introduction
Java introduction
logeswarisaravanan
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
Java Lover
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
CodeOps Technologies LLP
 
Java programming(unit 1)
Java programming(unit 1)Java programming(unit 1)
Java programming(unit 1)
SURBHI SAROHA
 
Java -lec-1
Java -lec-1Java -lec-1
Java -lec-1
Zubair Khalid
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
Murugesh33
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
Murugesh33
 
Core Java Basics
Core Java BasicsCore Java Basics
Core Java Basics
Fayis-QA
 
Java - At a glance
Java - At a glanceJava - At a glance
Java - At a glance
Nitish Baranwal
 
Basic javaprogramming(session1)
Basic javaprogramming(session1)Basic javaprogramming(session1)
Basic javaprogramming(session1)Barm Bannasan
 

Similar to Java and Java platforms (20)

J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
 
java intro.pptx
java intro.pptxjava intro.pptx
java intro.pptx
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorial
 
Java chapter 1 basic introduction Unit-1.pptx
Java chapter  1 basic introduction Unit-1.pptxJava chapter  1 basic introduction Unit-1.pptx
Java chapter 1 basic introduction Unit-1.pptx
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 
What is-java
What is-javaWhat is-java
What is-java
 
Java introduction
Java introductionJava introduction
Java introduction
 
Java basics notes
Java basics notesJava basics notes
Java basics notes
 
Java basics notes
Java basics notesJava basics notes
Java basics notes
 
Java programming basics notes for beginners(java programming tutorials)
Java programming basics notes for beginners(java programming tutorials)Java programming basics notes for beginners(java programming tutorials)
Java programming basics notes for beginners(java programming tutorials)
 
Java introduction
Java introductionJava introduction
Java introduction
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java Cloud and Container Ready
Java Cloud and Container ReadyJava Cloud and Container Ready
Java Cloud and Container Ready
 
Java programming(unit 1)
Java programming(unit 1)Java programming(unit 1)
Java programming(unit 1)
 
Java -lec-1
Java -lec-1Java -lec-1
Java -lec-1
 
JAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptxJAVAPart1_BasicIntroduction.pptx
JAVAPart1_BasicIntroduction.pptx
 
JAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptxJAVA_Day1_BasicIntroduction.pptx
JAVA_Day1_BasicIntroduction.pptx
 
Core Java Basics
Core Java BasicsCore Java Basics
Core Java Basics
 
Java - At a glance
Java - At a glanceJava - At a glance
Java - At a glance
 
Basic javaprogramming(session1)
Basic javaprogramming(session1)Basic javaprogramming(session1)
Basic javaprogramming(session1)
 

More from Ilio Catallo

C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template Library
Ilio Catallo
 
Regular types in C++
Regular types in C++Regular types in C++
Regular types in C++
Ilio Catallo
 
Resource wrappers in C++
Resource wrappers in C++Resource wrappers in C++
Resource wrappers in C++
Ilio Catallo
 
Memory management in C++
Memory management in C++Memory management in C++
Memory management in C++
Ilio Catallo
 
Operator overloading in C++
Operator overloading in C++Operator overloading in C++
Operator overloading in C++
Ilio Catallo
 
Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++
Ilio Catallo
 
Arrays in C++
Arrays in C++Arrays in C++
Arrays in C++
Ilio Catallo
 
Pointers & References in C++
Pointers & References in C++Pointers & References in C++
Pointers & References in C++
Ilio Catallo
 
Spring MVC - Wiring the different layers
Spring MVC -  Wiring the different layersSpring MVC -  Wiring the different layers
Spring MVC - Wiring the different layers
Ilio Catallo
 
Spring MVC - Web Forms
Spring MVC  - Web FormsSpring MVC  - Web Forms
Spring MVC - Web Forms
Ilio Catallo
 
Spring MVC - The Basics
Spring MVC -  The BasicsSpring MVC -  The Basics
Spring MVC - The Basics
Ilio Catallo
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
Ilio Catallo
 
Introduction To Spring
Introduction To SpringIntroduction To Spring
Introduction To Spring
Ilio Catallo
 
Gestione della memoria in C++
Gestione della memoria in C++Gestione della memoria in C++
Gestione della memoria in C++
Ilio Catallo
 
Array in C++
Array in C++Array in C++
Array in C++
Ilio Catallo
 
Puntatori e Riferimenti
Puntatori e RiferimentiPuntatori e Riferimenti
Puntatori e Riferimenti
Ilio Catallo
 
Java Persistence API
Java Persistence APIJava Persistence API
Java Persistence API
Ilio Catallo
 
JSP Standard Tag Library
JSP Standard Tag LibraryJSP Standard Tag Library
JSP Standard Tag Library
Ilio Catallo
 
Internationalization in Jakarta Struts 1.3
Internationalization in Jakarta Struts 1.3Internationalization in Jakarta Struts 1.3
Internationalization in Jakarta Struts 1.3
Ilio Catallo
 
Validation in Jakarta Struts 1.3
Validation in Jakarta Struts 1.3Validation in Jakarta Struts 1.3
Validation in Jakarta Struts 1.3
Ilio Catallo
 

More from Ilio Catallo (20)

C++ Standard Template Library
C++ Standard Template LibraryC++ Standard Template Library
C++ Standard Template Library
 
Regular types in C++
Regular types in C++Regular types in C++
Regular types in C++
 
Resource wrappers in C++
Resource wrappers in C++Resource wrappers in C++
Resource wrappers in C++
 
Memory management in C++
Memory management in C++Memory management in C++
Memory management in C++
 
Operator overloading in C++
Operator overloading in C++Operator overloading in C++
Operator overloading in C++
 
Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++
 
Arrays in C++
Arrays in C++Arrays in C++
Arrays in C++
 
Pointers & References in C++
Pointers & References in C++Pointers & References in C++
Pointers & References in C++
 
Spring MVC - Wiring the different layers
Spring MVC -  Wiring the different layersSpring MVC -  Wiring the different layers
Spring MVC - Wiring the different layers
 
Spring MVC - Web Forms
Spring MVC  - Web FormsSpring MVC  - Web Forms
Spring MVC - Web Forms
 
Spring MVC - The Basics
Spring MVC -  The BasicsSpring MVC -  The Basics
Spring MVC - The Basics
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
 
Introduction To Spring
Introduction To SpringIntroduction To Spring
Introduction To Spring
 
Gestione della memoria in C++
Gestione della memoria in C++Gestione della memoria in C++
Gestione della memoria in C++
 
Array in C++
Array in C++Array in C++
Array in C++
 
Puntatori e Riferimenti
Puntatori e RiferimentiPuntatori e Riferimenti
Puntatori e Riferimenti
 
Java Persistence API
Java Persistence APIJava Persistence API
Java Persistence API
 
JSP Standard Tag Library
JSP Standard Tag LibraryJSP Standard Tag Library
JSP Standard Tag Library
 
Internationalization in Jakarta Struts 1.3
Internationalization in Jakarta Struts 1.3Internationalization in Jakarta Struts 1.3
Internationalization in Jakarta Struts 1.3
 
Validation in Jakarta Struts 1.3
Validation in Jakarta Struts 1.3Validation in Jakarta Struts 1.3
Validation in Jakarta Struts 1.3
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Java and Java platforms

  • 1. Java & Java pla(orms Ilio Catallo - info@iliocatallo.it
  • 2. Outline • Java technology • JEE applica2ons • References
  • 4. Java technology Java is both a programming language and a pla-orm
  • 5. The Java programming language The Java programming language is a high-level, object-oriented programming language firstly released in 1995 class App { public static void main(String[] args) { System.out.println("Hello World!"); } }
  • 6. Pla$orms A pla$orm is the hardware and so.ware environment in which a program runs
  • 7. Java pla'orms A Java pla'orm is a par(cular environment in which Java applica(ons run
  • 8. Pla$orms Pla$orms usually consist of a combina2on of the opera&ng system and the underlying hardware
  • 9. Pla$orms Example: Microso) Windows on Intel architecture
  • 10. Java pla'orm The Java pla*orm is a so#ware-only pla*orm that runs on top of other pla*orms ┌───────────────────────────────────┐ │ Java program │ ├───────────────────────────────────┤ │ Java platform │ ├───────────────────────────────────┤ │ Host platform │ └───────────────────────────────────┘
  • 11. Java pla'orm Every Java pla+orm consists of: • A Java Virtual Machine (JVM) • A set of applica8on programming interfaces (APIs)
  • 12. Java virtual machine The Java Virtual Machine (JVM) is an abstract computer that runs compiled Java programs ┌───────────────────────────────────┐ │ Java program │ ├─────────┬─────────────────────────┤ │ API │ │ ├─────────┘ Java VM │ │ │ ├───────────────────────────────────┤ │ Host platform │ └───────────────────────────────────┘
  • 13. Java virtual machine The JVM is virtual because it is implemented in so7ware on top of a real host pla:orm ┌───────────────────────────────────┐ │ Java program │ ├─────────┬─────────────────────────┤ │ API │ │ ├─────────┘ Java VM │ │ │ ├───────────────────────────────────┤ │ Host platform │ └───────────────────────────────────┘
  • 14. Java virtual machine Java programs are compiled into Java bytecode
  • 15. Java virtual machine Java bytecode is the machine language of the JVM
  • 16. Java API The Java API is a large collec2on of ready-made so9ware components
  • 17. Java API It is grouped into libraries (packages) of related classes and interfaces
  • 18. Java API For instance, the Collec0on API (java.util) provides the most commonly used data structures
  • 19. Java pla'orm specifica0ons There exist three Java pla/orm specifica4ons • Java Standard Edi-on • Java Enterprise Edi-on • Java Micro Edi-on
  • 20. Java pla'orm specifica0ons There exist three Java pla/orm specifica4ons • Java Standard Edi,on • Java Enterprise Edi,on • Java Micro Edi-on
  • 21. Java Standard Edi,on Java Standard Edi,on (JSE) is a pla,orm specifica3on for developing desktop applica,ons
  • 22. Java Standard Edi,on Java Standard Edi,on is the founda,on for developing in the Java language, as it contains the set of Java standard libraries
  • 23. Java Standard Edi,on Java Standard Edi,on is just a specifica(on, not an implementa,on
  • 24. Java Standard Edi,on Vendors and open source projects are free to provide their own implementa6on • Oracle JDK • OpenJDK
  • 25. Java Enterprise Edi.on Java Enterprise Edi.on (JEE) provides APIs and the run6me environment for developing enterprise applica.ons
  • 26. Java Enterprise Edi.on Typical features of an enterprise applica1on • Large-scale • Distributed • Highly-available
  • 27. Java Enterprise Edi.on Java Enterprise Edi.on is a superset of Java Standard Edi.on
  • 28. Java Enterprise Edi.on Therefore, JSE APIs can be used in any JEE applica:on
  • 29. Java Enterprise Edi.on JEE extends the JSE pla/orm with addi$onal APIs: • Java Servlet API (javax.servlet) • JavaServer Pages API (javax.servlet) • Java Persistence API (java.persistence) • Enterprise JavaBeans API (javax.ejb)
  • 30. JEE specifica+on Java Enterprise Edi.on is just a specifica(on, not an implementa.on
  • 31. JEE specifica+on Namely, JEE is an umbrella specifica.on that references a number of other more detailed specifica9on ┌──────────────────────────────────────────────┐ │ ┌──────────────┐ │ │ │ EJB │ │ │ ┌─────────────┐ │Specification │ │ │ │ Servlet │ └──────────────┘ │ │ │Specification│ │ │ └─────────────┘ ┌─────────────┐ │ │ │ JPA │ │ │ ┌─────────────┐ │Specification│ │ │ │ JSP │ └─────────────┘ │ │ │Specification│ │ │ └─────────────┘ │ └──────────────────────────────────────────────┘ JEE specification
  • 32. JEE implementa,ons Vendors and open source projects are free to implement one or more JEE APIs ┌──────────────────────────────────────────────┐ │ ┌──────────────┐ │ │ │ EJB │ │ │ ┌─────────────┐ │Specification │ │ │ │ Servlet │ └──────────────┘ │ │ │Specification│ │ │ └─────────────┘ ┌─────────────┐ │ │ │ JPA │ │ │ ┌─────────────┐ │Specification│ │ │ │ JSP │ └─────────────┘ │ │ │Specification│ │ │ └─────────────┘ │ └──────────────────────────────────────────────┘ JEE specification
  • 33. JEE implementa,ons "Apache Tomcat 8.0 implements the Servlet 3.1 and JavaServer Pages 2.3 specifica?ons" (Apache Tomcat 8.0 documenta3on)
  • 34. JEE implementa,ons "In addi(on to its own "na(ve" API, Hibernate is also an implementa(on of the Java Persistence API (JPA) specifica(on" (Hibernate ORM)
  • 36. JEE Components Java EE applica*ons are made up of components
  • 37. JEE Components A JEE component is a self-contained so/ware unit
  • 38. JEE Components You may already know a par0cular JEE component: servlets public class MyServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response); public void doPost(HttpServletRequest request, HttpServletResponse response); public void init(); public void destroy(); }
  • 39. JEE Components There exist different types of JEE components • Web components • Business components • Applica3on client components
  • 40. JEE Components Web components: • Servlets • JavaServer Pages (JSP) and JavaServer Faces (JSF)
  • 42. JEE Components Applica'on client components: • Applets • Applica+on Clients
  • 43. JEE Containers JEE components live within a container. A container is the JEE run6me environment
  • 44. JEE Containers A container provides certain services to the components it hosts, such as: • Life-cycle management • Dependency injec4on • Concurrency
  • 45. JEE Containers Different kinds of components live in different kinds of containers
  • 46. JEE servers A Java EE server (also called applica&on server) implements the en6re set of JEE APIs and provides the standard JEE containers
  • 47. JEE servers The reference JEE server is Oracle Glassfish. Possible alterna8ve implementa8ons: • IBM WebSphere • Apache TomEE • Red Hat JBoss
  • 48. JEE servers JEE server ┌────────────────────────────────────────────────────┐ │ Web container EJB container │ │ ┌──────────────────────┐ ┌─────────────────────┐ │ │ │ ┌─────────────┐ │ │ ┌─────────────┐ │ │ │ │ │ Servlet A │ │ │ │ EJB D │ │ │ │ │ └─────────────┘ │ │ └─────────────┘ │ │ ┌──────┐ ┌─────────┐ │ │ ┌──────────┐│ │ ┌──────────┐│ │ │ │ │ Browser ├───┼─┤ │ JSP C │├───┤ │ EJB E │├─┼───┤ DB │ └─────────┘ │ │ └──────────┘│ │ └──────────┘│ │ │ │ │ │┌─────────────┐ │ │┌─────────────┐ │ │ └──────┘ │ ││ Servlet B │ │ ││ EJB F │ │ │ │ │└─────────────┘ │ │└─────────────┘ │ │ │ └──────────────────────┘ └─────────────────────┘ │ └────────────────────────────────────────────────────┘
  • 49. Business logic At the heart of any applica0on lies its business logic
  • 50. "We call business logic any program code that pertains to the purpose of a so6ware applica8on"
  • 51. Business logic In a chess game, the business logic handles: • The board and pieces • Their movements • The rules of the game
  • 52. Business logic Such concerns are independent of, e.g., how pieces will be displayed
  • 53. Business logic Such concerns are independent of, e.g., how pieces will be displayed
  • 54. The role of EJBs In a JEE applica+on, EJBs encapsulate the business logic @Stateless public class FlightServiceBean { List<SpecialDeal> getSpecialDeals() { ... } List<Flight> findFlights(String queryString) { ... } }
  • 55. The role of EJBs Moreover, the EJB container provides fundamental services such as security and transac+ons @Stateless @TransactionManagement(TransactionManagementType.CONTAINER) public class FlightServiceBean { List<SpecialDeal> getSpecialDeals() { ... } List<Flight> findFlights(String queryString) { ... } }
  • 56. The role of EJBs Thanks to this, developers are free to focus of defining and implemen6ng the business logic
  • 57. JEE stack However, many vendors and open source projects implement only a subset of the JEE specifica;on
  • 58. JEE stack For instance, Apache Tomcat provides only a Web container
  • 59. Web container Web server ┌──────────────────────────┐ │ │ │ Web container │ │ ┌──────────────────────┐ │ │ │ ┌─────────────┐ │ │ │ │ │ Servlet A │ │ │ │ │ └─────────────┘ │ │ ┌──────┐ ┌─────────┐ │ │ ┌──────────┐│ │ │ │ │ Browser ├───┼─┤ │ JSP C │├─┼───┤ DB │ └─────────┘ │ │ └──────────┘│ │ │ │ │ │┌─────────────┐ │ │ └──────┘ │ ││ Servlet B │ │ │ │ │└─────────────┘ │ │ │ └──────────────────────┘ │ │ │ └──────────────────────────┘
  • 60. Can we built enterprise applica0ons without the whole JEE stack?
  • 61. Can we write enterprise applica.on without the need of an applica.on server?
  • 62. The Spring Framework The solu)on comes in the form of the Spring framework
  • 63. The Spring Framework …but this is something we will inves1gate in the next lecture ;-)
  • 65. References • Antonio Goncalves, Beginning Java EE 7, Apress Publica:ons • Chris Richardson, POJOs in Ac:on, Manning Publica:ons • D, Panda, R. Rahman, D. Lane, EJB3 In Ac:on, Manning Publica:ons • Oracle, GeGng Started
  • 66. References • Bill Venners, The lean, mean, virtual machine • Oracle, Java EE 7 Tutorial • Wikipedia, Java EE