1
Web Pages Web Pages
2
Static Web Pages Static Web Pages
Htm and Html pages are static
SHTML SHTML
Pages tagged with "shtml" reveal that
"Server Side Includes" are being used on the server
With SSI a page can contain tags that indicate that another file should be inserted in place of the tag in the existing page
<!--#include virtual="/USIS/templates/ssi1.html"-->
www.mtllive.com 2
4
SHTML SHTML
Server side include
5
SHTML SHTML
6
SHTML SHTML
So a page is lifted off the server's disk and the server makes all the
substitutions indicated by SSI
Then it sends the final page to the client
This approach makes it very easy to
change things like headers and footers
on pages across an entire site
7
Dynamic Web Pages Dynamic Web Pages
Pages that contain content which changes automatically i.e. without the web page creator editing it manually
8
ASP ASP
Active Server Pages (ASP) is a Microsoft technology that enables dynamic web pages using ActiveX scripting -- usually VB Script
A web page can contain Visual Basic code that the server executes when it lifts a page off the disk
This code can do just about anything:
read databases
run other programs
custom format pages based on the user's ID, etc.
ASP ASP
www.mtllive.com 4
10
PHP PHP
PHP Hypertext Preprocessor is a server side embedded scripting language (like ASP) used to create dynamic web pages
PHP has similar functionality to ASP but is Open Source and cross-platform
11
PHP PHP
12
Cold Fusion Cold Fusion
Created by Allaire Corporation who merged with Macromedia in 2001
Includes a server and a development toolset designed to integrate databases and Web pages
Cold Fusion Web pages include tags written
in Cold Fusion Markup Language (CFML) that
simplify integration with databases and avoid
the use of more complex languages like C++
13
JSP JSP
JSP Java Server Page
Extension to the Java servlet technology that was developed by Sun
Like ASP, JSPs have dynamic scripting capability that works in tandem with HTML code, separating the page logic from the static elements to help make the HTML more functional (i.e. dynamic database queries)
Like PHP, JSPs are not restricted to any specific platform or server
14
NSF NSF
The .nsf extension is used on sites powered by Lotus's Domino server
This server takes standard Lotus Notes databases and dynamically converts the content of those databases into web pages when the page is requested
The site's pages can change throughout the day depending on the content of the databases
Server Side Scripting Server Side Scripting
ASP, JSP, Cold Fusion, PHP, etc. are all server side scripts
These scripts reside either in the HTML document or in another document pointed to from the HTML document
The web server interprets the scripts
when the web page is requested
www.mtllive.com 6
16
Server Side Applications Server Side Applications
Common Gateway Interface (CGI) defines a standard interface between a Web server and an independent application
CGI is very general because the application is completely decoupled from the Web server
Thus the application must be launched independently for each request
There is no convenient place to store state information between web requests
17
CGI CGI
18
CGI CGI
CGI scripts can be written using many different languages e.g.
Perl - Interpreted high-level programming language with good process, file and text manipulation facilities
Java
C++
C
19
CGI Problems CGI Problems
All server run programs such as CGI must overcome the following problems:
Starting and stopping the application
Passing data from the client to the application
Passing data from the application to the client
Status and error reporting
Passing configuration information to the application
Passing client and environment information to the application
20
Server Side vs. Client Side Server Side vs. Client Side
All of the dynamic web page
technologies that we have seen so far have been server based
The server runs the script or application and does all the work
The code is not generally visible to the client
The client gets sent formatted HTML (such as database search results, images etc)
Client Side Scripting Client Side Scripting
Client-side Scripts are programs that run inside an Internet browser on the client machine
Small programs in the source form of an interpreted language are embedded directly into the Web page
When the browser loads the page, the
browser has a built-in interpreter that
reads the script code it finds in the page
and runs it
www.mtllive.com 8
22
Client Side Scripting Client Side Scripting
Three main client-scripting languages:
JavaScript
VBScript
JScript
Powerful for rapid development of simple applications
Lack of compile- time checks makes them difficult to use for larger applications
23
JavaScript JavaScript
24
Plug-ins Plug-ins
An add-on software application that permits software developers to add new capabilities to the browser using a defined programming interface
Provides the ability to display a new
type of data using the browser itself
rather than starting a separate
application
25
Plug-ins Plug-ins
26
Flash Flash
Flash is a 2D vector graphics application, enabling web based interactive animation
Flash is now the standard format for rich animation on the Web
Flash Example
Java Java
Object oriented programming language
Includes specification for virtual machine which forms the execution environment
When compiled to Java byte codes, should run on any instantiation of a Java virtual machine
However, possible problems with different
versions
www.mtllive.com 10
28
Java Applets Java Applets
Browsers such as Netscape, Internet Explorer, etc, include a Java virtual machine
Java applets are downloaded from server and run on the browsers virtual machine
Even though they run on the client, Java applets are restricted so that they cannot damage that machine
29
ActiveX ActiveX
Developed by Microsoft, ActiveX
controls are software objects referenced by a web page
These can be automatically downloaded and installed on a users machine
ActiveX controls have full access to the clients system and so use digital signatures to authenticate their source
30