Server Side Web Technologies: Part 2

Download Report

Transcript Server Side Web Technologies: Part 2

Outline
IS400: Development of Business Applications on the Internet
Fall 2004
Instructor: Dr. Boris Jukic
Server Side Web
Technologies: Part 2
Server Side Technologies: Java Server Technologies

Java server technologies such as J2EE, JSP, and servlets

J2EE: Short for Java 2 Platform Enterprise Edition. J2EE is a platformindependent, Java-centric environment from Sun for developing,
building and deploying Web-based enterprise applications online. The
J2EE platform consists of a set of services and protocols that provide
the functionality for developing multitiered, Web-based applications.

Some of the key features and services of J2EE:
–
At the client tier, J2EE supports pure HTML, as well as Java applets or
applications. It relies on Java Server Pages and servlet code to create
HTML or other formatted data for the client.
Server Side Technologies: Java Server Technologies

JSPs have dynamic scripting capability that works in tandem
with HTML code, separating the page logic from the static
elements -- the actual design and display of the page

JSPs are not restricted to any specific platform or server. The
concept of JSP7 was originally created as an alternative to
Microsoft's ASPs (Active Server Pages).
Server Side Technologies: Java Server Technologies

Enterprise JavaBeans (EJBs) are remotely accessible components that
provide basic services to any Java application such as:
–
–
–
“sandbox” protection
Memory management
Concurrency management

An EJB server provides these functions in the “background”. These
services are transparent to the author.

Java Database Connectivity (JDBC), which is the Java equivalent to
ODBC, is the standard interface for Java applications to interact with
databases.
"Java is language-specific and platform-independent, and dot-NET is language-independent and platform-specific."
Server Side Technologies: CGI/Perl



CGI: Common Gateway Interface, a specification for
transferring information between a World Wide Web server and
a CGI program.
A CGI program is any program designed to accept and return
data that conforms to the CGI specification. The program could
be written in on eof many programming language, including C,
Perl, Java, or Visual Basic
Some servers allow your CGI programs to be anywhere in your
web directories, so long as the file name ends in ".cgi". Others
require you to put them only in the "/cgi-bin" directory
Server Side Technologies: CGI/Perl

Data Path of Typical CGI application
Written in Perl or
other programming
language
Server Side Technologies: CGI/Perl


Perl is a parsing language with specialized text processing
capabilities that are useful for creating interactive web pages
As in JavaScript no explicit data declaration is needed
–

Variable is created when encountered by interpreter in the code
It Environment Variables in perl contain information about the
execution environment in which a script is being run such as
–
–
–
–
Web browser type
Web host type
Type of HTTP connection
This knowledge can be used to generate specific version of the web
pages depending on the client-server connection
1
#!C:\Perl\bin\perl
2
# Fig. 25.11: fig25_11.pl
3
# Program to display CGI environment variables.
Outline
4
5
use CGI qw( :standard );
6
7
$dtd =
8
"-//W3C//DTD XHTML 1.0 Transitional//EN\"
9
fig25_11.pl
(1 of 2)
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
10
11 print( header() );
12
13 print( start_html( { dtd => $dtd,
14
title => "Environment Variables..." } ) );
15
16 print( "<table style = \"border: 0; padding: 2;
17
font-weight: bold\">" );
18
19 print( Tr( th( "Variable Name" ),
20
th( "Value" ) ) );
21
22 print( Tr( td( hr() ), td( hr() ) ) );
23
24 foreach $variable ( sort( keys( %ENV ) ) ) {
25
26
print( Tr( td( { style => "background-color: #11bbff" },
$variable ),
27
28
td( { style => "font-size: 12pt" },
$ENV{ $variable } ) ) );
29
30
31
print( Tr( td( hr() ), td( hr() ) ) );
32 }
33
34 print( "</table>" );
35 print( end_html() );
fig25_11.pl
(2 of 2)
Outline
Server Side Technologies: ColdFusion



Proprietary software package consisting of the
markup language interpreter and administrator
software
It can be used for form processing and validation but
its main strength is in database interaction and query
processing through the web
Much of functionalities of ColdFusion are available in
PHP
Server Side Technologies: PHP




PHP (Personal Home Page) Hypertext Preprocessor
Used by more than 13 million domains
Open source
Multi-Platform support
–

Supports a large number of database platforms
–

Versions exist for Windows, Unix and Linux
MySQL most popular DB platform for working with PHP
PHP code is embedded directly into HTML documents using
the scripting delimiters: <?php and ?>