J2EE Introduction

9,456 views

Published on

Guest Lecture given on 16/05/2011 to 3rd level students of Thessaloniki's City College CSD

Published in: Technology
0 Comments
15 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
9,456
On SlideShare
0
From Embeds
0
Number of Embeds
66
Actions
Shares
0
Downloads
0
Comments
0
Likes
15
Embeds 0
No embeds

No notes for slide

J2EE Introduction

  1. 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/ppapapetrou76Computer Science Department
  2. 2. Overview J2EE Introduction J2EE Technologies J2EE Servers A working example Q&A Session Computer Science Department
  3. 3. J2EE Introduction What does J2EE stand for? What is its purpose? Why should I learn to develop WebApplications using J2EE technologies? Pros / Cons Differences with other possible solutions Required skills Computer Science Department
  4. 4. A glance at J2EE architectureComputer Science Department
  5. 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. 6. A glance at J2EE architecture Containers -> work invisible. Provideservices for : – Security – Transaction – Persistence – Concurrency – Availability – Life-cycle Management Computer Science Department
  7. 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. 8. J2EE Development life-cycle - Tools All target to facilitate buildingdocumentation and management of (Java)projects Plethora of choices – Maven : stands for Accumulator of Knowledge – Ant – Ivy – Gradle Computer Science Department
  9. 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. 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. 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. 12. EJB Overview (contd) EJB as a component  Persistence  Entity Beans  Business Logic  Session Beans  Message-Driven Beans Computer Science Department
  13. 13. EJB Overview (contd)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. 14. JSF OverviewWhat is Java Server Faces  A component architecture  A standard – extendable set of UI Widgets  An application infastructureBasic Characteristics  Event oriented components  Powerful architectures for different Uis (desktop browsers, mobile devices etc.)  Flexible Navigation System Computer Science Department
  15. 15. JSF Overview (contd)Basic Characteristics  Syncronization with Java Objects through backing beans  Internationaliztion  Validators & Converters  Several popular implementations • RichFaces • IceFaces • PrimeFaces Computer Science Department
  16. 16. XHTML OverviewWhy 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. 17. XHTML OverviewDifferences 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. 18. XHTML OverviewDifferences 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. 19. J2EE ServersServers supporting J2EE  Oracle/Suns Glassfish ( http://glassfish.java.net)  Apaches Jeronimo ( http://geronimo.apache.org)  RedHats Jboss (http://www.jboss.org )  IBMs Webshpere  Oracles WebLogic  Cauchos Resin (http://www.caucho.com) Computer Science Department
  20. 20. J2EE Serversnot for EJBs...  Tomcat  Jettynot for J2EE...  IIS  Apache HTTPCan you figure out why?? Computer Science Department
  21. 21. A working exampleMyBlog 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. 22. Q&A Session Thank youTime for answers!!Computer Science Department

×