Web documents types 1. 2 Three basic types of web documents Static. A static web document resides in a file that it is associated with a web server. The.

Slides:



Advertisements
Similar presentations
Java Script Session1 INTRODUCTION.
Advertisements

DT228/3 Web Development WWW and Client server model.
Languages for Dynamic Web Documents
Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Server-Side vs. Client-Side Scripting Languages
1 Chapter 12 Working With Access 2000 on the Internet.
Chapter Concepts Review Markup Languages
ASP Tutorial. What is ASP? ASP (Active Server Pages) is a Microsoft technology that enables you to make dynamic and interactive web pages. –ASP usually.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
DT211/3 Internet Development Application Internet Development Application.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Introduction to Web Interface Technology (CSE2030)
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.
Introduction to Web Interface Technology (CSE2030)
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
CE80N Introduction to Networks & The Internet Dr. Chane L. Fullmer UCSC Winter 2002.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Chapter 6: Hostile Code Guide to Computer Network Security.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
INTRODUCTION TO WEB DATABASE PROGRAMMING
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
HTTP; The World Wide Web Protocol
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.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
16-1 The World Wide Web The Web An infrastructure of distributed information combined with software that uses networks as a vehicle to exchange that information.
CPS120: Introduction to Computer Science The World Wide Web Nell Dale John Lewis.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Chapter 6 Server-side Programming: Java Servlets
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
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.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
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.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
FALL 2004CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics (Web technologies: HTTP, CGI, Java applets; Middleware)
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
World Wide Web has been created to share the text document across the world. In static web pages the requesting user has no ability to interact with the.
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.
WWW and HTTP King Fahd University of Petroleum & Minerals
Web App vs Mobile App.
Database Driven Websites
Chapter 27 WWW and HTTP.
Web documents types.
CSI 4118 – UNIVERSITY OF OTTAWA
Presentation transcript:

Web documents types 1

2 Three basic types of web documents Static. A static web document resides in a file that it is associated with a web server. The author of a static document determines the contents at the time the document is written. Because the contents do not change, each request for a static document results in exactly the same response. Dynamic. A dynamic web document does not exist in a predifined form. When a request arrives the web server runs an application program that creates the document. The server returns the output of the program as a response to the browser that requested the document. Because a fresh document is created for each request, the contents of a dynamic document can vary from one request to another. Active An active web document consists of a computer program that the server sends to the browser and that the browser must run locally. When it runs, the active document program can interact with the user and change the display continously.

3 Advantages and disavantages of each document type Static Advantages: simplicity, reliability and performance. The browser can place a copy in a cache on a local disk. Disavantages : inflexibility,changes are time consuming because they require a human to edit the file. Dynamic Advantages : ability to report current information (current stocks prices, current weather conditions, current availability of tickets for a concert). Because both static and dynamic documents use HTML, a browser does not know whether the server extracted the page from a disk file or obtained the page dynamically from a computer program. Disavantages : increased cost and, like a static document, a dynamic document does not change after a browser retrieves a copy. Thus, information in a dynamic document begins to age as soon as it as been sent to the browser(stock prices). Server push. The server runs the programs periodically and sends the new document to the browser

4 Active Advantages : ability to update information continously. For example, only an active document can change the display quicly enough to show an animated immage. More important, an active document can access sources of information directly and update the display continously. For example, an active document that dispays stock prices can continue to retrieve stock information and change the display without requiring any action from the user. Disavantages :because an active document can run on an arbitrary computer instead on a server, the program must be vritten to avoid depending by particular features of a computer. An active document is a potential risk because the document can export or import information.

5 Active documents require more sophisicated browser software (interpreters, virtual machines,..) and a powerful computer system to run the broser. The active documents are normally written in source code. The compiler produces an executable form that is sent to the browser. In the case of Java programs the source code is translated in the bytecode format, sent to the browser and locally executed by the java interpreter (JVM).

