J2 ee architecture

1,490 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,490
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
90
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

J2 ee architecture

  1. 1. Introduction to J2EE
  2. 2. Enterprise Architecture typesEnterprise Architecture can be broken into 3 fundamental layers• User Interface• Processing• Data Storage and access 2
  3. 3. Types of enterprise architecture1. Single Tier All 3 layers of enterprise architecture exist on the same system2.Two Tier Architecture - All 3 layers distributed between 2 tiers - Generally UI and business logic reside on FE and Data Access on Back end 3
  4. 4. 3. Three tier architecture - All 3 layers separated logically - Physical separation depends on the application - User Interface- client end Processing – Middle / Business Tier(Apps server) Database - Back end 4
  5. 5. 4. n.Tier Architecture - 2nd layer can be broken into multiple layers User Interface Business model Business rulesBusiness object to data source mapping Data Access 5
  6. 6. Advantages of n tier1. Improved maintainablity : Applications can be easily maintained2. Consistency: In terms of component design3. Interoperability: Supports component design in any layer and by any technology4. Flexibility : Freedom to design any type of component5. Scalability: Addition of new components… 6
  7. 7. Goals of an Enterprise Architecture• Robust• Performance & Scalability• Capitalize adv of OO Design Priniciple• Avoid complexity• Maintainable and Extensible• Ease of testing• Reuse of application• Support multiple client types• Product delivery on time 7
  8. 8. What is J2EE??• Platform used for n tier application development• Compliant with goals of enterprise architecture• Based on Java 2 Platform , standard edition 8
  9. 9. Benefits of J2EE1. Simple Architecture - Provision of a variety of ways to configure architecture of an application - supports component based design ( updation, replacement and addition of new functionality can be wired into existing app easily) ( Member with specific skill set develops components under his/her skill area leading to developmental modularization) 9
  10. 10. 2. Easy association with existing Information system - includes industry accepted APIs thereby enabling to access existing Information systems(J2SE based systems) - Wiring to existing system through a) J2EE connector architecture b) JDBC API c) JNDI d) Java Mail 10
  11. 11. 3. Freedom of server ,tool and component choice - Organisations have plethora of choices in terms of vendors, hardware, OS,server configuration.( This has created market for servers for J2EE platform) - Component support ensures standardized, packged and reused components.Vendors will be able to provide solutions which will be easily compatible to the current system. 11
  12. 12. 4. Scalabilty - component design support has improved the scalabilty factor in these application5. Security model - EJB and Servlet provide programmatic security mechanisms - user based security offered by application at deployment time 12
  13. 13. Features of JEE• Platform Independence• Managed Objects through containers• Reusability• Modularity• Easy development• Simplified EJB technology• Enhanced Web services• Support for web2.0• Ease of Application packaging• Light weight JPA(POJO based) 13
  14. 14. JEE Runtime Infrastructure 14
  15. 15. • Run time infrastructure is used for managing and hosting applications• Services to manage applications are provided by runtime infrastructure.(platform level)• Services- messaging,security and distributed transactions• JEE accesses the APIs that provide services through containers• J2SE provides core APIs for devloping a JEE application 15
  16. 16. APIs in JEE1. Enterprise Java Beans (EJB3.0) - Server side code for business logic - types – session beans & message driven beans - Session bean – conversation with client - message driven bean – session bean + message listener(asynchronous) - Entity beans have been replaced by JPA. 16
  17. 17. 2. Java Servlet Technology 2.5 - Extends the capability of servers - Commonly used to extend applications hosted by Web servers 3. Java Server Pages Technology 2.1 - Text document – HTML+WML+JSP elements - Construction of Dynamic content 17
  18. 18. 4. Java Server Pages Standard Tag Library 1.1 - JSTL - Provides standard set of JSP tags instead of mixing multiple tags by multiple vendors - iterator and Conditional tags – control flow in XML documents - Database access tags using SQL - Uses JSP container 18
  19. 19. 5. Java Server Faces 1.2 - Simplifies UI build process - server side UI building framework - Provides a set of reusable UIs from which new UIs cn be constructed.6. Java Message Servics 1.1 - JMS - Componnts to send , receive and read Messages - Lossely coupled and Asynchronous. 19
  20. 20. 7.Java Transaction API1.1 - JTA – interface for transactions - default auto commit and rollbacks 8. Java mail 1.4 - email notifications - 2 types – application level interface & Service provider level interface - Java mail + service provider= Internet email 20
  21. 21. 9. JavaBeans Activation Framework1.1 - JAF - provides service for data identification access encapsulation operation identification JavaBean creation for identification 21
  22. 22. 10. Java API for XML processing1.4(JAXP) - Supports XML document processing using DOM,Simple API for XML, and Extensible style sheet Language Transformation(XSLT).11. Java API for XML web services(JAX-WS) -provides web services12. Java Architecture for XML binding(JAXB) - convienient bind between XML schema and Java language programs 22
  23. 23. 13. SOAP with attachments API (SAAJ) - Standard way to send XML documents over internet.14. Streaming API for XML(StAX) - Alternative to DOM,Simple API for XML, TrAX .15. Java API for XML registeries(JAXR) - provides access to business and general purpose regiters over web 23
  24. 24. 16. J2EE Connector Architecture - Provides solutions for connectivity between Application servers and EIS.17. JDBC API - Supports SQL commands in Java programing language 18. Java Persistence API (JPA) - Uses ORM approach to bridge gap between Object oriented model and Relational database 24
  25. 25. 19. Java Naming and Directory Interface(JNDI) - provides naming and directory functionality - enables access to multiple naming and directory services20. Java Authentication and Authorization(JAAS) - Authenticates and Authorizes users for JEE application. 25
  26. 26. Architecture of JEE 5 Client Tier Client M/c App HTML Client Pages JSP Web Tier JEE Server EJB EJB Business Tier EIS Tier Data BaSeServer Server 26
  27. 27. Java EE Containers• JEE provides services in the form of a container for every component• Containers are interfaces between components and Low level platform specific functionality• Components should be deployed in the container before use. 27
  28. 28. Container Types1.EJB Container - provides an environment in which one or more Enterprise bean will run - Combination of classes and interfaces - Provides EJB component with lifecycle , state management , naming services, security mechanisms and persistence management. 28
  29. 29. 2. Web Container - Manages JSP and Servlet - Runtime environment for web application - Web container is always in a web server - provides context and lifecycle management3. Application client Container - Manages execution of application client components.4. Applet Conatainer - Manages the lifecycle of applets 29
  30. 30. Developing Java EE 5 ApplicationSteps to develop a JEE application are1. Develop application component2. Compose application components into modules3. Compose modules into application4. Deploy application 30
  31. 31. Developing Application component- All the functional units (components) are designed in this phase- component – a class / collection of classes and interfaces- 5 types of components EJB,servlets, JSP , applets, application client, connectors. - 31
  32. 32. Compose application components into modules - process of bundling/wiring of components -3 types of modules can be designed 1. EJB module- -packaged and deployed as ejb-jar.xml - contains class files for ejbs,deployment descriptor - may contain classes and interfaces for ejbs not included in J2EE platform 32
  33. 33. 2. Web module- - Packaged and deployed in web.xml file - Contains class for servlets,JSP,Static documents , class for applet, web deployment descriptor.3. Application client module - Packaged into jar files - Contains class for client, application client deployment descriptor 33
  34. 34. 3. Composition of modules into application- Java EE application is delivered as enterprise archive(ear) file. - JEE application packages the modules and their corresponding deployment descriptors. - application.xml is required as deployment descriptor of the entire application 34
  35. 35. JEE application (ear file) application.xml Ejb module Web module Java moduleEjb module Web module Java module (jar) (jar) (jar)Ejb-jar.xml web.xml Application client.xml ejb jsp Java ejb servlet Java 35
  36. 36. 4. Application Deployment - Involves 2 steps 1. Installation of the application – the deployer copies the ear to the application server , generates additional container specific classes and interfaces 2. Configuration of the application- resolves all external dependencies and follow the application assembly instruction 36
  37. 37. Probable Architectures• Applet Client with JSP and Database presentation – Applet Business - JSP Database - JDBC• Application Client with EJB presentation – JFC/Console application Business - EJB Database - JDBC 37
  38. 38. • JSP Client with EJB presentation – Web Browser Web tier - JSP Business - EJB Database - JDBC• Web Services for application integration presentation – C# application Web tier - Web Services Business - EJB Database - JDBC 38

×