An architecture for webb applications, J2EE

Slides:



Advertisements
Similar presentations
J0 1 Marco Ronchetti - Basi di Dati Web e Distribuite – Laurea Specialistica in Informatica – Università di Trento.
Advertisements

J2EE Architecture Overview
Apache Struts Technology
Introduction to Java 2 Enterprise Edition About myself –Neutrinos, Cancer Research, IT Applications Today’s topic: J2EE –Context –Advantages –Components.
The J2EE Framework 1 Introduction to Java 2 Enterprise Edition Presented by Communication & Collaboration Technologies Division of the Chief Information.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
An introduction to Java Servlet Programming
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.
Point Of Sale(POS) J2EE Application Department : Computer Science Degree : Master Student : Woojin Choi ID : (POS J2EE Application with JRun)
Java 2 – Enterprise Edition Kevin J. LaFata April 21, 2003 UM – St. Louis.
J2EE Java2 Enterprise Edition by Damian Borth. Contents Introduction Architectures styles Components Scenarios Roles Processing a HTTP request.
Java 2 Platform, Enterprise Edition (J2EE). Source: Computer, August 2000 J2EE and Other Java 2 Platform Editions.
J2EE vs..NET Nigam Patel. Topics Background –Web Services, J2EE and.NET Similarities Differences Conclusion –Pros and Con (J2EE and.NET)
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Nikolaos Korfiatis The Java 2 Enterprise Edition Platform Dept. of Management & Technology-Athens University of Economics and Business Java 2 Platform.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
© 2004 IBM Corporation BEA WebLogic Server Introduction and Training.
Session-01. What is a Servlet? Servlet can be described in many ways, depending on the context: 1.Servlet is a technology i.e. used to create web application.
Understanding and Managing WebSphere V5
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
Distributed System Using Java 2 Enterprise Edition (J2EE)
INTRODUCING THE JAVA EE PLATFORM Ch-5. Introduction Java is a  platform-independent programming language  secure and robust applications  may run on.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Distributed Multitiered Applications The J2EE platform uses a multitiered distributed application model. Application logic is divided into components 1.
Chapter 4: Core Web Technologies
Enterprise Java Beans CS-422. Application Servers In the late 1980s and though the mid 1990s a number of corporations (Broadvision, Netscape…) marketed.
HTTP client wide area network (Internet) HTTP proxy HTTP server HTTP gateway firewall HTTP tunnel Copyright Springer Verlag Berlin Heidelberg 2004.
Glink: GCOS e-business in an application server architecture Summit 2000, Jim Gallagher.
Ing. Ignacio Roqueta ARTech GeneXus and J2EE.
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.
Entity Java Beans Jorg Janke Open Source ERP & CRM.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Comp2513 JavaBeans, EJB and J2EE Daniel L. Silver, Ph.D.
第十四章 J2EE 入门 Introduction What is J2EE ?
J2EE Structure & Definitions Catie Welsh CSE 432
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Databases JDBC (Java Database Connectivity) –Thin clients – servlet,JavaServer Pages (JSP) –Thick clients – RMI to remote databases –most recommended way.
Enterprise Java Overview Panos Konstantinidis Java Developer JUG Leader & Java Champion
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.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
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
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
©NIIT Introducing Enterprise JavaBeans (EJB) Lesson 1A / Slide 1 of 43J2EE Server Components Objectives In this lesson, you will learn about: The features.
Chapter 6 Chapter 6 Server Side Programming (JSP) Part 1 1 (IS 203) WebProgramming (IS 203) Web Programming.
Alan L. Batongbacal CS 4244 / 01 Nov 2000
EJB Enterprise Java Beans JAVA Enterprise Edition
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.
Apache Struts Technology A MVC Framework for Java Web Applications.
Java Server Pages Can web pages be created specially for each user?
J2EE Platform Overview (Application Architecture)
Netscape Application Server
Introduction to J2EE Architecture
MSIS 655 Advanced Business Applications Programming
Web-Services-based Systems Architecture, Design and Implementation
Distributed System Using Java 2 Enterprise Edition (J2EE)
Web Application Server 2001/3/27 Kang, Seungwoo. Web Application Server A class of middleware Speeding application development Strategic platform for.
Understanding and Designing with EJB
Presentation transcript:

