SlideShare a Scribd company logo
1 of 22
Building web
            applications with
            J2EE
            Papapetrou P. Patroklos

            Software Engineer / Team Leader at
            OTS SA ( www.ots.gr ) since 1997
            Part-time lecturer at City College (MSc)
            Opensource projects contributor

            ppapapetrou76@gmail.com
            http://twitter.com/ppapapetrou76

Computer Science Department
Overview



    J2EE Introduction

    J2EE Technologies

    J2EE Servers

    A working example

    Q&A Session


           Computer Science Department
J2EE Introduction


    What does J2EE stand for?

    What is its purpose?

 Why should I learn to develop Web
Applications using J2EE technologies?

    Pros / Cons

    Differences with other possible solutions

    Required skills

             Computer Science Department
A glance at J2EE
      architecture




Computer Science Department
A glance at J2EE
               architecture

  End-to-End Architecture

  N-tier Layers

  Components: handle
   – Business Logic
   – Presentation
   – Persistence

  Containers
   – Vendor-specfic Implementations
   – Strictly follow same rules
         Computer Science Department
A glance at J2EE
                  architecture

 Containers -> work invisible. Provide
services for :
    – Security
    – Transaction
    – Persistence
    – Concurrency
    – Availability
    – Life-cycle Management

            Computer Science Department
J2EE Development
                  Lifecycle

    Develop components for
     – Persistence (Entities)
     – Business Logic (EJBs)
     – Presentation (JSF, XHTML)

    Configure/Prepare deployment descriptors

 Build Compoments in packages (JARs, WARs,
EARs)

    Deploy packages on Container (J2EE Server)

            Computer Science Department
J2EE Development
                   life-cycle - Tools

 All target to facilitate building
documentation and management of (Java)
projects

    Plethora of choices
     – Maven : stands for Accumulator of
       Knowledge
     – Ant
     – Ivy
     – Gradle
             Computer Science Department
J2EE Technologies


    Java Persistence API (JPA)

    Enterprise Java Beans (EJB)

    eXtended Markup Language (XML)

    Java Server Faces (JSF)

    Java API for XML RPC (JAX-RPC)

 eXtensible HyperText Markup Language
(XHTML)

    Service Oriented Architecture (SOA)

            Computer Science Department
Other Related
                   Technologies

    Cascading Style Sheets (CSS)

    JavaScript & Jquery

    Ajax

    Dependency Injection Frameworks
     – Google Guice
     – Spring Source
     – Jboss Weld

    ... coming more...
             Computer Science Department
EJB Overview


    What is EJB?
    
        A platform for building portable, reusable,
        and scalable business applications using
        Java
    
        a piece of Java code that executes in a
        specialized runtime environment called the
        EJB container
    
        EJB is both a component and a framework


               Computer Science Department
