240-322 CliServ. J2EE/141 Client/Server Distributed Systems v Objectives –introduce the J2EE specification, and the J2EE SDK –other approaches: Struts,

Slides:



Advertisements
Similar presentations
JSP and web applications
Advertisements

Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Using JavaServer Pages Harry R. Erwin, PhD CIT304/CSE301.
An architecture for webb applications, J2EE
Introduction to Java 2 Enterprise Edition About myself –Neutrinos, Cancer Research, IT Applications Today’s topic: J2EE –Context –Advantages –Components.
Middleware Fatemeh Hendijanifard 1 آزمايشگاه سيستم هاي هوشمند (
Distributed System Using Java 2 Enterprise Edition (J2EE) B.Ramamurthy.
1 Build a Web Application on J2EE. 2 J2EE Scenario Client – Web Server – EIS Resources Client – Web Server – EIS Resources Client – Application Server.
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
JMS Java Message Service Instructor Professor: Charles Tappert By Student: Amr Fouda.
Enterprise Programming By J Pearce. Enterprise Software Sales HR Inventory Customer Support Shipping.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Web programming for project students Dr Jim Briggs.
12-1 © Prentice Hall, 2004 Chapter 12: Design Elements Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Apache Struts Technology A MVC Framework for Java Web Applications.
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
8 Server Side Scripting.
Distributed System Using Java 2 Enterprise Edition (J2EE)
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.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
Distributed Multitiered Applications The J2EE platform uses a multitiered distributed application model. Application logic is divided into components 1.
CIS 285 ROBINSON WINTER 2005 CIS 285 Web Application Development with Java CIS 285 Sinclair Community College Instructor: Mary Robinson.
Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.
Enterprise Java Beans CS-422. Application Servers In the late 1980s and though the mid 1990s a number of corporations (Broadvision, Netscape…) marketed.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
Ing. Ignacio Roqueta ARTech GeneXus and J2EE.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
1 EIE424 Distributed Systems and Networking Programming –Part II 2. XML-RPC.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Enterprise Computing COSC 617 Jeff Schmitt September 7,2006.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
COP 4991 Component Based Software Development Lecture #4 Java Web Services Onyeka Ezenwoye.
Java Server Pages A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format,
Java-Based Middleware IT 490 Stan Senesy IT Program NJIT.
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Web Services Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Fall CIS 764 Database Systems Design L8. Web ….
Presentation: SOAP/WS in a distributed object framework, Application Servers & AXIS SOAP.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
WEB BASED DATA TRANSFORMATION USING XML, JAVA Group members: Darius Balarashti & Matt Smith.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development using JSP and Web Services JSP and Web Services 18 th March 2005.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Introduction to Spring Remoting Simplifying.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
XML and Web Services (II/2546)
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
J2EE Chris Hundersmarck Maria Baron Jeff Webb.  Java 2 Platform, Micro Edition (J2ME)  Java 2 Platform, Standard Edition (J2SE)  Java 2 Platform, Enterprise.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
1 Distributed System using J2EE. 2 What is J2EE?  J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble.
Java Servlets and Java Server Pages
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
Glink for Java: applet, application and an API for integrating access to Bull, IBM, UNIX and Minitel systems with your Java based e-business applications.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
Apache Struts Technology A MVC Framework for Java Web Applications.
Topics to be covered (ni) Client side validation JSF (free tools as well) Webservices Tell Resources e.g. sites Packaging and deploying web applications.
Building J2EE Applications Based on Design Patterns with Business Components for Java Olivier LE DIOURIS Principal Product Manager Oracle Corporation.
J2EE Platform Overview (Application Architecture)
Unit 6-Chapter 2 Struts.
Distributed System Using Java 2 Enterprise Edition (J2EE)
JavaServer Faces: The Fundamentals
Presentation transcript:

CliServ. J2EE/141 Client/Server Distributed Systems v Objectives –introduce the J2EE specification, and the J2EE SDK –other approaches: Struts, Spring –Web Services (XML-RPC) Semester 1, J2EE and Web Services

CliServ. J2EE/142 Contents 1.What is J2EE? 2.J2EE Overview 3.Some Services Explained 4.Using Sun's J2EE SDK 5.More Information on J2EE 6.Struts 7.Spring 8.Web Services

CliServ. J2EE/ What is J2EE? v J2EE is the Java 2 Enterprise Edition v J2EE helps with the construction of Web- based client/server applications –it supports simplified networking, concurrency, transactions, easy access to databases, etc. continued

CliServ. J2EE/144 v J2EE emphasies n-tier client/server design. v Application development uses objects, beans, and components. v J2EE is not language neutral –tightly connected to Java continued

CliServ. J2EE/145 v Sun initially released J2EE as a specification, which has been implemented by different vendors –e.g Tomcat from the Jakarta Project  –e.g. JRun from Macromedia (Allaire)  v The Sun implementation: –

CliServ. J2EE/ J2EE Overview servlets JSPs Tag libraries Web container Session beans Entity beans EJB container server-side application presentation logic business logic app. CORBA applet/ appl. JDBC JavaMail RMI IIOP JNDI JMS client network deployment description

CliServ. J2EE/147 v A server-side application usually has two parts: –presentation logic in the Web container u to create HTML pages (and other formats) –business logic in the EJB container u to handle server-side processing

CliServ. J2EE/ Some Service Explained v Servlets –a servlet is a Java object on the server side that can repond to an HTTP message (GET, POST, etc) by calling a method –the results of the method is sent back to the client as a Web page continued

CliServ. J2EE/149 v JSP (Java Server Pages) –JSPs dynamically generate Web pages by using servlets v EJB (Enterprise Java Beans) –Java objects with predefined methods for simplifying network and inter-object communication continued

CliServ. J2EE/1410 v Java IDL (Interface Definition Lang.) –a language which allows Java objects to interact with CORBA objects v RMI-IIOP –a bridge between Java’s RMI and the communication protocol used by CORBA over the Internet (IIOP) continued

CliServ. J2EE/1411 v JTA (Java Transaction API) –JTA lets a Java object control transactions (e.g. bank account updates) v JMS (Java Message Service) –JMS lets a Java object asynchronously send messages to other objects continued

CliServ. J2EE/1412 v JNDI (Java Naming & Directory Interface) –JNDI lets a Java object find other objects (over the network) by using their names continued

CliServ. J2EE/1413 v The deployment description is a text file containing various information on how to configure/initialise the server-side application –the information is written in XML format

CliServ. J2EE/ Using Sun's J2EE SDK v J2EE SDK is Sun's implementation of the J2EE specification. v J2EE SDK is Sun's implementation of the J2EE specification. v The latest version: –Java 2 SDK, Enterprise Edition, v.1.4: download.html –also obtain the tutorial for v.1.4 from the page continued

CliServ. J2EE/1415 v This release is available for the following platforms: –Solaris, Windows 2000 Prof. Ed., Windows XP Prof. Ed., Linux Redhat v The API documentation is packaged with the download bundle. continued

CliServ. J2EE/1416 v To download J2EE SDK v.1.4, you have to register as a member of the Java Developer Connection –membership is free v Easier to get it from Aj. Somchai's site: – RefImp.html#J2EE –102 Mb for everything

CliServ. J2EE/1417 Sun's J2EE SDK as a Diagram

CliServ. J2EE/1418 Java Server Faces (JSF) v An API for building Web-based client-side user interfaces from components. –communication to the server side is built-in –the components are extensible v Simplifies the design and implementation of the presentation level of client/server applications. continued

CliServ. J2EE/1419 v Coding is based on listening for events. v JSF 1.2 will be integrated into the next release of J2EE (version 1.5, renamed to 5.0)

CliServ. J2EE/1420 JSTL v The JavaServer Pages Standard Tag Library –structural tasks, such as iteration and conditionals –tags for manipulating XML documents –internationalization tags –SQL tags –a framework for integrating existing custom tags with JSTL

CliServ. J2EE/1421  The compilation of the examples in the J2EE tutorial use Ant, a Java-based make utility, found at: –  Ant v (and before) are available here – OpenSource.html#Ant Ant

CliServ. J2EE/ More Information on J2EE v J2EE main site: – –it has links to pages dedicated to parts of J2EE (e.g. EJB, JSP, servlets, XML) v Aj. Somchai's J2EE books section: – ForMember/Books.html#J2EE

CliServ. J2EE/ Struts v An open source framework –intended to be a simpler replacement for J2EE –many components of J2EE can be used – v Utilises the Model-View-Controller (MVC) design style for applications. model controller view notifies updates continued

CliServ. J2EE/1424 v Model tools: –JDBC, EJB, Hibernate v View tools: –JSP, XML/XSLT, JSF v Controller tools: –servlets, tag libraries, specific to Struts v Available from: –

CliServ. J2EE/ Spring v Another open source framework –intended to be a simpler replacement for J2EE –many components of J2EE can be used – v Utilises the Inversion of Control (IoC)design pattern –the framework does more (manages more), the programmer codes less continued

CliServ. J2EE/1426  The core of Spring's design is the org.springframework.beans package, designed for working with Java Beans –objects utilise standard get/set methods to simplify communication v A Spring bean factory enables objects to be retrieved by name, and manages relationships between objects. continued

CliServ. J2EE/1427 v Configuration details are specified using XML and method prototypes. v Unit testing is simpler. v Primary use is to replace or simplify EJB applications.

CliServ. J2EE/ Web Services v A collection of XML-based APIs for allowing Web-based (J2EE) applications to: –exchanging messages –describing their services/capabilities –publish their Web service description(s) –find other Web service descriptions

CliServ. J2EE/ Web Service Architecture

CliServ. J2EE/ Some Web Services APIs v Simple Object Access Protocol (SOAP) –XML-based messaging protocol v Web Services Description Language (WSDL) –XML language for describing Web services and their capabilities v Java API for XML Registries (JAXR) –language for building XML directories of information about Web services continued

CliServ. J2EE/1431 v Java API for XML-based RPC (JAX-RPC) –language for converting remote procedure call data into XML v Java API for XML Messaging (JAXM)

CliServ. J2EE/ Focus on XML-RPC v An implementation of RPC which uses HTTP and XML to support remote method calls –there are implementations for Java, C++, PHP, etc. –

CliServ. J2EE/1433 v The most popular Java implementation of XML-RPC is Apache XML-RPC – –part of the larger Apache XML project

CliServ. J2EE/1434 XML-RPC Approach XML-RPC server XML-RPC client : int x = sqS.square(14) : 1. send inputs as XML in a POST message 2. send result as a HTTP response page sqS handler at foobar.com

CliServ. J2EE/1435 Example XML-RPC Request POST /XMLRPC HTTP/1.0 Host: foobar.com Connection: Close Content-Type: text/xml Content-Length: 151 User-Agent: OSE/XML-RPC sqS.square 14

CliServ. J2EE/1436 XML-RPC Response HTTP/ OK Date: Wed, 11 May :08:09 GMT Server: Apache/ (Unix) Content-Length: 157 Connection: close Content-Type: text/xml 196

CliServ. J2EE/1437 Sample Client Code // create client link to server XmlRpcClient client = new XmlRpcClient( " // create a parameters vector for the request Vector params = new Vector(); params.addElement( new Integer(14) ); // send the request and get the response Object resultObj = client.execute( "sqS.square", params); int result ((Integer) resultObj).intValue(); // result will be 196

CliServ. J2EE/1438 Sample Server Code public class SquareServer { public SquareServer() {} public Integer square(int x) { return new Integer( x*x ); } : continued

CliServ. J2EE/1439 public static void main(String[] args) { try { // invoke XML-RPC server WebServer server = new WebServer(); // add handler for the service server.addHandler("sqS", new SquareServer()); } catch (Exception ex) {} } } // end of SquareServer class

CliServ. J2EE/ Web Services Resources v The Java Web Services Developer Pack (Java WSDP), version 1.5 – or – RefImp.html#WebServices continued

CliServ. J2EE/1441 v In the CoE library: –Java Web Services for Experienced Programmers Deitel et al, Prentice Hall, 2003 –very detailed, but a little bit out of date