ISE 390 Dynamic Web Development Java EE Web Applications.

Slides:



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

Arquiteturas .NET e Java
J2EE Architecture Overview
Apache Struts Technology
An architecture for webb applications, J2EE
Integrating SOA and the Application Development Framework Shaun O’Brien Principal Product Manager – Oracle JDeveloper / ADF.
 Java  Python  Bigtable(Bt) is a distributed storage system for managing structured data that is designed to scale to a very large size.  Query Language.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
JSP: JavaServer Pages Juan Cruz Kevin Hessels Ian Moon.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Introduction to Enterprise JavaBeans. Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java.
Layers & Tiers Umair Javed Lec - 41.
J2EE Kenneth M. Anderson CSCI Web Technologies October 3, 2001.
Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.
Introduction to EJB INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
CS 483 Enterprise and Web Application Programming
Apache Struts Technology A MVC Framework for Java Web Applications.
Session-01. Layers Struts 2 Framework The struts 2 framework is used to develop MVC-based web application. Struts 1.0 was released in June The.
Introduction to Java web programming Dr Jim Briggs JWP intro1.
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)
UNIT-V The MVC architecture and Struts Framework.
Spring Roo CS476 Aleksey Bukin Peter Lew. What is Roo? Productivity tool Allows for easy creation of Enterprise Java applications Runs alongside existing.
ISE 390 Dynamic Web Development Introduction. Who am I? Richard McKenna Phone: Office: CS Room 1436 Office.
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.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
EJB Overview Celsina Bignoli Distributed Business Applications Server DB Client DB Server DB.
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.
Introduction to J2EE Architecture Portions by Kunal Mehta.
TDDD05 EJB Lab (Part of slides reused from Mikhail’s) Lu Li
JBoss at Work JAW Motors Application Chapter 1-3 Jeff Schmitt October 9, 2006.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
J2EE Structure & Definitions Catie Welsh CSE 432
Enterprise Java v120131Intro to JavaEE1 Java EE 5 TM Introduction.
Lecturer: Prof. Piero Fraternali, Teaching Assistant: Alessandro Bozzon, Advanced Web Technologies: Struts–
Case Study + MVC Lec Error Pages By means of the page directive, a JSP can be given the responsibility of an Error page An Error JSP will be called.
Fall CIS 764 Database Systems Design L8. Web ….
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Introduction to Web Dimitar Nenchev Ivan Nakov
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
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.
Enterprise JavaBeans Session Beans. Session beans are a type of Enterprise JavaBean component designed to implement business logic responsible for managing.
Chapter 3 JSP Overview. The Problem with Servlets processing the request and generating the response are both handled by a single servlet class Java programming.
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.
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.
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.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Singleton Academy, Pune. Course syllabus Singleton Academy Pune – Course Syllabus1.
EJB Enterprise Java Beans JAVA Enterprise Edition
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
Apache Struts Technology A MVC Framework for Java Web Applications.
Intro to J2EE Concepts Mimi Opkins Fall 2016 CECS493.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Structure of a web application
Enterprise Java Bean. Overview of EJB View of EJB Conversation Roles in EJB, Types of Enterprise Beans Lifecycle of Beans Developing Applications using.
ISE 390 Dynamic Web Development
Distributed System Using Java 2 Enterprise Edition (J2EE)
JavaServer Faces: The Fundamentals
Component-based Applications
Developing and testing enterprise Java applications
Enterprise Java Beans.
Intro to J2EE Concepts.
Presentation transcript:

ISE 390 Dynamic Web Development Java EE Web Applications

What is a Java Web Application? Runs on an application server –i.e. Glassfish, Tomcat, WebSphere Generates interactive Web pages with: –markup code (i.e. XML, HTML) –dynamic code (i.e. JavaScript)

What is JavaEE? Java Enterprise Edition Tools & APIs for eCommerce Front-end vs. Back-end Good News & Bad News

JavaEE Setup is much of the battle

Lots and lots of stuff Tools –i.e. NetBeans, Glassfish, etc. Core Libraries –JSF, JPA, Ajax, etc. Related APIs –PrimeFaces, Struts, Spring, etc.

Common Java Frameworks 1. Spring MVC (23%) 2. Struts 1.x (15%) 3. Apache Axis (15%) 4. Apache Xerces (14%) 5. Hibernate (12%) 6. JDOM (12%) 7. Java Applet (8.1%) 8. Apache Velocity (7.9%) 9. Apache ORO (7.0%) 10. JAX-WS (6.5%) Source: VeraCode Blog applications/

