24
1 Application Servers G22.3033-011 Session 2 - Main Theme Page-Based Application Servers Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences 2 Agenda ColdFusion 5.0- MX 6.1 Environment PHP 4.3.3 Environment XML-Based Application Servers Summary Class Project Overview Readings Assignment #2

g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

1

1

Application Servers G22.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- MX 6.1 EnvironmentPHP 4.3.3 EnvironmentXML-Based Application ServersSummaryClass Project OverviewReadingsAssignment #2

Page 2: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

2

3

Application Servers for Enhanced HTML

(a.k.a., Page-Based Application Servers)

ExamplesMacromedia ColdFusion 5.0 – MX 6.1 ServerMicrosoft IIS with ASPWithEnterprise Pty Ltd Tango 2000/WiTango

http://www.witango.com

etc.

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”

4

The Web Application Platform

Page 3: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

3

5

Rapid Web Application Development

6

System Differentiators

Visual InterDev (ASP)Management of site development processScriptingMacromedia’s Drumbeat or NetObjects’ Fusion can be used as alternative IDEs

ColdFusion Studio 4.5 – MX 2004HTML codingBasic database integrationUltraDev 4 or Fusion can be used as alternative IDE (4.5)Dreamweaver, Flash, Fireworks, FreeHand (MX 2004)

Page 4: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

4

7

Technology

IDE + Application ServerIDE

Creates pages with mixture of HTML and proprietary tags or script codeVisual page creation (textual creation possible as well)

Application ServerEvaluates the code upon user requests and provides HTML pages

8

Tagging v.s. Scripting

ColdFusionEasy tag-oriented dynamic pages for simple tasksScript use when more complex coding is required

arrays, case & switch statements, and error handlingExample

Simple phone directory application: 2 custom tags + 1 SQL statementSame would take 100 lines of ASP code ...

Page 5: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

5

9

Part I

ColdFusion 5.0-6.1 & MX Environment

Also See Session 2 Handouts on:

“ColdFusion CFML Tags, Functions, and Variables”“The ColdFusion Integrated Web Development Environment”

10

The ColdFusion Development Platform

Page 6: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

6

11

ColdFusion Web Applications

12

How ColdFusion Works

Page 7: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

7

13

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.

14

Sample ColdFusion Application

<HTML><HEAD><TITLE>My First Page</TITLE></HEAD><BODY><STRONG>ColdFusion</STRONG><CFSET ProductName = "ColdFusion"></BODY></HTML>

Page 8: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

8

15

Outputting a Variable Value

<HTML><HEAD><TITLE>My First Page</TITLE></HEAD><BODY><STRONG>ColdFusion</STRONG><CFSET ProductName = "ColdFusion"><CFOUTPUT>#ProductName#</CFOUTPUT></BODY></HTML>

16

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>

Page 9: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

9

17

Coldfusion FeaturesRapid Development

Powerful and intuitive tag-based server scripting languageTwo-way visual programming and database toolsRemote interactive debuggingWeb application wizards & tag-based component architectureSource control integrationSecure file and database access via HTTP

18

ColdFusion Rapid Development

Page 10: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

10

19

ColdFusion Server Architecture (5.0)

20

ColdFusion FeaturesScalable Deployment

Multi-threaded service architectureDatabase connection poolingJIT page compilation and cachingDynamic load balancingAutomatic server recovery and fail-over

Page 11: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

11

21

ColdFusion FeaturesOpen Integration

Database connectivity (ODBC, OLE-DB, native database drivers)Embedded support for full text indexing and searchingStandards-based integration (directory, mail, etc.)CORBA and COM+ connectivityOpen extensibility with C/C++

22

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

Page 12: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

12

23

ColdFusion Studio’s IDE

24

ColdFusion Studio’s WorkSpace

Page 13: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

13

25

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)

26

ColdFusion Homesite Editor

HomeSite editorSupports on-the-fly typing validationDTD conformanceBasic syntax checkingCan categorize tag attributes by version and typesCan add custom tags and attributes

Page 14: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

14

27

ColdFusion App Server

Supports clusteringAddresses performance and scalability issues at most levelsSupports ODBC, OLE, and native drivers for Oracle and SybaseAlso supports stored proceduresSupports server load balancing (Bright Tiger Technologies’ ClusterATS) and failover

28