An architecture for webb applications, J2EE A quick look at Java 2 Enterprise Edition

J2EE Overview A framework for Enterprise Applications Scalable Distributed Transactional Losely coupled Multi-tired Portable Secure Access to different systems

J2EE Overview Built on top of Java 2 Standard Edition, J2SE Access to all of J2SE-APIs 100% Java All Java, nothing but Java, allmost (IIOP) J2SE is part of the puzzle

J2EE Overview J2EE is a specifaction, not a produkt No vendor lock in Several implementations BEA (Weblogic) IBM (Websphere) Oracle (Oracle9iAS and OC4J) JBoss Ironflare (Orion) Jakarta Tomcat Sun provide a reference implementation, but it’s not allowed to use it for production JBoss and Jakarata-Tomcat is Open Source Tomcat is the reference implementation of JSP and Servlets, and the container we will use Oracle9iAS contains a J2EE Container called OC4J (Oracle Container for Java) that is based on Orion

J2EE Overview – Content of J2EE Enterprise Java Beans, EJB Java Servlets Java Server Pages, JSP Java Messaging Service, JMS Java Database Connectivity, JDBC JavaMail Java Transaction API, JTA Connector Architecture

J2EE Overview – Content of J2EE RMI/IIOP Java Naming and Directory Interface, JNDI Webservices, in version 1.4

J2EE Overview – Benefits of J2EE Separates business logic from system code Separates busines logic from presentation Deploy-time configuration Scalable from start Distributed from start Component model on the server = easier team work Declarative security and transactions Basically, leave everything but the business logic to the container. Business logic is all the functions you write that makes your application behave as it does Since the security framework, the threading and all the other parts are well tested you can focus on your problems and trust the functionality of the conatiner

Containers and Components A J2EE Server (except the database)

Containers and Components A J2EE Application server provides containers for all components of J2EE There is one container per J2EE component The Application server runs the entire J2EE solution

Containers and Components The Application server handles all system level programming Security Authorization – Is the user allowed to do this operation? Authentication – Is the user who he says? Validate credentials Transactions Threading Object life time management Caching Object persistence Database Connection pooling Robust and scalable system programming is a very complex task, and quite different from writing good business logic Most system level programming is the same in most situations. Why re-write it all the time, it error-prone and expensive

Containers and Components Several clients – one system A complex (thick) client can call the EJB layer at once A thin client (web browser, cell-phone, PDA) call the web layer. Different layouts are generated for different clients XML is heavily used to generate a general layout that’s transformed with XSLT to the specific layout, for example HTML

Enterprise Java Beans The core of J2EE Server side components Three base types of EJB Session Beans Entity Beans Message Driven Beans Transactional components Bean managed or Container managed Deploy time configuration of security and transactions

Enterprise Java Beans - Architecture Since version 1.3 of J2EE there is also a Local Home interface and Local “Remote” interface for inter-container-calls, that is, calls between components within the same JVM. This is mainly for performance since calls on the Remote interface are expensive network calls The implementation bean (the Enterprise Java Bean Component) is the same for Local and Remote. In other ways, there are two different ways to call the same EJB

Enterprise Java Beans – Session Beans Stateless and statefull beans Handles busines logic Acts as frontend for Entity beans A Stateless Session bean doesn’t maintain a state between invocations. Two different calls are not guarantied to end up in the same instance. Session beans are typically used to handle all of the business logic in the system. When it comes to data access the mostly rely on Entity beans A typical solution is to have a Session bean as front end to the EJB layer. The Session bean performs controll logic in the EJB layer and calls other Session beans and Entity beans as needed

