SlideShare a Scribd company logo
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

PPT
Java Servlets
PPT
Java J2EE
PPS
Jdbc architecture and driver types ppt
PPT
Web controls
PPTX
Introduction to ASP.NET
PPTX
Java Server Pages(jsp)
PPTX
Servlets
PPTX
Ef code first
Java Servlets
Java J2EE
Jdbc architecture and driver types ppt
Web controls
Introduction to ASP.NET
Java Server Pages(jsp)
Servlets
Ef code first

What's hot (20)

PPTX
Advance Java Topics (J2EE)
PPTX
Enterprise java unit-2_chapter-2
PPT
Asp.net.
PDF
Enterprise java unit-3_chapter-1-jsp
PDF
Introduction to Web Services
PPT
JDBC – Java Database Connectivity
PPTX
Introduction to spring boot
PPTX
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
PPSX
JDBC: java DataBase connectivity
PPTX
Introduction to EJB
PDF
Asp.net state management
PPT
PPTX
ASP.NET MVC.
 
PPT
Java EE Introduction
PPTX
Java awt (abstract window toolkit)
PPTX
Client side scripting and server side scripting
PPT
Spring ppt
PPT
ASP.NET MVC Presentation
Advance Java Topics (J2EE)
Enterprise java unit-2_chapter-2
Asp.net.
Enterprise java unit-3_chapter-1-jsp
Introduction to Web Services
JDBC – Java Database Connectivity
Introduction to spring boot
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
JDBC: java DataBase connectivity
Introduction to EJB
Asp.net state management
ASP.NET MVC.
 
Java EE Introduction
Java awt (abstract window toolkit)
Client side scripting and server side scripting
Spring ppt
ASP.NET MVC Presentation
Ad

Similar to J2EE Introduction (20)

PDF
PPT
Introduction to java ee
PPT
Java for Recruiters
PPTX
J2EE PPT --CINTHIYA.M Krishnammal college for women
PPS
Web Component Development with Servlet and JSP Technologies Unit 01
PPT
The Nuxeo Way: leveraging open source to build a world-class ECM platform
PPT
J2ee connector architecture
PDF
Presenter manual J2EE (specially for summer interns)
PPT
J2 EEE SIDES
PPT
Summer training java
PDF
What's new in Nuxeo 5.2? - Solutions Linux 2009
PPT
Spring Framework
PPSX
Intorduction to struts
PPT
soa1.ppt
PDF
Summer training java
DOCX
Nitesh_Sr._Java_developer_Lead
PPTX
Introduction Java Web Framework and Web Server.
DOCX
DOCX
Project report for final year project
PPT
J2EE Batch Processing
Introduction to java ee
Java for Recruiters
J2EE PPT --CINTHIYA.M Krishnammal college for women
Web Component Development with Servlet and JSP Technologies Unit 01
The Nuxeo Way: leveraging open source to build a world-class ECM platform
J2ee connector architecture
Presenter manual J2EE (specially for summer interns)
J2 EEE SIDES
Summer training java
What's new in Nuxeo 5.2? - Solutions Linux 2009
Spring Framework
Intorduction to struts
soa1.ppt
Summer training java
Nitesh_Sr._Java_developer_Lead
Introduction Java Web Framework and Web Server.
Project report for final year project
J2EE Batch Processing
Ad

More from Patroklos Papapetrou (Pat) (9)

PDF
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
PDF
The Art of Software Gardening
PDF
Boost your development speed - ITAKE Unconference
PDF
ITAKE Unconference - Holding down your technical debt with Sonarqube
ODP
Thessaloniki rb-24
PDF
Tracking and improving software quality with SonarQube
PPT
Continous integration with jenkins
PPTX
PPS
Thessaloniki through history with images
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
The Art of Software Gardening
Boost your development speed - ITAKE Unconference
ITAKE Unconference - Holding down your technical debt with Sonarqube
Thessaloniki rb-24
Tracking and improving software quality with SonarQube
Continous integration with jenkins
Thessaloniki through history with images

Recently uploaded (20)

PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Mushroom cultivation and it's methods.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
August Patch Tuesday
Accuracy of neural networks in brain wave diagnosis of schizophrenia
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Reach Out and Touch Someone: Haptics and Empathic Computing
TLE Review Electricity (Electricity).pptx
Heart disease approach using modified random forest and particle swarm optimi...
Mushroom cultivation and it's methods.pdf
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
1. Introduction to Computer Programming.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation_ Review paper, used for researhc scholars
Building Integrated photovoltaic BIPV_UPV.pdf
OMC Textile Division Presentation 2021.pptx
August Patch Tuesday

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 [email protected] 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