Typically use .cgi extension regardless of programming language
Run on the server, with Web page delivered to browser
Some newer languages (Visual Basic, Java) being used for this purpose
.asp, .jsp, .cfm, .php extensions are for newer ways of handling programs run on server with results delivered to browser
ASP, JSP, CFM, PHP pages are basically HTML files with some embedded scripting (like JavaScript)
But, this scripting is run by server (unlike JavaScript)
CGI, ASP, JSP, CFM, PHP pages may not be cached -- can be real annoying if just going back to look at page looked at seconds ago
ASP is HTML page that includes one or more scripts processed on a Microsoft Internet Information Server (IIS) Web server before the page is sent to the user
Typically, the script in the Web page at the server uses input received as the result of the user's request for the page to access data from a database
Builds or customizes the page before sending it to the client
Create an ASP file by including a script written in VBScript (subset of Visual Basic) or JScript in an HTML file
ASP is powerful at database handling because of database access technology ActiveX Data Objects (ADO). Easy to connect Website with database.
Guest Name
<% Response.Write(guestname)%>/TD>
Email
<% Response.Write(emailaddr)%>
Homepage URL
<% Response.Write(url)%>/TD>
Message
<% Response.Write(message)%>/TD>
Different from Java applets that run on the browser
...
Thanks for ordering
<%= request.getParameter("title") %>
...
Welcome to Our Store
Welcome,
<% out.println
(Utils.getUserNameFromCookie(request)); %>
To access your account settings, click
here.
Simple, powerful alternative to Perl and other CGI technologies
Cold Fusion is application that runs on Web server
Whenever Cold Fusion (.cfm) page requested, Cold Fusion Application Server executes script or program page contains
Cold Fusion is programming language
Cold Fusion makes interacting with database (Sybase, Oracle, MySQL, SQL, or Access) simple
Uses standard Structured Query Language (SQL) on Web pages
Web applications can easily retrieve, store, format, and present information dynamically
Tag Based -- CFML (Cold Fusion Markup Language) much like HTML
Integrates technologies -- CF tag <CFFORM> will automatically build all JavaScript code to verify required fields before form submits
Cold Fusion designed to build complex, high traffic web sites
search.html
<H2>Search Page</H2>
Search for an employee by Last Name
<P>
<FORM ACTION=results.cfm METHOD=GET>
<INPUT TYPE=TEXT NAME=lname>
<INPUT TYPE=SUBMIT>
</FORM>
results.cfm
<!---Set Data Source Name--->
<CFSET DSN=EmpDbase>
<!---Get records from the database --->
<CFQUERY DATASOURCE='#DSN#'
NAME='GetRecords'>
select LastName, FirstName, Department
from employee
where LastName like '%#lname#%'
</CFQUERY>
<!---Output results--->
<H2>Search Results</H2>
<CFOUTPUT QUERY="GetRecords"
STARTROW=1 MAXROWS=100>
#GetRecords.CurrentRow# #FirstName#
#LastName# #Department#
<BR>
</CFOUTPUT>
(Much of the above about Cold Fusion is adapted from ColdFusionHub.com and is used with permission.)
PHP used primarily on Linux Web servers
Earliest versions called "Personal Home Page Tools" -- now generally just referred to by initials PHP (like KFC)
PHP script (similar syntax to Perl or C) enclosed within PHP tags and embedded within Web page along with HTML
Before the page is sent to a user that has requested it, Web server calls PHP to interpret and perform the operations called for in the PHP script
An HTML page that includes a PHP script is typically given a file name suffix of ".php" ".php3," or ".phtml"
PHP's strength lies in its compatibility with many types of databases
PHP can talk across networks using IMAP, SNMP, NNTP, POP3, or HTTP
Welcome to Our Store
The information on this page was
last changed
$last_modified = filemtime("store.html");
print(date("m/j/y h:i", $last_modified));
?>
...