Enterprise Java Beans – Entity Beans Handels data Mapped on Database tables Container managed (CMP) and Bean Managed Persistence (BMP) CMP releaves the developer from writing SQL code Minimizes the risk for database lock-in. EJB-QL – a query language for EJBs In general, there is a one to one mapping between Entity beans and database tables, but it doesn’t have to be like that When an instance of the bean is created, the correspondig row in the database is created. When an instance is deleted, the corresponding row i deleted and when a bean is updated, the update propagate to the database Since the Container generates all SQL code in the CMP case we don’t risk to use vendor specific SQL Since Entity beans are used to handle the data, a way of searching amongst them is needed == EJB-QL EJB-QL is very similar to SQL but work on objects and properties instead of tables and columns

Enterprise Java Beans – Message Driven Beans Activated by a JMS queue Asynchronous execution No need for the client to wait for an answer The MDB is in fact a Message listener in a JMS system, more about that in the next page Scalable solution that is good if the client doesn’t need a response right away

Java Messaging Service, JMS A messaging API for Java A Sender sends a message to a JMS Queue A Listener listens for messages on a Queue Guarantied delivery Asynchronous processing After the Sender has sent its message there is no need to wait for the Listener to get it Great for scalability Good for operations that doesn’t have to occur at once, for example logging

JavaMail A high level API for sending and receiving mail No need to know everything about the underlying protocolls Support for IMAP, POP and SMTP

Java Transaction API, JTA The easy way to handle complex transactions You can have transactions between different components A mailserver, a database and a JMS system can participate in the same transaction, given that they support it Based on XA The mechanism behind the transactions of EJBs

Java Connector Architecture, JCA Hook into existing legacy systems You can write a connector for basically anything Anything with a Connector can be plugged into the J2EE Server Simplifies system integration JDBC Drivers will be Connectors in upcoming releases. JBoss, for example, already treats a JDBC Driver as a Connector

RMI/IIOP Integration with other systems through Corba Call your J2EE Components from Visual Basic, Delphi, C++ and C Java might not be the best or only choice for your clients Corba is a system for distributed objects that has been around a while. Mostly used with C++ Great for interoperability between different types of systems

Java Naming and Directory Interface, JNDI Very fundamental functionality in J2EE The way that distributed objects are located Any kind of objects can be stored in JNDI All objects are stored in a hierarchical way The way the Home interface for EJBs are located JNDI is very fundamental and used all the time. It’s a very simple to use interface JNDI can interact with LDAP

Java Naming and Directory Interface, JNDI Used to store connection pools for JDBC Context.lookup(“java:comp/env/jdbc/Pool1”) Private context from within components Defined with a <resource-ref> in deployment descriptors Context.lookup(“Pool1”) Global context from the outside

Web Development The web is static by nature Based on HTTP A stateless network environment The stateless nature is what have made the Internet into what it is today

HTTP A very simple and readable protocol Several methods Text based GET The basic request to get a page POST Used from forms in the web pages DELETE HEAD

HTTP A typical browser request for www.dn.se/index.html Connect to www.dn.se GET /index.html HTTP/1.0 Disconnect

CGI Common Gateway Interface An early interface for making the web more dynamic Executes programs on the server Cumbersome programming and bad resource management Basically each request starts a new process on the server

Java Servlets Extensions of the web server One of the front ends to the J2EE system Generates HTML with print statements Good for implementing control logic Support for sessions Multithreaded by nature Not so good for generation nice layout

Java Server Pages (JSP) HTML with embedded Java code Good for presentation Compiled to a Servlet at runtime Easy for web designers to use Support for Java Beans and Custom tags

Servlets and JSP Servlets and JSPs are often used together The Servlet handles the request The Servlets calls Java Beans or EJBs to handle the business logic The Servlest forwards to a JSP The JSP handles the Presentation Model View Controller, MVS

Other technologies for the web Microsoft Active Server Pages Embed VB code in your HTML Similar to JSPs PHP Quite like ASP, but open source and available on all platform. Used at many sites today Coldfusion Webobjects (Mac) Zope

Next time The next session will be all about Servlet programming