Advanced Java programming in J2EE Chapter 1

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

Apache Struts Technology
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
Layers & Tiers Umair Javed Lec - 41.
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Introduction to Servlet & JSP
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
UNIT-V The MVC architecture and Struts Framework.
Java Server Pages B.Ramamurthy. Topics for Discussion 8/20/20152 Inheritance and Polymorphism Develop an example for inheritance and polymorphism JSP.
JavaServer Faces: The Fundamentals Compiled from Sun TechDays workshops (JSF Basics, Web-Tier Codecamp: JavaServer Faces, Java Studio Creator; IBM RAD)
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
11. Java-Based Web: JSP, JSF. 2 Motto: Rule 1: Our client is always right Rule 2: If you think our client is wrong, see Rule 1. - Anonymous.
Distributed Multitiered Applications The J2EE platform uses a multitiered distributed application model. Application logic is divided into components 1.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Using JavaBeans and Custom Tags in JSP Lesson 3B / Slide 1 of 37 J2EE Web Components Pre-assessment Questions 1.The _____________ attribute of a JSP page.
Introduction to J2EE Architecture Portions by Kunal Mehta.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
A seminar on j2ee by saritha. s. What is J2EE J2EE (Java 2 Platform, Enterprise Edition) is a Java platform designed for the mainframe-scale computing.
Java Servlets and Java Server Pages Norman White Stern School of Business.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Basic JSP Celsina Bignoli Problems with Servlets Servlets contain –request processing, –business logic –response generation all lumped.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
Java Servlets and Java Server Pages
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
Chapter 6 Chapter 6 Server Side Programming (JSP) Part 1 1 (IS 203) WebProgramming (IS 203) Web Programming.
ClaRA web services V. Gyurjyan Clas12 Software Meeting
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
Apache Struts Technology A MVC Framework for Java Web Applications.
Business Applications– Using Java _____ Presented by Priya Saha.
Speaker Name Speaker Title Speaker Title Oracle Corporation Olivier Le Diouris Principal Product Manager Oracle Corporation Building Servlet and JSP Applications.
Introduction to Java Web Programming Gregg Sporar
Intro to J2EE Concepts Mimi Opkins Fall 2016 CECS493.
MODEL VIEW CONTROLLER PATTERN. Model View Controller MVC is a time tested method of separating the user interface of an application from its Domain Logic.
Intro to JavaServer Faces Mimi Opkins CECS 493 Fall 2016.
Java Server Pages Can web pages be created specially for each user?
J2EE Platform Overview (Application Architecture)
Introduction to Servlets
Introduction to Advanced Java Programming
Servlet Fudamentals.
Java Servlets By: Tejashri Udavant..
Course Outcomes of Advanced Java Programming AJP (17625, C603)
Introduction to J2EE Architecture
Unit 6-Chapter 2 Struts.
V. Gyurjyan Clas12 Software Meeting
Design and Maintenance of Web Applications in J2EE
MSIS 655 Advanced Business Applications Programming
Distributed System Using Java 2 Enterprise Edition (J2EE)
Introduction to Servlets
JavaServer Faces: The Fundamentals
J2EE Lecture 1:Servlet and JSP
Web Servers (IIS and Apache)
Intro to J2EE Concepts.
Java Chapter 7 (Estifanos Tilahun Mihret--Tech with Estif)
Presentation transcript:

Advanced Java programming in J2EE Chapter 1 Introducing J2EE Book Reference: Your First Cup: An Introduction to the Java TM EE Platform – By Oracle

Topics To Be Learnt J2EE Introduction J2EE Platform Technologies at a Glance Sun Java Application Server Ch.1 Topics  from Sau Uni MCA-III Syllabus.

Java Basics… Java Technology is both a Programming Language and a Platform. Programming language : is a high-level object-oriented Language that has a particular Syntax and Style. Platform : is a Particular Environment in which Java Programming Language Applications(API) run. There are Several Java Platforms(next slide). Many Developers, even long-time Java programming language developers, do not understand how the different platforms relate to each other. Java technology is both a programming language and a platform. The Java programming language is a high-level object-oriented language that has a particular syntax and style. A Java platform is a particular environment in which Java programming language applications run. There are several Java platforms. Many developers, even long-time Java programming language developers, do not understand how the different platforms relate to each other.

The Java Programming Language Platforms Java Platform, Standard Edition (Java SE) Java Platform, Enterprise Edition (Java EE) Java Platform, Micro Edition (Java ME) Java FX (Form Following Function) Pg. No. 13

Java Platform Basics… All Java platforms consist of a Java VirtualMachine(VM) and an Application Programming Interface(API). The Java VirtualMachine is a program, for a particular hardware and software platform, that runs Java technology applications. An API is a collection of software components that you can use to create other software components or applications. All Java platforms consist of a Java VirtualMachine (VM) and an application programming interface (API). The Java VirtualMachine is a program, for a particular hardware and software platform, that runs Java technology applications. An API is a collection of software components that you can use to create other software components or applications.