EJB Overview (cont'd)


    EJB as a component
    
      Persistence
      
        Entity Beans
    
      Business Logic
      
        Session Beans
      
        Message-Driven Beans




            Computer Science Department
EJB Overview (cont'd)
EJB as a framework
 
   Out-of-the-box services
 
   Available to all components during
   execution via EJB Container
 
   Annotations : The magic wand
   
     Specify services, types and behavior
 
   Service Oriented Architecture
   
     Fast and easy Web Service Creation




         Computer Science Department
JSF Overview

What is Java Server Faces
 
     A component architecture
 
     A standard – extendable set of UI Widgets
 
     An application infastructure
Basic Characteristics
 
     Event oriented components
 
     Powerful architectures for different Uis
     (desktop browsers, mobile devices etc.)
 
     Flexible Navigation System
            Computer Science Department
JSF Overview (cont'd)

Basic Characteristics
 
     Syncronization with Java Objects through
     backing beans
 
     Internationaliztion
 
     Validators & Converters
 
     Several popular implementations
        • RichFaces
        • IceFaces
        • PrimeFaces
            Computer Science Department
XHTML Overview

Why XHTML instead of HTML?
 
     A more clean and standard way to write
     HTML
 
     Take advantages of all XML goodies
 
     Allows a larger percentage of browsers or
     code parsers to properly parse pages
 
     Use of Templates to facilitate page
     reusability and “inheritance”


            Computer Science Department
XHTML Overview

Differences with HTML
 
     XHTML elements must be properly nested
 
     XHTML elements must always be closed
 
     XHTML elements must be in lowercase
 
     XHTML documents must have one root
     element
 
     Documents can be validated much easier



           Computer Science Department
XHTML Overview

Differences with HTML
 
     Documents can be transformed via tools
     like XSLT into other documents for
     consumption by devices like handhelds
 
     Fragments of documents can be retrieved
     faster
 
     Text can be stored more effieciently in
     object oriented databases


            Computer Science Department
J2EE Servers

Servers supporting J2EE
 
     Oracle/Sun's Glassfish (
     http://glassfish.java.net)
 
     Apache's Jeronimo (
     http://geronimo.apache.org)
 
     RedHat's Jboss (http://www.jboss.org )
 
     IBM's Webshpere
 
     Oracle's WebLogic
 
     Caucho's Resin (http://www.caucho.com)
             Computer Science Department
J2EE Servers

not for EJBs...
 
     Tomcat
 
     Jetty
not for J2EE...
 
     IIS
 
     Apache HTTP
Can you figure out why??



             Computer Science Department
A working example

MyBlog Application
 
     MySQL as database layer
 
     Entities for persistence layer
 
     Session Beans for business logic layer
 
     XHTML pages for presentation layer
        • JSF2 Framework
        • Extended by PrimeFaces



            Computer Science Department
Q&A Session



        Thank you


Time for answers!!



Computer Science Department

More Related Content

What's hot

What's hot (20)

Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
J2ee
J2eeJ2ee
J2ee
 
J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architecture
 
Core java
Core java Core java
Core java
 
core java
core javacore java
core java
 
Java J2EE
Java J2EEJava J2EE
Java J2EE
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Java rmi
Java rmiJava rmi
Java rmi
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Session bean
Session beanSession bean
Session bean
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Network programming in java - PPT
Network programming in java - PPTNetwork programming in java - PPT
Network programming in java - PPT
 
Basic Java Programming
Basic Java ProgrammingBasic Java Programming
Basic Java Programming
 
Java Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and StreamsJava Course 8: I/O, Files and Streams
Java Course 8: I/O, Files and Streams
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Introduction to Java
Introduction to Java Introduction to Java
Introduction to Java
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 

Similar to J2EE Introduction

Introduction to java ee
Introduction to java eeIntroduction to java ee
Introduction to java eeRanjan Kumar
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruitersph7 -
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenlissa cidhi
 
Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01Prashanth Shivakumar
 
The Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformThe Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformNuxeo
 
J2ee connector architecture
J2ee connector architectureJ2ee connector architecture
J2ee connector architectureSubhasis Nayak
 
Presenter manual J2EE (specially for summer interns)
Presenter manual  J2EE (specially for summer interns)Presenter manual  J2EE (specially for summer interns)
Presenter manual J2EE (specially for summer interns)XPERT INFOTECH
 
J2 EEE SIDES
J2 EEE  SIDESJ2 EEE  SIDES
J2 EEE SIDESbputhal
 
Summer training java
Summer training javaSummer training java
Summer training javaArshit Rai
 
What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009Stefane Fermigier
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to strutsAnup72
 
Summer training java
Summer training javaSummer training java
Summer training javaArshit Rai
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh Dasari
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.suranisaunak
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year projectsuneel singh
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch ProcessingChris Adkin
 

Similar to J2EE Introduction (20)

J2EE day 1
J2EE day 1J2EE day 1
J2EE day 1
 
Introduction to java ee
Introduction to java eeIntroduction to java ee
Introduction to java ee
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for women
 
Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01Web Component Development with Servlet and JSP Technologies Unit 01
Web Component Development with Servlet and JSP Technologies Unit 01
 
The Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platformThe Nuxeo Way: leveraging open source to build a world-class ECM platform
The Nuxeo Way: leveraging open source to build a world-class ECM platform
 
J2ee connector architecture
J2ee connector architectureJ2ee connector architecture
J2ee connector architecture
 
Presenter manual J2EE (specially for summer interns)
Presenter manual  J2EE (specially for summer interns)Presenter manual  J2EE (specially for summer interns)
Presenter manual J2EE (specially for summer interns)
 
J2 EEE SIDES
J2 EEE  SIDESJ2 EEE  SIDES
J2 EEE SIDES
 
Summer training java
Summer training javaSummer training java
Summer training java
 
What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009What's new in Nuxeo 5.2? - Solutions Linux 2009
What's new in Nuxeo 5.2? - Solutions Linux 2009
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
soa1.ppt
soa1.pptsoa1.ppt
soa1.ppt
 
Summer training java
Summer training javaSummer training java
Summer training java
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.
 
Jboss
JbossJboss
Jboss
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year project
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
 

More from Patroklos Papapetrou (Pat)

More from Patroklos Papapetrou (Pat) (9)

Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
 
The Art of Software Gardening
The Art of Software GardeningThe Art of Software Gardening
The Art of Software Gardening
 
Boost your development speed - ITAKE Unconference
Boost your development speed - ITAKE UnconferenceBoost your development speed - ITAKE Unconference
Boost your development speed - ITAKE Unconference
 
ITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubeITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with Sonarqube
 
Thessaloniki rb-24
Thessaloniki rb-24Thessaloniki rb-24
Thessaloniki rb-24
 
Tracking and improving software quality with SonarQube
Tracking and improving software quality with SonarQubeTracking and improving software quality with SonarQube
Tracking and improving software quality with SonarQube
 
Continous integration with jenkins
Continous integration with jenkinsContinous integration with jenkins
Continous integration with jenkins
 
Sonar platform
Sonar platformSonar platform
Sonar platform
 
Thessaloniki through history with images
Thessaloniki through history with imagesThessaloniki through history with images
Thessaloniki through history with images
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

J2EE Introduction

  • 1. Building web applications with J2EE Papapetrou P. Patroklos Software Engineer / Team Leader at OTS SA ( www.ots.gr ) since 1997 Part-time lecturer at City College (MSc) Opensource projects contributor ppapapetrou76@gmail.com http://twitter.com/ppapapetrou76 Computer Science Department
  • 2. Overview  J2EE Introduction  J2EE Technologies  J2EE Servers  A working example  Q&A Session Computer Science Department
  • 3. J2EE Introduction  What does J2EE stand for?  What is its purpose?  Why should I learn to develop Web Applications using J2EE technologies?  Pros / Cons  Differences with other possible solutions  Required skills Computer Science Department
  • 4. A glance at J2EE architecture Computer Science Department
  • 5. A glance at J2EE architecture  End-to-End Architecture  N-tier Layers  Components: handle – Business Logic – Presentation – Persistence  Containers – Vendor-specfic Implementations – Strictly follow same rules Computer Science Department
  • 6. A glance at J2EE architecture  Containers -> work invisible. Provide services for : – Security – Transaction – Persistence – Concurrency – Availability – Life-cycle Management Computer Science Department
  • 7. J2EE Development Lifecycle  Develop components for – Persistence (Entities) – Business Logic (EJBs) – Presentation (JSF, XHTML)  Configure/Prepare deployment descriptors  Build Compoments in packages (JARs, WARs, EARs)  Deploy packages on Container (J2EE Server) Computer Science Department
  • 8. J2EE Development life-cycle - Tools  All target to facilitate building documentation and management of (Java) projects  Plethora of choices – Maven : stands for Accumulator of Knowledge – Ant – Ivy – Gradle Computer Science Department
  • 9. J2EE Technologies  Java Persistence API (JPA)  Enterprise Java Beans (EJB)  eXtended Markup Language (XML)  Java Server Faces (JSF)  Java API for XML RPC (JAX-RPC)  eXtensible HyperText Markup Language (XHTML)  Service Oriented Architecture (SOA) Computer Science Department
  • 10. Other Related Technologies  Cascading Style Sheets (CSS)  JavaScript & Jquery  Ajax  Dependency Injection Frameworks – Google Guice – Spring Source – Jboss Weld  ... coming more... Computer Science Department
  • 11. EJB Overview  What is EJB?  A platform for building portable, reusable, and scalable business applications using Java  a piece of Java code that executes in a specialized runtime environment called the EJB container  EJB is both a component and a framework Computer Science Department
  • 12. EJB Overview (cont'd)  EJB as a component  Persistence  Entity Beans  Business Logic  Session Beans  Message-Driven Beans Computer Science Department
  • 13. EJB Overview (cont'd) EJB as a framework  Out-of-the-box services  Available to all components during execution via EJB Container  Annotations : The magic wand  Specify services, types and behavior  Service Oriented Architecture  Fast and easy Web Service Creation Computer Science Department
  • 14. JSF Overview What is Java Server Faces  A component architecture  A standard – extendable set of UI Widgets  An application infastructure Basic Characteristics  Event oriented components  Powerful architectures for different Uis (desktop browsers, mobile devices etc.)  Flexible Navigation System Computer Science Department
  • 15. JSF Overview (cont'd) Basic Characteristics  Syncronization with Java Objects through backing beans  Internationaliztion  Validators & Converters  Several popular implementations • RichFaces • IceFaces • PrimeFaces Computer Science Department
  • 16. XHTML Overview Why XHTML instead of HTML?  A more clean and standard way to write HTML  Take advantages of all XML goodies  Allows a larger percentage of browsers or code parsers to properly parse pages  Use of Templates to facilitate page reusability and “inheritance” Computer Science Department
  • 17. XHTML Overview Differences with HTML  XHTML elements must be properly nested  XHTML elements must always be closed  XHTML elements must be in lowercase  XHTML documents must have one root element  Documents can be validated much easier Computer Science Department
  • 18. XHTML Overview Differences with HTML  Documents can be transformed via tools like XSLT into other documents for consumption by devices like handhelds  Fragments of documents can be retrieved faster  Text can be stored more effieciently in object oriented databases Computer Science Department
  • 19. J2EE Servers Servers supporting J2EE  Oracle/Sun's Glassfish ( http://glassfish.java.net)  Apache's Jeronimo ( http://geronimo.apache.org)  RedHat's Jboss (http://www.jboss.org )  IBM's Webshpere  Oracle's WebLogic  Caucho's Resin (http://www.caucho.com) Computer Science Department
  • 20. J2EE Servers not for EJBs...  Tomcat  Jetty not for J2EE...  IIS  Apache HTTP Can you figure out why?? Computer Science Department
  • 21. A working example MyBlog Application  MySQL as database layer  Entities for persistence layer  Session Beans for business logic layer  XHTML pages for presentation layer • JSF2 Framework • Extended by PrimeFaces Computer Science Department
  • 22. Q&A Session Thank you Time for answers!! Computer Science Department