2014 pre-msc-is-1 java enterprise edition and information systems layering
TRANSCRIPT
Andreas Martin - Page 1
Master of Science in Business Information Systems FHNW Pre-Master Information Systems
1. Java Enterprise Edition and Information Systems Layering
Andreas Martin
1. Java Enterprise Edition and Information Systems Layering
http://www.flickr.com/photos/jcolivera/2950430514
Andreas Martin - Page 2
What is Java EE?
«Java EE 7 is an umbrella specification»
http://www.flickr.com/photos/tworm/3362762909/
Source: The Java EE 7 Tutorial, Oracle Corporation, 2013: http://docs.oracle.com/javaee/7/tutorial/doc/javaeetutorial7.pdf 1. Java Enterprise Edition and Information Systems Layering
Andreas Martin - Page 3
Prejudice against Java EE
1. Java Enterprise Edition and Information Systems Layering
Andreas Martin - Page 7
…to much coffee… Enterprise JavaBeans
http://www.flickr.com/photos/jcolivera/2950430514
Andreas Martin - Page 9
Fundamental Principle: Layering
http://www.flickr.com/photos/rvoegtli/5688343678/
What is the difference between “Layer” and “Tier”?
«Layers are a way of organizing your code.»
«Tiers are about where your code runs.»
http://www.flickr.com/photos/rvoegtli/5688343678/
The Latte Macchiato «Layering» Principle
http://www.flickr.com/photos/tf28/4367660424
Presentation Layer
Goal: Display of information, processing / forwarding of user interactions. Technologies: JavaServer Faces (JSF), JavaServer Pages (JSP), Servlets, etc.
Business (Logic) Layer
Goal: Reproduction of actions or «verbs» of the application (buy a book, print an order, deliver a book, etc.). Technologies: Enterprise Java Beans (EJBs)
Persistence Layer
Goal: Reproduction of database attributes, information or «nouns» in object / class attributes (Object-Relational Mapping, ORM). Technologies: Java Persistence API (JPA)
Andreas Martin - Page 12
Java EE Layering
1. Java Enterprise Edition and Information Systems Layering
Andreas Martin - Page 13
Java EE and (Technical) Tiers
1. Java Enterprise Edition and Information Systems Layering
Source: The Java EE 7 Tutorial, Oracle Corporation, 2013: http://docs.oracle.com/javaee/7/tutorial/doc/javaeetutorial7.pdf
Andreas Martin - Page 14
Java EE 7 – Typical Layering
1. Java Enterprise Edition and Information Systems Layering
Andreas Martin - Page 15
Business Layer
Java EE 7 – Typical Layering including Process Layer
1. Java Enterprise Edition and Information Systems Layering
Databases
Persistence Layer
@EntityManager (JPA)
(JPA) @Entity (JPA)
Session Bean (EJB)
@PersistenceContext
Serv
ice
Laye
r
Pre
sen
tati
on
La
yer
Users Service Consumer
Process Layer
User Interface Component
Service Interface
Business Process
@EJB / @Inject
Andreas Martin - Page 16
Business Layer
Java EE 7 – Typical Layering
1. Java Enterprise Edition and Information Systems Layering
Persistence Layer
@EntityManager (JPA)
(JPA) @Entity (JPA)
Session Bean (EJB)
@PersistenceContext
Presentation Layer
Facelets (JSF) @ManagedBean (JSF)
Facelets (JSF)
Users
Databases
@EJB / @Inject
Andreas Martin - Page 17
Package Structure Recommendation …
1. Java Enterprise Edition and Information Systems Layering
Andreas Martin - Page 18
Package Structure
Recommendation - (ch.xx.project…):
.domain (Persistence Layer): Entity classes
.dao (Business Layer in Java EE and Persistence / Data Access Layer in Spring): DAO- classes (Java EE 7: Abstract Facade / Spring: Abstract Facade and Specific DAO)
.business (Business Layer): Enterprise Java Beans
.service (Service Layer): Service Facade, SOAP und REST Web- Services
.controller (Presentation Layer): Controller classes
.view (Presentation Layer): Views
.dto (Layer independent) : Transfer objects
.util (Layer independent) : Utility classes
6. Java EE 6 Architecture