Server Platforms

ColdFusionWindowsSolarisLinux

ASP WindowsUse ChiliSoft for other servers

Page 15: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

15

29

ColdFusion Features Summary

Advanced EditorVisual Database ToolsTwo-way Visual ProgrammingWeb Application WizardsCode Re-UseInteractive DebuggingDynamic Page Quality AssuranceTag Property Inspection

30

ColdFusion Features Summary(continued)

Code SweeperExtensible Tag EditorsCustom WizardsVisual Tool Object ModelCustomizable WorkspaceServer-Side Source ControlShared Project ManagementOne-Step DeploymentR t T D l t

Page 16: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

16

31

ColdFusion 5.0 vs. MX 6.1See

http://www.macromedia.com/software/coldfusion/whitepapers/pdf/6_1/cfmx61_feature_comparison_matrix.pdfhttp://www.macromedia.com/devnet/mx/coldfusion/articles/cfcmethodology.pdf

MX FeaturesSee: http://www.macromedia.com/software/coldfusion/productinfo/overview/

Server Scripting (CFML, XML, JSPs/custom tags)Integrated Application Services (Flash, Web services)Flexible Application DeploymentHigh Performance ArchitectureAdvanced Development Capabilities (CFCs)Enterprise Systems IntegrationAdvanced Server Management

32

Using CFCs As A Façade(keep code that invokes Java objects out of CFML)

See http://www.macromedia.com/devnet/mx/coldfusion/articles/intro_cfcs.html

Page 17: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

17

33

Part II

PHP 4 Environment

34

PHP Technology

Server-side, cross-platform HTML embedded scripting languagePHP is an open source project of the Apache Software FoundationSee http://www.php.net/index2.phpExample (hello.php):<html><head><title>PHP Test</title></head><body><?php echo "Hello World<p>"; ?></body></html>

Page 18: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

18

35

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>";}

?>

36

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><?}?>

Page 19: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

19

37

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.

38

PHP Software

Source and binaries downloadable from:http://www.php.net/downloads.php

Includes CGI binary plus server API versions for Apache, AOLserver, ISAPI and NSAPIMySQL support built-inMany other extensions

Page 20: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

20

39

Part III

XML-Based Application Servers

40

XML Application Server Architecture(HP Bluestone XML Server 1.0/Visual-XML)

.

Page 21: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

21

41

XML Application Server At Work(HP Bluestone XML Server 1.0/Visual-XML).

See Session 2 handout on “XML MOM Application Server Frameworks”

42

XML Application Server At Work(Binary Evolution Velocigen).

Page 22: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

22

43

Part IV

Conclusion

44

SummaryPage-Based Application Servers are either based on HTML tagging or scriptingPage-Based Application Servers are less expensive to use and simpler than Servers for standalone use, and servers with IDEsColdFusion is based on HTML extensions, and supports the development of tag-oriented dynamic pages for simple tasksPHP is a server-side cross-platform HTML embedded scripting languageXML Application Servers are either MOM- or POP-oriented and rely on server-side processing of XML documents

Page 23: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

23

45

ReadingsReadings

Handouts posted on the course web siteExplore the ColdFusion 5.0-6.1/MX and PHP 4.3.3 EnvironmentsRead white papers under technical resources at

ColdFusion, and PHP related whitepapers on vendors’ sites

Review Web/network programming, and HTML

Project Frameworks Setup (ongoing)Apache Web Server (version 1.3.28/2.0.47, www.apache.org)Perl (version 5.8.0, www.perl.org)ColdFusion 5.0-MX 6.1 (www.macromedia.com) PHP 4.3.3

46

Assignment

Assignment:Explore references to Application Server technology (cont.)#2a: Investigate page-based application server development environments. Write a short report that documents your findings and recommendations with respect to selection criteria in support of page-based development environments for application server technology#2b: See homework #2 specification

Page 24: g22 3033 011 c21 - nyu.edu · Tagging v.s. Scripting ... PHP is an open source project of the Apache Software Foundation ... ASP Environment (i.e., IIS with COM+/.Net & ASP)

24

47

Next Session:Page-Based Application Servers (Part II)

ASP Environment (i.e., IIS with COM+/.Net & ASP)Servlets and Servlet EnginesJSPs and JSP EnginesTomCat/JRunCocoon 2/XSPs