6 Implementation of dynamic documents 1)The server program must be extended so it is capable of executing a separeted application program that creates a document each time a request arrives. 2)A separeted application program must be written for each dynamic document. 3)The server must be configured so it knows which URLs correspond to dynamic documents and which correspond to static documents. For each dynamic document, the configuration must specify the application program that generates the document.

7 CGI (Common Gateway Interface) A widely used technology for building dynamic Web documents is known as the Common Gateway Interface(CGI), originally develloped by the National Center for Supercomputer Applications (NCSA). The CGI standard specifies how a server interacts with an application program that implements a dynamic document. The application is called a CGI program. CGI does not specifies a particular programming language. A programmer can choose an appropriate language for each document(C,C++, Perl, shell di Unix..). The CGI programs are placed in a directory called bin. The output of a CGI program may be a HTML program, but the standard permits CGI applications to generate arbitrary document types (plain text or a digital image). The standard allows to place a header that describes the document type.

8 After it runs a CGI program, a server examines the header before returning the document to the browser that issued the request. For example, a header that consists of the line: content- type: text/html Followed by a blank line specifies that the output is a HTML document The server sends the HTML documents to the browser by using HTTP protocol.

9 Parameters A CGI program can be parameterized. A server can pass arguments to the program whenever the program is invoked. A single program can to settle a set of dynamic documents that differs only in minor details. Values for the parameters can be supplied by the browser by inserting a suffix in the URL sent to the server When a request arrives, the server divides the URL in the request into twp parts: a prefix that specifies a particular document and a suffix that contains additional information. If the prefix of the URL corresponds to a CGI program, the server invokes the program and passes the suffix of the URL as an argument. Syntactically, a question mark (?) separates the prefix from the suffix

10 Server-side scripting thecnologies A CGI program must generate an entire page, even if a few lines of HTML differ for each generation. In many instances, the bulk of a dynamic page remains the same for each occurence. (stock quote, only the company name and current stock price need to be inserted dynamically; the heading and format information alwais remain the same). The server has a built-in interpreter that can make small modifications to a page as needed. The stored form of the page, which is known as a template or skeleton, contain a mixed of conventional HTML and scripting information. The interpretes allows conventional HTML to pass through unchanged, and replaces the scripting information with the results of interpreting the script

11 Server side scripting thechnologies ASP (Active Server Pages). Dynamic page technology from Microsoft. The scripting information is written in the Visual Basic and the interpreter is closely integrated with Microsoft web server, Internet Information Server (IIS) For i=1 To 10 Response.Write i & “ “ Next

12 It is called by the client through the URL: The result, server side, is: html> The HTML page is sent to the browser. The code could be executed client- side if a visual basic interpreter is present on the browser.

13 JSP (Java Server Pages) Is a dynamic page technology that it intended to be platform-indipendent Pages contain embedded scripting code written in the Java programming language. PHP (Perl Helper Pages) Perl programming language. Coldfusion It is a dynamic page thecnology used to embed SQL database queries in pages. When a server handles such a page, the interpreter sends each SQL query to a database system, converts the result to HTML and replaces the query

14 a dynamic document generated in JavaScript for( i=1 ; i<=10; i++1) document.write (i+ “ “);

15 Applet Java uses the term applet to describe active document program and to distinguish active documents from conventional computer programs. Ex: import java.applet,*; import java.awt,*; public class contaclick extends Applet { int counter ; Textfield; public void init( ) { counter=0;; add (new Button (“clicca qui”); text= new TextField (*il pulsante non è stato ancora premuto)”; text.setEditable(false); add (testo); }

16 public boolean action (Event e, Object arg) { if ((Button e.target).getLabel() = = “Clicca qui”) { counter+=1 text.set Text(*il pulsante è stato premuto”+ contatore+”volte.”); } return true; }

17 Applet execution bbb.class rappresents a file that must be acquired from the server and executed on the browser. An applet tag is inserted on a HTML document. The tag is constituted of two parts, respectively called codebase and code.. When the browser reads the applet tag, calls the server and a copy of the file bbb.class is moved to it. Then an object of the bbb class is created and its init method is called.