Java Platform Basics… Each Java platform provides a Virtual Machine and an API, and this allows applications written for that platform to run on any compatible system with all the advantages of the Java programming language: Platform-Independence Power  Stability  Security Ease-of-Development Each Java platform provides a virtual machine and an API, and this allows applications written for that platform to run on any compatible system with all the advantages of the Java programming language: platform-independence, power, stability, ease-of-development, and security.

Java SE When People think of the Java programming language, they think of the Java SE API. Java SE's API provides the core functionality of the Java programming language. From the basic types to high-level Classes. Used for Networking, Security, Database access, Graphical User Interface (GUI) Development, and XML parsing. Core API + VM + Development Tools + Deployment Tech. + Class Libs & Toolkits… When most people think of the Java programming language, they think of the Java SE API. Java SE's API provides the core functionality of the Java programming language. It defines everything from the basic types and objects of the Java programming language to high-level classes that are used for networking, security, database access, graphical user interface (GUI) development, and XML parsing. In addition to the core API, the Java SE platform consists of a virtual machine, development tools, deployment technologies, and other class libraries and toolkits commonly used in Java technology applications.

Java EE Built on top of the Java SE platform. Provides an API and runtime environment for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications. The Java EE platform is built on top of the Java SE platform. The Java EE platform provides an API and runtime environment for developing and running large-scale, multi-tiered, scalable, reliable, and secure network applications. Large-scale : a giant level application Multi-tired : an application with different tiers like business tier, data tier etc… Scalable : able to change in size, we can make it large or small as our requirements Reliable : an application which can easily run on normal conditions as well as very hard situations Secure : applications with security, that can not easily b hacked or cracked…!

Java ME Provides an API and a small-footprint virtual machine for running Java programming language applications on small devices, like mobile phones. The API is a subset of the Java SE API, along with special class libraries useful for small device application development. Java ME applications are often clients of Java EE platform services. The JavaMEplatform provides an API and a small-footprint virtual machine for running Java programming language applications on small devices, like mobile phones. The API is a subset of the Java SE API, along with special class libraries useful for small device application development. JavaMEapplications are often clients of Java EE platform services.

Java FX Platform for creating rich internet applications written in Java FX Script. Script is statically-typed declarative language that is compiled to Java technology bytecode, which can then be run on a Java VM. Applications written for the Java FX platform can include and link to Java programming language classes, and may be clients of Java EE platform services. Java FX technology is a platform for creating rich internet applications written in Java FX Script. Java FX Script is a statically-typed declarative language that is compiled to Java technology bytecode, which can then be run on a Java VM. Applications written for the Java FX platform can include and link to Java programming language classes, and may be clients of Java EE platform services.

J2EE Introduction It is designed to help developers to create: Large-Scale, Multi-Tiered, Scalable, Reliable & Secure Network Applications. Pg. No. 14

J2EE Introduction cont. These Network Applications are designed to solve the problems encountered by large enterprises that is why they are called… Enterprise Applications… Pg. No. 14

J2EE Introduction cont. Not only useful for Large Corporations Agencies, and Governments but Helpful, Even Essential, for Individual Developers and Small Organizations in an Increasingly Networked World. Pg. No. 14

J2EE Introduction cont. Security and Reliability make System Powerful but often they make applications complex. The Java EE reduces the complexity of enterprise application development by: Development Model API and Runtime environment Pg. No. 15

Tiered Applications The Functionality of the Application is Separated into Isolated Functional areas, called tiers. Typically, Multi-Tiered Applications have a Client Tier, a Middle Tier, and a Data Tier (often called the enterprise information systems tier). Pg. No. 15

Tiered Applications The Client Tier consists of a Client Program that makes Requests to the Middle Tier. The Middle Tier's business function to handle Client Requests and Process Application Data, storing it in a Permanent DataStore in the Data Tier. Java EE Concentrates on the Middle Tier to make Enterprise Application Management Easier, More Robust, and More Secure. Pg. No. 15

The Client Tier Consists of Application clients that access a Java EE Server. Located on a different machine from the Server. The Clients make Requests to the Server. The Server processes the Requests and Returns a Response Back. Many different types of applications can be Java EE clients, and they are not always Java applications. Clients can be a Web Browser, a Standalone Application, or other Servers, and they run on a different machine from the Java EE server. Pg. No. 15

The Web Tier Consists of Components that handle the Interaction between Clients and the Business Tier. Primary tasks: Dynamically generate content in various formats for the Client. Collect input from users of the Client interface and return appropriate results from the components in the Business Tier. Control the flow of screens or pages on the Client. Maintain the state of data for a user's session. Perform some basic logic and hold some data temporarily in JavaBeans components. Pg. No. 15

