Enterprise/Server-side Java Slide edited by NAS Introduction Welcome! As usual the module lasts for 12 weeks with the last.

Slides:



Advertisements
Similar presentations
DT228/3 Web Development WWW and Client server model.
Advertisements

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.
DT228/3 Web Development Introduction to Java Server Pages (JSP)
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Technical Architectures
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
J4www/jea Week 3 Version Slide edits: nas1 Format of lecture: Assignment context: CRUD - “update details” JSP models.
Fundamentals, Design, and Implementation, 9/e Chapter 14 JDBC, Java Server Pages, and MySQL.
BICS546 Client/Server Database Application Development.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Lecture 2 Web application architecture. Themes Architecture : The large scale structure of a system, especially a computer system Design choice: The need.
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
An Overview of Database Access on the Web An Overview of Database Access on the Web Using ASP and Microsoft Database Technology Sheffield Hallam University.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
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.
DT211/3 Internet Development Application Internet Development Application.
Introduction to Web Interface Technology (CSE2030)
Introduction to Web Based Application. Web-based application TCP/IP (HTTP) protocol Using WWW technology & software Distributed environment.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
Introduction to Web Interface Technology (CSE2030)
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
INTRODUCTION TO WEB DATABASE PROGRAMMING
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
CIS 285 ROBINSON WINTER 2005 CIS 285 Web Application Development with Java CIS 285 Sinclair Community College Instructor: Mary Robinson.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
Jonathan Westlake, ed: Nic Shulver JSP, Structure and JavaBeans JSP models Assignment context “Register as a member of the site/show member details/update.
Introduction to Internet Programming (Web Based Application)
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
M1G Introduction to Database Development 6. Building Applications.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
® IBM Software Group © 2007 IBM Corporation J2EE Web Component Introduction
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
Website Design Lecture 1. Outline Introduction to the module Outline of the Assessment Schedule Lecture Static XHTML, client side and server side Why.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
1 Welcome to CSC 301 Web Programming Charles Frank.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Web Programming Brian Toone 8/27/2014. Outline for today 1.Understanding the architecture of the web 2.Overview of programming languages – Client-side.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
MC365 Application Servers, Servlets, and Java Server Pages (JSP’s): Tomcat.
14 June 2004System-wide Services: User InterfaceRich Moeser 1 EVLA Overall Software Design Final Internal Review System-wide Services: User Interface.
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
INTRODUCTION TO WEB APPLICATION Chapter 1. In this chapter, you will learn about:  The evolution of the Internet  The beginning of the World Wide Web,
Enterprise PHP - Introduction Enterprise Client-Server Development with PHP Nic Shulver, FCES, Staffordshire University A fifteen credit module based on.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
Web Technologies Lecture 8 Server side web. Client Side vs. Server Side Web Client-side code executes on the end-user's computer, usually within a web.
Java for networking Module Introduction Data Communications Communication architecture Application.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
CS562 Advanced Java and Internet Application Introduction to the Computer Warehouse Web Application. Java Server Pages (JSP) Technology. By Team Alpha.
OOSSE Week 7 Java Server Pages Format of lecture: Introduction What are Java Server Pages? (JSPs) What do you need to run JSPs? Demo of an example of a.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 21 Java Servlets Wed. 11/22/00 based on material.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Distributed System Using Java 2 Enterprise Edition (J2EE)
Lecture 1: Multi-tier Architecture Overview
Presentation transcript:

Enterprise/Server-side Java Slide edited by NAS Introduction Welcome! As usual the module lasts for 12 weeks with the last week being a revision week. For assessment details let us refer to the module web page. Module leader is Nic Shulver

Enterprise/Server-side Java Slide edited by NAS Our Contact Point The course schedule details the subject we will be teaching each week as well as the practicals. Books! - so many to choose from - some quite awful - some good. A list of books can be found on the Module Information page. You do not have to buy a book - plenty in the library.

Enterprise/Server-side Java Slide edited by NAS Other advice Please see or tutors about any aspect of the module during the 12 weeks. If you have a problem understanding some of the material, then please ask tutors! The slides that follow put “server-side Java for enterprise” in context Note emphasis on key words (orange highlight)

Enterprise/Server-side Java Slide edited by NAS Java Server Pages Format of lecture: Introduction What are Java Server Pages? (JSPs) What do you need to run JSPs? Demo of an example of a JSP in action Tutorial work will get you going straight away on understanding the architecture and running your first JSP

Enterprise/Server-side Java Slide edited by NAS Overview/history - 90’s Early web users were limited to static HTML. Useful for presenting company information often in a hierarchical manner. Little or no interaction with the user. Java applets addressed this problem enabling additional code to be downloaded but still a problem of building customised information. Dynamically generated HTML using the Common Gateway Interface (CGI) was also a proposed solution.

Enterprise/Server-side Java Slide edited by NAS Year 2000 onwards CGI and generated HTML was the forerunner for server-side Java based techniques. Java Servlets. JavaServer Pages (JSP). Component-based computing (Enterprise JavaBeans). Active Server Pages (ASP, ASP.net). Personal Hypertext Preprocessor (PHP)

Enterprise/Server-side Java Slide edited by NAS Evolution of Applications One-tier - mainframe based/dumb terminal/central application source. Also modern standalone/PC/Mini computers/multi copy of application. What we might think of as a simple, “normal” application.

