Structure of a web application1 Dr Jim Briggs. MVC Structure of a web application2.

Slides:



Advertisements
Similar presentations
3 Copyright © 2005, Oracle. All rights reserved. Designing J2EE Applications.
Advertisements

Apache Struts Technology
ISE 390 Dynamic Web Development Java EE Web Applications.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
.NET Mobile Application Development Distributed Application Design.
Introduction to Enterprise JavaBeans. Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
Time Scalability Single User Unlimited Users 100s of Users Several Users PC based Single user Late 1980sNow PC based, file-level locking Single user or.
Layers & Tiers Umair Javed Lec - 41.
© 2005, Cornell University. Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson
Satzinger, Jackson, and Burd Object-Orieneted Analysis & Design
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
Technion – Israel Institute of Technology Department of Electrical Engineering Software Lab Grades Server on J2EE Technology Edo Yichie Sagee Rosen Supervisor:
Apache Struts Technology A MVC Framework for Java Web Applications.
M.Sc. Course, Dept. of Informatics and Telecommunications, University of Athens S.Hadjiefthymiades “Web Application Servers” Basics on WAS WAS are necessary.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
UNIT-V The MVC architecture and Struts Framework.
Money Tracking Project Seminar on Software Architecture Design Money Tracking Project Date: Dec 05, 2008 Group 2 Adviser: Dr. Ali Arsanjani Student group:
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.
Java Beans.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
CS 493/693: Distributed Systems Programming V. “Juggy” Jagannathan CSEE, West Virginia University March 21, 2005.
Design Patterns Phil Smith 28 th November Design Patterns There are many ways to produce content via Servlets and JSPs Understanding the good, the.
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.
Session Beans INFORMATICS ENGINEERING – UNIVERSITY OF BRAWIJAYA Eriq Muhammad Adams J
Chapter 8 Script-free pages. Problem with scripting in JSP When you use scripting (declaration, scriplet, expressions) in your JSP, you actually put Java.
Web applications using JavaServer Faces (JSF) A brief introduction 1JavaServer Faces (JSF)
J2EE Structure & Definitions Catie Welsh CSE 432
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
JSF Introduction Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
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.
The Client/Server Database Environment Ployphan Sornsuwit KPRU Ref.
3-Tier Web Application Architecture. Simple Log-in public String button1_action() { // TODO: Process the button click action. Return value is a navigation.
Java Web Development with NetBeans IDE -- Kai Qian Chapter 5 JavaServer Faces (JSF) Technology.
Architectural Patterns Support Lecture. Software Architecture l Architecture is OVERLOADED System architecture Application architecture l Architecture.
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.
Introduction Database integral part of our day to day life Collection of related database Database Management System : software managing and controlling.
Sakai WebApp Structure
© 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.
Chapter 9 Web Application Design. Objectives Describe the MVC design pattern as used with Web applications Explain the role and responsibilities of each.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Architecture Overview Server Database (can be on the server or separate ) Client1 Client2 Client3 HTTP  View ppt notes pages for discussion!
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.
Enterprise Java Beans. Contents  Understanding EJBs  Practice Section.
Structure of a web application
Web Software Model CS 4640 Programming Languages for Web Applications
Introduction to J2EE Architecture
Sakai WebApp Structure
Design and Maintenance of Web Applications in J2EE
ISE 390 Dynamic Web Development
Web Application Architectures
JavaServer Faces: The Fundamentals
Web Application Architectures
Enterprise Java Beans.
Web Application Architectures
Presentation transcript:

Structure of a web application1 Dr Jim Briggs

MVC Structure of a web application2

3 MVC Model View Controller pattern Way of keeping aspects of an application separate Applicable to all applications, not just web ones

Structure of a web application4 Advantages of MVC Good software engineering practice to maintain separation of concerns An application might have more than one user interface –The elements of the user interface need to be kept separate from the parts that are common to each Different developers (with different skills) may be responsible for different aspects of the application –Frequently, user-interface designers responsible for the view –Conventional programmers responsible for the controller and model –In some circumstances, the controller might be the responsibility of an interaction engineer (or team)

The structure of MVC Structure of a web application5

6 Implementing webapps in Java Type 1 – all in JSP Type 1.5 – JSPs that call JavaBeans to do most of the processing Type 2 – very little code in JSPs; servlet used as controller; JavaBeans provide model

Structure of a web application7 Type 1.5

Structure of a web application8 Type 2

APPLICATION LAYERS Structure of a web application9

10 External3-tier architecture 3-tier Application Architecture Presentation Business Logic Data Access Database User Other Apps

Structure of a web application11 Presentation Layer This is what the user sees and interacts with Sometimes called the GUI or client view Should not contain business logic or data access code 3-tier architecture Presentation Business Logic Data Access

Structure of a web application12 Logic (Business) Layer The set of rules for processing business information Sometimes called middle tier or backend Should not contain presentation or data access code 3-tier architecture Presentation Business Logic Data Access

Structure of a web application13 Data Access Layer The physical storage layer for data persistence Manages access to DB or file system Should not contain presentation or business logic code 3-tier architecture Presentation Business Logic Data Access

Structure of a web application14 The 3-tier principles Each tier should be independent and should not expose dependencies related to the implementation Unconnected tiers should not communicate 3-tier architecture Presentation Business Logic Data Access

How tiers affect design Structure of a web application15

IMPLEMENTATION ARCHITECTURES Structure of a web application16

Single server (abstract) ApplicationUser Web server ViewController Business logic Business objects PersistenceDatabase Structure of a web application17

Single server (servlet/JSP) ApplicationUser Web server JSPsServlets Session beans Entity beans Façade classes Database Structure of a web application18

Single server (JSF) ApplicationUser Web server Facelets Managed beans Session beans Entity beans Façade classes Database Structure of a web application19

Separate servers (abstract) ApplicationUser Web server ViewController Application server Business logic Business objects PersistenceDatabase Structure of a web application20

Separate servers (servlets/JSP) ApplicationUser Web server JSPsServlets Application server Session beans Entity beans Façade classes Database Structure of a web application21

Separate servers (JSF) ApplicationUser Web server Facelets Managed beans Application server Session beans Entity beans Façade classes Database Structure of a web application22

JAVA BEANS Structure of a web application23

Structure of a web application24 JavaBeans A JavaBean is a Java class that: –has a parameterless constructor (it could have other constructors as well) –is capable of holding state through one or more private instance variables (and if necessary saving it to a persistent store) –implements a method called getX that returns the value of readable property X –implements a method called setX that changes the value of writable property X (has both a setter and a getter for a read/write property) –may also fire, and respond to, events (but that ability is not important for our purposes at the moment)

Enterprise JavaBeans Entity beans Session beans –Stateless –Stateful –Singleton Message beans Dependency injection State management Transaction management Security Pooling Interceptors Structure of a web application25