Java EE Technologies used in the Web Tier Servlets JavaServer Faces Technology (JSF) JavaServer Faces Facelets Technology Expression Language JavaServer Pages (JSP) JavaServer Pages Standard Tag Library JavaBeans Components Pg. No. 16

Servlets Java Programming Language classes that dynamically process requests and construct responses, usually for HTML pages. Pg. No. 16

import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class NewServletHelloWorld extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { out.println("<html>"); out.println("<head>"); out.println("<title>Servlet NewServletHelloWorld</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Hello World...!</h1>"); out.println("</body>"); out.println("</html>"); } finally { out.close(); } Sample code… no reference…

JavaServer Faces Technology A user-interface component framework for web applications that allows you to include UI components (such as fields and buttons) on a page, convert and validate UI component data, save UI component data to server-side data stores, and maintain component state. Pg. No. 16

JavaServer Faces Facelets Technology A type of JavaServer Faces applications that use XHTML pages rather than JSP pages. Pg. No. 16

Expression Language A set of standard tags used in JSP and Facelets pages to refer to Java EE components. Pg. No. 16

JavaServer Pages(JSP) Text-based documents that are compiled into servlets and define how dynamic content can be added to static pages, such as HTML pages. Pg. No. 16

<%@page contentType="text/html" pageEncoding="UTF-8"%> <%-- Document : index Created on : 12 May, 2012, 2:32:37 PM Author : Krishna --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <a href="NewServlet">click</a> <br> <h1>A sample JSP page</h1> <% String str = "Welcome to JSP world."; %> <h2><%out.println(str);%></h2> </body> </html> Sample code… no reference…

JavaServer Pages Standard Tag Library A tag library that encapsulates core functionality common to JSP pages. Pg. No. 16

JavaBeans Components Objects that act as temporary data stores for the pages of an application Pg. No. 16

A Jsp File Calling Bean: <HTML> <BODY> <jsp:useBean id="bean" class=“pkg.Bean" /> Message is: <jsp:getProperty name="bean" property=“str" />  </BODY> </HTML> A Java Bean File: package pkg; public class Bean { private String str=“RadheKrishna"; public String getStr() { return str; } public Bean() {} } Sample code… no reference…

The Business Tier Consists of components that provide the Business Logic for an application. Business Logic is code that provides functionality to a particular business domain, like the financial industry, or an e-commerce site. In a properly designed enterprise application, the core functionality exists in the Business Tier components. Pg. No. 16

Java EE Technologies used in Business Tier Enterprise JavaBeans (enterprise bean) components JAX-RS RESTful web services JAX-WS web service endpoints Java Persistence API entities Java API for XML (JAX) Pg. No. 16

The Enterprise Information System Tier Consists of Database Servers, Enterprise Resource Planning systems, and other Legacy Data sources, like Mainframes. These resources typically are located on a separate machine than the Java EE server, and are accessed by components on the Business Tier. Pg. No. 17

Java EE Technology used in EISTier The JavaDatabase Connectivity API (JDBC) The Java Persistence API(object/relational mapping) The Java EE Connector Architecture (EE to EIS & EIS to EE) The Java Transaction API (JTA) (Data Base / Core functionality – RollBack, AutoCommit etc…) Pg. No. 17

Java EE Servers (Sun Java Application Server) A Server Application that Implements the Java EE Platform APIs and provides the standard Java EE Services. Also called Application Servers, because they allow you to serve Application Data to Clients, much like Web Servers serve Web Pages to Web Browsers. Host several Application Component types that Correspond to the tiers in a multi-tiered application. Provides Services to these components in the form of a Container. Pg. No. 17

Java EE Containers Interface between the Component and the lower-level functionality provided by the platform to support that component. The functionality of the Container is defined by the Platform, and is different for each Component type. However, the server allows the different Component types to work together to provide functionality in an Enterprise Application. Pg. No. 17

Different Java EE Containers The Web Container The Application Client Container The EJB Container Pg. No. 17

The Web Container Interface between Web Components and the Web Server. Web Component can be a servlet, a Java Server Faces Facelets page or JSP page. The container manages the component's lifecycle, dispatches requests to application components, and provides interfaces to context data, such as information about the current request. Pg. No. 17

The Application Client Container Interface between Java EE application clients, which are special Java SE applications that use Java EE server components, and the Java EE server. Runs on the client machine, and is the gateway between the client application and the Java EE server components that the client uses. Pg. No. 18

The EJB Containers Interface between enterprise beans, which provide the business logic in a Java EE application, and the Java EE server. Runs on the Java EE server and manages the execution of an application's Enterprise Beans. Pg. No. 18

Reference Books: Your First Cup: An Introduction to the Java(TM) EE Platform - Oracle