A good place to start Tools –NetBeans –Glassfish –MySQL –Java DB/Derby

A good place to start Core Libraries –Java Server Faces –JSTL & EL –Java Persistance API –Enterprise Java Beans –JavaScript & Ajax

A good place to start Related AP –RichFaces –PrimeFaces –Spring –Struts –JQuery –Google Maps API

Servers, Servers, and More Servers What are: –Web Servers? –Application Servers? –Enterprise Servers? –Database Servers? –Java EE Servers? Abstraction, abstraction, abstraction

Multi-Tier JavaEE Applications

JavaEE Application Communications

JavaEE Servers & Containers

Let's Dive into JSF JavaServerFaces Start NetBeans 7.2 Make a JSF Project Look at a JSF page What do these tags look like?

Best way to find your way around Look up every reference It's painfully slow, but necessary Unfamiliar classes: – Unfamiliar tags: –

But First: Annotations Provide data about a program to: –compiler –Tools –JVM Can be applied to: –classes –fields –Methods Can contain elements with values

Annotations Look-Up Scattered in the Java EE 6 API. Ex: – – Via cheat sheet: –

CDI? Context & Dependency Injection –f.k.a Web Beans Contexts? –lets you use JavaBeans, EJBs, etc. in other contexts Dependency Injection? –context polymorphism CDI will do much of the work behind our annotations

CDI At –makes a bean accessible via a Facelet public class ShoppingCart bookcatalog.xhtml: <h:commandLink id="check" action="bookshowcart" immediate="true" rendered="#{cart.numberOfItems > 0}">

So what are facelets? A page declaration language –used to build JSF views And tag libraries: <ui: for templating <h: for HTML components <f: for custom actions <c: for JSTL (Java language features) <fn: more JSTL (Java API features) JSTL: JavaServerPages Standard Tag Library

Facelets use EL Expression Language For what? –evaluate expressions –get/set data –invoke methods EL defines: –how to write expressions: ${customer.age + 20} –how to reference get/set: ${customer.name} –how to invoke methods: val="#{customer.validateName}"

What's a managed bean? In JSF apps, typically each page connects to one. Why? –defines methods/properties associated with the page's components –Why?

We've Seen Front-End JavaEE JavaServerFaces XHTML CSS

Now for the Back-End What's the Java Persistence API (JPA)? What's an Enterprise Java Bean (EJB)? –server-side component –encapsulates business logic –Ex: check inventory order products

Java Persistence API (JPA) Provides object/relational mapping to relational DB What does that mean? –makes it easy to talk to Dbs Why? –separate roles and employ abstraction

The JPA Entity A JSP Domain It represents a DB Table –an Entity Instance would be a row Mapping done via public class Book {

Why use EJBs? Simplify development of large, distributed apps Scalability EJB Containers provide system-level services to EJBs: –transaction management –concurrency –security features Again, separation of roles –thinner clients

Two types of EJBs Session EJBs –performs a task for a client Message-Driven EJBs –acts as message listener (like for JMS)

Session Beans Clients (i.e. facelets) invoke session bean methods Does its work on the server Not persistent –its data not saved to database Three Types: –stateful, stateless, & singleton

Stateful Session Beans Not shared –belongs to a single client –can store info about clients Lasts for duration of client/server session –when client terminates, bean terminates

Stateless Session Beans Support multiple clients Methods do not “remember” clients Scalability advantages over stateful beans

Singleton Session Beans Lives for duration of application Only one of them Shared among clients

Why use stateful beans? The bean's state represents the interaction between the bean and a specific client The bean needs to hold info about the client across method invocations The bean mediates between the client and the other components of the application, presenting a simplified view to the client Behind the scenes the bean manages the workflow of several EJBs

Why use stateless beans? The bean has no data for a specific client In a single method invocation, the bean performs a generic task for all clients The bean implements a web service

Why use singleton beans? State needs to be shared across the application A single enterprise bean needs to be accessed by multiple threads concurrently The application needs an enterprise bean to perform tasks upon application startup and shutdown The bean implements a web service

How does a client use EJBs? Dependency injection OR JNDI Lookup –for non Java EE apps

Today Go to schedule page Let’s do 2 tutorials together: Getting Started with Java EE Creating an Enterprise EJB App