500 likes | 649 Views
Module 1. Enterprise Java Technologies. Enterprise Java Technologies. Topics to be Covered: Environment & Architecture Java EE Platform Specification Java EE Technologies. Enterprise Java Technologies. Environment & Architecture. Java Environments.
E N D
Module 1 Enterprise Java Technologies
Enterprise Java Technologies Topics to be Covered: • Environment & Architecture • Java EE Platform Specification • Java EE Technologies
Enterprise Java Technologies Environment & Architecture
Java Environments • Four Major Types of Java Environments • Work Station/Desktop/Server • Personal Java -> CDC (Connected Device Configuration) • Java SE for Embedded • Java Card
Platform Editions • Three platform editions • Standard Edition (Java SE) • Enterprise Edition (Java EE) • Micro Edition (Java ME)
Evolution of Java Java 2 SDK, v.1.2, 1.3, … Oak Java 1.02 Java 1.1 Embedded Java Personal Java Java SE Java EE Java ME CDC CLDC MIDP
Java Technologies and Resources • “The source for Java technology” • http://java.sun.com • Technology Overviews • Java SE • http://www.oracle.com/technetwork/java/javase/overview/index.html • Java EE • http://www.oracle.com/technetwork/java/javaee/overview/index.html • Java ME • http://www.oracle.com/technetwork/java/javame/overview/index.html
Object-Oriented Language SmallTalk Pascal C++ Single inheritance Semi-compilation Lessons Learned Easy-to-Compile Java
The Java Package Package java.awt.* Class Class Methods Properties
The Java Package • Packages map to the directory structure of host system. • Java classes are found using a fully referenced class name • java.lang.Object • com.xyz.net.Socket
The Java Package Root Directory com xyz net Socket Socket
Definition of Java • From The Java Language: A White Paper • Java: A simple, object-oriented , distributed, interpreted, robust, secure, architecture neutral, portable, high performance, multithreaded, network-ready and dynamic language
Definition of Java • From The Java Language: A White Paper • Java credo: “Write Once – Run Anywhere” • Java goals: Platform independent, extensible, easy-to-program language that takes advantage of the inherent distributed infrastructure of the Internet.
Portable and Platform Independent • ‘Write Once, Run Anywhere” depends on: • A processor or code engine • A uniform run-time environment
Portable and Platform Independent • The Java Virtual Machine • Guarantees programs run the same on all platforms • Standardizes data type size • Has stack-based architecture • Is an emulator
Portable and Platform Independent • The Java Runtime Environment • Shields platform specific issues • Establishes security mechanism • Loads required classes • Compatibility requirements
Portable and Platform Independent Java Runtime Environment Java Support Classes JVM Executable Native OS
Platform Independent • Bytecode Java source Bytecode JRE JVM compiler Development Deployment
Three-Tier Architecture • Data management • handles data storage • Business logic • implements business rules • User presentation • format and Display
Three-Tier architecture User Interface Telephony Motif Windows Business Rules Business Rules Business Rules Logic Data Service Data Service Data Service Data Management The Enterprise
Three-Tier Architecture • Advantages • business rules treated as assets • thin client • business logic can be shared • reusable parts • solution for Web-based applications
Web Platform Solution • Web application adheres to three-tiered model • user presentation • web browser and web server • business logic • application server • data management • enterprise information system
Application Server Browser Presentation& Business Logic Web Server Internet JDBC EJBs, RMI Objects Servlet/JSP Java Application Server
Enterprise Java Technologies Java EE Platform Specification
Java EE Platform Specification • Provides all Java SE APIs • Requires additional optional packages or standard extensions • Four containers supported • application client containers • applet containers • web containers • enterprise bean containers
Application Components Web Container Applet Container EJB Container HTTP SSL JSP Servlet Applet EJB JMS JAXP JAAS JTA Java Mail JCA JDBC Java SE JMS JAXP JAAS JTA Java Mail JCA JDBC Java SE Application Client Container Java SE Application Client Database JDBC JAXP JAAS JMS Java SE
Application Components • Component Types • Application Client • Applets • Web Components • Servlets • JSP • Enterprise JavaBeans
Server Support for Application Components • Server Support • Complete Dependence • Deployment, Management, & Execution • Web Components • EJBs • Partial Dependence • Deployment and Management on Server • Loaded to and Executed on Client • Applets • Dependence not clearly defined • Application Components
Containers • Runtime Support • Gateway to Java EE APIs • Mediates communication between different application components • Transparently provides configuration management through deployment descriptor settings • Must provide a Java Compatible Runtime Environment
Java EE Objectives • Integrated support for web components and enterprise beans • Common naming context (JNDI ENC) • Declare resources using XML deployment descriptor • JAR packaging technology • .war (Web Archive) • .ear (Enterprise Archive) • Access to a common transaction object
Java EE Software Standards • Java Database Connectivity (JDBC) • database connectivity • Java Remote Method Invocation (RMI) • remote object communications • RMI-IIOP • RMI-JRMP • Java Naming and Directory Interface (JNDI) • naming locator for remote objects • Java Transaction API (JTA) • transaction support
Java EE Software Standards • Java Message Service (JMS) • message-oriented middleware services • HTTP and HTTPS • Servlets • server-side request-reply component • JavaServer Pages (JSP) • Java embedded in a Web page • Java API for XML Parsing (JAXP) • Java Connector Architecture (JCA)
Java EE Software Standards • Enterprise JavaBeans Architecture (EJB) • Session • stateless • stateful • Entity • Java Persistence API • container-managed • Message-driven • invoked by a JMS message
Enterprise Java Technologies Java EE Technologies
Java Servlets – Static Content REQUEST REPLY
Java Servlets – Dynamic Content REQUEST REPLY “On the Fly”
Java Servlets • Enhances server capability • Perform calculation • Access DBs • Component which implements javax.servlet.Servlet interface • Managed and invoked by Java EE Servlet container • Containers provide session management • Incorporate JavaBean components
JavaServer Pages (JSPs) • Dynamically generate web content • HTML-based text documents with sections of Java code (scriptlets) embedded • Servlet generated from JSP on first access • Web designers create and manipulate HTML, XML, etc. parts of the page • Java developers create and manipulate Java code
JavaServer Pages (JSPs) JSP JSP REQUEST COMPILE TO SERVLET 1st REQUEST 10011… ALL SUBSEQUENT REQUESTS SERVLET <HTML> … </HTML> GENERATE HTML HTML
JavaServer Faces (JSF) • Provides a component-based API to build a robust, rich server-side user interface for web applications • HTML: Good set of user interface components • Applets: Better set, but must be downloaded and executed on client • Developer time spent retrieving and validating request parameters, and passing parameters to business logic
JavaServer Faces (JSF) • JSF components handle all the complexity of managing the user interface • Developer can focus on business logic • JSF components do not directly generate specific presentation code • Custom renderers create client presentation code • JSF components connect to application data sources • JSF connects client-generated events to event handlers on the server
Java Database Connectivity (JDBC) • Connect web applications with back-end data sources • Common API works with various DBs through a system-specific driver
Enterprise JavaBeans • Entity Beans • Model Business Concepts • customer • piece of equipment • an item in inventory • Session Beans • Models Business Processes • stock market purchase • hotel reservation
Enterprise JavaBeans • Message-driven Beans • Models Business Processes • Similar in purpose to session beans • coordinates tasks • receives messages asynchronously
Web Services • Endpoints the provide web applications with server-side business rules • From World Wide Web Consortium (W3C): A Web service is a software system design to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP message, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.
Web Services • JAXR API (Java API for XML Registries) • Accesses WSDL definitions published by XML Registries • JAX-RPC API (Java API for XML-based Remote Procedure Calls) • Allows client application to invoke a Web Service • Java EE architecture supports a component model for easily deploying web services (JAX-WS)
Transaction Support and Security • Transactions • Set of activities that will collectively succeed or fail • EJB container provides built-in support for managing transactions • Security • Authentication • Authorization • User roles
Enterprise Java Technologies Topics Covered: • Environment & Architecture • Java EE Platform Specification • Java EE Technologies