1
1
Application ServersG22.3033-011
Session 2 - Main ThemePage-Based Application Servers
Dr. Jean-Claude Franchitti
New York UniversityComputer Science Department
Courant Institute of Mathematical Sciences
2
Agenda
ColdFusion 5.0 EnvironmentPHP 4.0.6 EnvironmentXML-Based Application ServersSummaryClass Project OverviewReadingsAssignment #2
3
Application Serversfor Enhanced HTML
(a.k.a., Page-Based Application Servers)
ExamplesMacromedia ColdFusion 5.0 ServerMicrosoft IIS with ASPWithEnterprise Pty Ltd Tango 2000etc.
Typically less expensive than Servers for standalone use,and servers with IDEsTechnology stays within the familiar HTML confines
See Session 2 Sub-Topic 1 Slides on “HTML Review”
2
4
The Web Application Platform
5
System Differentiators
Visual InterDev (ASP)Management of site development processScriptingMacromedia’s Drumbeat or NetObjects’ Fusion can beused as alternative IDEs
ColdFusion Studio 4.5HTML codingBasic database integrationUltraDev 4 or Fusion can be used as alternative IDE
6
Technology
IDE + Application ServerIDE
Creates pages with mixture of HTML and proprietarytags or script codeVisual page creation (textual creation possible as well)
Application ServerEvaluates the code upon user requests and providesHTML pages
3
7
Tagging v.s. Scripting
ColdFusionEasy tag-oriented dynamic pages for simple tasks Script use when more complex coding is required
arrays, case & switch statements, and error handlingExample
Simple phone directory application: 2 custom tags + 1SQL statementSame would take 100 lines of ASP code ...
8
Part I
ColdFusion 5.0 Environment
Also See Session 2 Handouts on:
“ColdFusion CFML Tags, Functions, and Variables”“The ColdFusion Integrated Web Development Environment”
9
The ColdFusion Development Platform
4
10
ColdFusion Web Applications
11
How ColdFusion Works
12
The ColdFusion Development Process
Write some codeSave it as a page (use .cfm extension)View it in a browserWrite some more codeSave the page againView it in a browseretc.
5
13
Sample ColdFusion Application
<HTML><HEAD><TITLE>My First Page</TITLE></HEAD><BODY><STRONG>ColdFusion</STRONG><CFSET ProductName = "ColdFusion"></BODY></HTML>
14
Outputting a Variable Value
<HTML><HEAD><TITLE>My First Page</TITLE></HEAD><BODY><STRONG>ColdFusion</STRONG><CFSET ProductName = "ColdFusion"><CFOUTPUT>#ProductName#</CFOUTPUT></BODY></HTML>
15
Querying a Data Source
<HTML><HEAD><TITLE>Course List</TITLE></HEAD><BODY><H1>Course List</H1><CFQUERY NAME="CourseList" DATASOURCE="cfsnippets">SELECT CORNUMBER, CORNAMEFROM CourseList</CFQUERY><CFOUTPUT QUERY="CourseList" >#CORNUMBER# #CORNAME#<BR></CFOUTPUT></BODY></HTML>
6
16
Coldfusion FeaturesRapid Development
Powerful and intuitive tag-based server scriptinglanguageTwo-way visual programming and database toolsRemote interactive debuggingWeb application wizards & tag-based componentarchitectureSource control integrationSecure file and database access via HTTP
17
ColdFusion Rapid Development
18
ColdFusion 5.0 Server Architecture
7
19
ColdFusion FeaturesScalable Deployment
Multi-threaded service architectureDatabase connection poolingJIT page compilation and cachingDynamic load balancingAutomatic server recovery and fail-over
20
ColdFusion FeaturesOpen Integration
Database connectivity (ODBC, OLE-DB, nativedatabase drivers)Embedded support for full text indexing andsearchingStandards-based integration (directory, mail, etc.)CORBA and COM+ connectivityOpen extensibility with C/C++
21
ColdFusion FeaturesComplete Security
Integration with existing authentication systems(NT/Win 2000 domains, LDAP directory servers)Advanced access control to files and data sourcesSupport for existing database securityServer sandbox securitySupport for Web server authentication, security,and encryption
8
22
ColdFusion Studio’s IDE
23
ColdFusion Studio’s WorkSpace
24
ColdFusion Studio
Supports other languages than HTMLHandled Device Markup LanguageSynchronized Multimedia Integration Language
Visual Tool Markup LanguageSupport the inclusion of tag editing dialogsSupport the addition of XML capabilities
CSS integration is clumsy (separate editor)Link management utility limited to page by page(no site diagramming)
9
25
ColdFusion Homesite Editor
HomeSite editorSupports on-the-fly typing validationDTD conformanceBasic syntax checkingCan categorize tag attributes by version andtypesCan add custom tags and attributes
26
ColdFusion App Server
Supports clusteringAddresses performance and scalability issues atmost levelsSupports ODBC, OLE, and native drivers forOracle and SybaseAlso supports stored proceduresSupports server load balancing (Bright TigerTechnologies’ ClusterATS) and failover
27
Server Platforms
ColdFusionWindowsSolarisLinux
ASPWindowsUse ChiliSoft for other servers
10
28
ColdFusion Features Summary
Advanced EditorVisual Database ToolsTwo-way Visual ProgrammingWeb Application WizardsCode Re-UseInteractive DebuggingDynamic Page Quality AssuranceTag Property Inspection
29
ColdFusion Features Summary(continued)
Code SweeperExtensible Tag EditorsCustom WizardsVisual Tool Object ModelCustomizable WorkspaceServer-Side Source ControlShared Project ManagementOne-Step Deployment
30
ColdFusion Features Summary(continued)
Remote Team Development
11
31
Part II
PHP 4 Environment
32
PHP Technology
Server-side, cross-platform HTML embedded scriptinglanguagePHP is an open source project of the Apache SoftwareFoundationSee http://www.php.net/index2.phpExample (hello.php):<html><head><title>PHP Test</title></head><body><?php echo "Hello World<p>"; ?></body></html>
33
PHP Examples
Showing variables<?php echo $HTTP_USER_AGENT; ?>
Getting a list of web server variables<?php phpinfo(); ?>
Checking for Internet Explorer<?phpif(strstr($HTTP_USER_AGENT,"MSIE")) {echo "You are using Internet Explorer<br>";}?>
12
34
PHP Examples(continued)
Jumping in and out of PHP mode<?phpif(strstr($HTTP_USER_AGENT,"MSIE")) {?><center><b>You are using Internet Explorer</b></center><?} else {?><center><b>You are not using Internet Explorer</b></center><?}?>
35
PHP Examples(continued)
Flexible HTML Forms HandlingTypical HTML form:
<form action="action.php" method="post">Your name: <input type="text" name="name">You age: <input type="text" name="age"><input type="submit"></form>
Action.php is as follows:
Hi <?php echo $name; ?>.You are <?php echo $age; ?> years old.
36
Part III
XML-Based Application Servers
13
37
PHP Software
Source and binaries downloadable from:http://www.php.net/downloads.php
IncludesCGI binary plus server API versions for Apache,AOLserver, ISAPI and NSAPIMySQL support built-inMany other extensions
38
XML Application Server Architecture(HP Bluestone XML Server 1.0/Visual-XML).
39
XML Application Server At Work(HP Bluestone XML Server 1.0/Visual-XML).
See Session 2 handout on “XML MOM Application Server Frameworks”
14
40
XML Application Server At Work(Binary Evolution Velocigen).
41
Part IV
Conclusion
42
SummaryPage-Based Application Servers are either based on HTMLtagging or scriptingPage-Based Application Servers are less expensive to use andsimpler than Servers for standalone use, and servers withIDEsColdFusion is based on HTML extensions, and supports thedevelopment of tag-oriented dynamic pages for simple tasksPHP is a server-side cross-platform HTML embeddedscripting languageXML Application Servers are either MOM- or POP-orientedand rely on server-side processing of XML documents
15
43
ReadingsReadings
Building Application Servers: Part I, Chapter 2Handouts posted on the course web siteExplore the ColdFusion 5.0 and PHP 4.0 EnvironmentsRead white papers under technical resources at
http://www.bluestone.com/products/default.htmAlso read ColdFusion, and PHP related whitepapers on the vendor sites
Review network programming, and HTML (related JFCs)
Project Frameworks Setup (ongoing)Apache Web Server (version 1.3.20, www.apache.org)Perl (version 5.x, www.perl.com)ColdFusion 5.0 (www.macromedia.com)PHP 4.0.6
44
AssignmentAssignment:
Explore the textbooks’ references to Application Servertechnology (continued)#2a: Investigate page-based application serverdevelopment environments. Write a short report thatdocuments your findings and recommendations withrespect to selection criteria in support of page-baseddevelopment environments for application servertechnology#2b: See homework #2 specification
45
Next Session:Page-Based Application Servers (Part II)
ASP Environment (IIS with COM+, and ASP)ServletsJSPs and TomCatXSPs