Enterprise/Server-side Java Slide edited by NAS Evolution of Applications Two tier - client-server - distributed part of the application on the client (GUI) and part on the server. Early versions of client-server required installation of GUI and business logic. Recently, Java applets downloadable on demand. With server-side servlets and JSP, no download and the browser is used as the interface - this is a good solution!

Enterprise/Server-side Java Slide edited by NAS Evolution of Applications Three tier/n-tier - user interface(UI) layer; the business layer(BL) and the database layer(DL) UI - presentation of information, browsers such as Firefox or Internet Explorer on the client BL - logic of procedures about the business, best done on a server [why?] DL - where the data is stored - usually a relational database but could be an object oriented database

Enterprise/Server-side Java Slide edited by NAS Benefits of Web-Enabled n-tier Applications Web applications enable ‘things’ to be done from a web browser - e.g. online banking. Run from anywhere – no installation fee, may incur network communication costs of course. Cost reduction: Browser based interface is easy to use - little training required. Development costs lower as using a standard interface. No permanent installation on the user’s machine. Use of open standards: Maintenance easier. Enhancement of applications easier.

Enterprise/Server-side Java Slide edited by NAS Web Enabling Techniques How to develop web-based applications? How can a server process multiple requests? Need a fast response! Scalability - HTTP protocol - works in a stateless request-response mode - means it does not bind a server to a client for an inordinate amount of time. Some techniques which can be used to concurrently satisfy thousands of requests.

Enterprise/Server-side Java Slide edited by NAS Stuff that we need We are going to spend the next four weeks looking at Java Server Pages (JSPs). Just like when using ASP or PHP, we need a server that understands our JSP code. We need an HTTP server which supports JSP. We will use server software called “Tomcat” Tomcat is running on one of our servers: fcet11 You can also download Tomcat for home use and run a server on your home PC

Enterprise/Server-side Java Slide edited by NAS What are JSPs? They are HTML documents that are interleaved with Java which provides the dynamic content. JSPs are server-side - they accept a request and generate a response (an HTML document). JSP is the next generation on from Servlets - an extension of Servlets with more power and flexibility. JSP is the equivalent of Microsoft’s Active Server Pages (ASP) technology and Zend's PHP environment.

Enterprise/Server-side Java Slide edited by NAS JSPs… Servlets… ??? JSPs are an extension of Java Servlet technology. JSPs automatically generate Servlets which are Java class files run on the server. It is possible to code your own Servlets and include them in with your JSP web application. A useful source of information for JSPs and Servlet technologies is the Java Server Pages homepage at Sun:

Enterprise/Server-side Java Slide edited by NAS Facts about JSPs All JSPs have a file extension of.jsp JSP is meant to be easier than Servlets. Syntax of a typical JSP is on the next two slides. Over the next four weeks we will look at the syntax of JSPs in depth.

simpleguestlist.jsp An Example of a Simple JSP Accessing a database Model A Listing Of Guests Firstname Lastname

<% try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); Connection conn = DriverManager.getConnection("jdbc:odbc:GuestBook"); Statement statement = conn.createStatement(); String sql = "SELECT * FROM GuestBook"; ResultSet rs = statement.executeQuery(sql); while (rs.next()) { %> <% } %> <% if (statement != null) statement.close(); if (conn != null) conn.close(); } catch (Exception e) {out.print(e);} %>

Enterprise/Server-side Java Slide edited by NAS Kit required What do you need to develop and run JSPs? JDK (Java Development Kit and runtime) Tomcat HTTP server With database interaction we need a database – we will use Access for convenience but MySQL is also of interest

Enterprise/Server-side Java Slide edited by NAS Demo of a JSP This example is a JSP which uses a DSN-less connection to the GuestBook database The application model is essentially a JSP connecting to a database It renders dynamically to the user’s browser the contents of a table As the table changes the content of the page will reflect this change – hence it dynamic – built at each request

Enterprise/Server-side Java Slide edited by NAS Example

Enterprise/Server-side Java JSP Translation process.jsp file (HTML interleaved with Java) HTTP Server TOMCAT Request:Browser page link to call.jsp(either via locator or a link on an HTML input page Response: HTML for output sent from Server Browser Response HTML document Request: JSP translated into a Servlet.java file and then compiled into a Servlet class Backend database usually on a separate database server Query for data content Browser TierServer TierDatabase Tier

Enterprise/Server-side Java Slide edited by NAS Result Returned

Enterprise/Server-side Java Slide edited by NAS Summary We have established that JSP represents a technology that can be used for dynamic web applications The market for this type of technology is well established (J2EE market) JSP demands some programming skills but is more and more seen as an integration technology with can dovetail with technologies such as XML

Enterprise/Server-side Java Slide edited by NAS Summary We used an HTTP server which supports JSP If you were choosing an ISP and wished to run JSP then you would need to check that they support JSP We highlighted the features of a JSP A.jsp file is essentially HTML with Java code inserts When the.jsp file is called via a browser a.java file is created to represent Servlet source code and then the.java file is compiled into a bytecode file with a.class extension. The compilation is only done once - subsequent calls to the JSP use the already compiled.class file