Java Web Development with NetBeans IDE -- Kai Qian Chapter 9 Case Study.

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
Advertisements

3 Copyright © 2005, Oracle. All rights reserved. Designing J2EE Applications.
Apache Struts Technology
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
Model-View-Controller ("MVC") This is a architectural design pattern for interactive applications. This design pattern organizes an interactive application.
UML Extensions for Web Design Design activities: –Partitioning of objects into tiers such as client, server, etc. –Separating and defining user interfaces.
Servlets and a little bit of Web Services Russell Beale.
Development of a Web Based B&B Reservation System Elizabeth Gates 22July04.
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.
1 CS 483 Enterprise and Web Application Programming Week 6 Session Beans JSP Tutorial.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
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?
Apache Struts Technology A MVC Framework for Java Web Applications.
Java Pet Store Application. Outline Introduction Introduction Information Layer Information Layer Application Layer Application Layer Infrastructure Layer.
Struts 2.0 an Overview ( )
Struts. Agenda Preface Struts and its components An example The architecture required for Struts Applications.
UNIT-V The MVC architecture and Struts Framework.
Java Server Pages (JSP) Presented by: Ananth Prasad & Alex Ivanov May 10, 2001.
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.
Model View Controller (MVC) Rick Mercer with a wide variety of others 1.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
Introduction to J2EE Architecture Portions by Kunal Mehta.
 2002 Prentice Hall. All rights reserved. Chapter 17: Enterprise Java Case Study: Architectural Overview Outline 17.1 Introduction 17.2 Deitel Bookstore.
JBoss at Work JAW Motors Application Chapter 1-3 Jeff Schmitt October 9, 2006.
JSP Architecture Outline  Model 1 Architecture  Model 2 Architecture.
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,
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
® IBM Software Group © 2007 IBM Corporation J2EE Web Component 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.
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.
J2EE Overview Web Programming CSCI J2EE multi-tier architecture Servlet: Java class loaded into Web server JSP page: enhanced HTML page that is.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many others 1.
JSF Framework Java Server Faces Presented by Songkran Totiya (6/10/2014)
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
CSCI 6962: Server-side Design and Programming Java Server Faces Scoping and Session Handling.
Model View Controller Architecture of Java Web Applications Dr. M V S Peri Sastry, Ph.D.[BITS-Pilani]
Enterprise Java Beans. Model 1 J2EE – Web View Model/View/Controller Model View Control Data base Web Server Model One Architecture HTTP Request HTTP.
Apache Struts. J2EE Web Application using MVC design pattern Why MVC? Separate components = easier maintenance – Model component holds object data – View.
Model View Controller (MVC) Bigger than a Pattern: It’s an Architecture Rick Mercer with help from many of others 1.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
1 Copyright © 2004, Oracle. All rights reserved. Oracle Application Development Framework.
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.
1 Distributed System using J2EE. 2 What is J2EE?  J2EE (Java2 Enterprise Edition) offers a suite of software specification to design, develop, assemble.
Implementation Struts Framework for well-architectured web applications Model-View-Controller design pattern.
EJB Enterprise Java Beans JAVA Enterprise Edition
JSP / Servlets and Beans
SDJ INFOSOFT PVT. LTD. 2 BROWSERBROWSER JSP JavaBean DB Req Res Application Layer Enterprise server/Data Sources.
Apache Struts Technology A MVC Framework for Java Web Applications.
CS320 Web and Internet Programming Web Application and MVC Chengyu Sun California State University, Los Angeles.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Online Airline Reservation System
Java Server Pages Can web pages be created specially for each user?
J2EE Platform Overview (Application Architecture)
Introduction to J2EE Architecture
Unit 6-Chapter 2 Struts.
Design and Maintenance of Web Applications in J2EE
J2EE Application Development
Distributed System Using Java 2 Enterprise Edition (J2EE)
JavaServer Faces: The Fundamentals
Enterprise Java Beans.
Presentation transcript:

Java Web Development with NetBeans IDE -- Kai Qian Chapter 9 Case Study

Objectives Introduction to Multi-tier Java Enterprise Applications. A Comprehensive Java Enterprise Application Example. Building and Deployment of Java Enterprise Application

Introduction Let us consider the following scenario for the project: A book distributor specializing in rare and hard to find books has hired us to create a website. The client wants a site that will allow bookstore owners to register, log in, browse the inventory of books, and place orders. The application must provide a way for a registered bookstore owner to view his previous orders. The shopping cart should allow a user to add books to the shopping cart, saving all of the selections made until the user is ready to complete the order. The bookstores should be able to include their distributor's inventory on their web pages if they want to, allowing the end customer to purchase a book online without knowing that it comes from the distributor.

Architecture Overview The MVC pattern will fit our project in the following ways: Model: JPA Entities representing real-world objects and concepts. Controller: Java Servlets will handle incoming requests and decide the flow of the application. Java session beans will implement the application's business logic. View: JSP pages will present a web interface for the user, gathering input and displaying output.

Architecture Overview, contd.

Enterprise Tier Our Enterprise Tier is made up of two separate but related components. We have session beans that implement the logic for the application and the JPA entities that make up the data model.

Session Beans The session beans will implement the application's logic, making up part of the Controller in our MVC architecture.

Web Tier The web tier makes up the View in our MVC architecture, but also crosses over into the Controller portion as well. The Servlets act as controllers by accepting and validating input, calling the appropriate session bean methods, and handing off the results of the processing to the View component (the JSP pages). The distinction between View and Controller in the web tier falls along the lines of separation between Servlet and JSP.

Servlets The main purpose of the Servlets in our application is to accept, validate, and parse the input from the user's web browser, call the appropriate session bean methods, and decide what the next step is. The Servlets in our application should never output HTML directly to the client because that would cross the line between Controller and View and would also cause us to have to use all sorts of strange looking escape sequences for outputting double quotes which, aside from looking hideous, are hard to type.

Building and Deploying NetBeans organizes the Enterprise Application project into three separate projects – an EJB project containing enterprise components, a web project containing web components, and an Enterprise project that depends on the other two and ties them together. To make things even more convenient, NetBeans will also allow us to build and deploy to the GlassFish application server.

Building and Deploying, contd. To deploy the application to a production server will require the uploading the Enterprise Archive (EAR) file to the application server through the management console. The EAR file is a special type of ZIP file that contains a Java Archive (JAR) file containing the EJB project components and the Web Archive (WAR) file containing the web components of the Enterprise project.

Chapter 9 The End