Application Server Technologies Overview

Before we discuss the pros and cons of the various application technologies, let's clarify some terminology. Application server technology refers to the overall server-side system for communicating with data sources and other servers, including Web and mail servers. Some examples of application technologies are ASP, ColdFusion, PHP, and JSP. Application server technologies are also referred to as server models. An application server is a particular piece of software that implements an application server technology; Apache Tomcat, BEA WebLogic, and IBM Websphere are application servers that run JSP.

You can choose from a number of application technologies, but only a few have achieved prominence. In some situations, the choice may have already been made for you if you're working for a client who has an application server in place. Some application server technologies, such as ASP, allow you to write code in more than one language; ASP supports both VBScript and JScript (another name for JavaScript). Because server-side coding is fairly involved, many Web developers specialize in one or two application servers in a specific language.

Dreamweaver offers native support for five server technologies and several language variations: ASP (VBScript and JavaScript), ASP.NET (C# and Visual Basic), ColdFusion, PHP, and JSP.

ASP

ASP is a Microsoft technology supported by a range of Windows systems, including Windows NT, Windows 2000, and Windows XP Professional servers running Internet Information Server/Services (IIS) 4.0 and higher. This application technology is fairly popular partly due to the widespread availability of ASP on development systems through the Personal Web Server (PWS). You'll find PWS capability on Windows 98, Windows NT Workstation, and Windows 2000 Professional. ASP has proven so popular that a non-Microsoft variation is now available from Sun Microsystems; originally called Chili!Soft ASP and now termed Sun ONE Active Server Pages, this application server makes it possible to run ASP pages on Sun Solaris, Linux, HP-UX, and IBM AIX servers.

ASP uses code marked with angle bracket and percent sign combinations, like this:

 
 <% Response.Write("Hello World") %> 
 

Because the Response.Write() function which outputs whatever is in the parentheses is so frequently used, you'll also see this shorthand method of coding that uses an equal sign to replace the Response.Write() wording:

 
 <%= "Hello World" %> 
 

As noted earlier, ASP applications can be coded in either VBScript or JavaScript. Although VBScript is more popular, JavaScript is being used increasingly. Dreamweaver MX 2004 Web Application Recipes includes code written in both language variations for ASP.

ASP.NET

A fairly recent entry, ASP.NET is the next generation of application server technology from Microsoft. Capable of running on Windows 2000 or Windows XP Professional servers with IIS 5 or later, .NET offers enhanced performance, more robust coding support, and greater scalability over standard ASP.

One major difference between .NET and ASP is that .NET pages are compiled the first time they are executed. The compiled pages are then saved and become available for subsequent client requests. This greatly speeds up server-side processing while reducing the demand on the server. Another key distinction is the number of languages supported; .NET applications can be written in any of more than 25 coding languages, including VB.NET, C#, and JScript.NET.

You can identify ASP.NET pages by their .aspx extension. Although .NET pages assuming they are using VB.NET are capable of including ASP <%...%> code blocks, the real flexibility and power come from using server controls. A server control is an element defined on the server that is called from the application page; server controls use an <asp:.../> syntax and contain a runat="server" attribute. .NET has replacements for standard HTML form elements, such as text fields:

 
 <asp:textbox  runat="server" /> 
 

as well as more advanced elements, like a monthly calendar:

 
 <asp:Calendar id=Calendar01 onselectionchanged="Date_Selected" runat="server" /> 
 

Although it looks extremely promising, some developers are maintaining a wait-and-see attitude on .NET; however, it should be noted that Microsoft is no longer working on traditional ASP. For more information on ASP.NET, see http://asp.net/.

ColdFusion

ColdFusion lays claim to being both the oldest and the newest of the application technologies covered here. First released by Allaire in 1995, ColdFusion quickly became identified as the easy-to-learn application server because of its HTML-like syntax, known as the ColdFusion Markup Language (CFML). After Macromedia and Allaire merged, ColdFusion underwent a complete restructuring and released a Java-based version, ColdFusion MX, in 2002. ColdFusion pages use either .cfm or .cfml as a filename extension.

The core of ColdFusion is composed of a full complement of proprietary tags, all of which begin with the initials cf. For example, to establish a variable, you use the <cfset> tag, like this:

 
 <cfset greetings="Hello World!"> 
 

You then output the variable with the <cfoutput> tag:

 
 <cfoutput>#greetings#</cfoutput> 
 

Variables including data source field names are enclosed with the # symbol variously known as the pound sign, hash mark, or octothorpe. ColdFusion developers can also develop their own custom tags and, with ColdFusion MX, their own Web services with ColdFusion Components. ColdFusion MX because of the Java foundation also can incorporate JSP tag libraries and Encapsulated JavaBeans for extended J2EE functionality.

The applications in the Recipes are coded to work with ColdFusion 5 and ColdFusion MX.

PHP

PHP is an open source application technology that is popular on a range of servers, including Apache and IIS.

Other editions of PHP are available for Windows, Linux, Unix, HP-UX, Solaris, and Mac OS X servers. PHP pages have a number of extensions, some of which designate the version of the server; for example .php, .php3, and .php4 are all valid filename extensions for PHP applications.

You identify PHP code by using <?php... ?> code blocks. In terms of programming, PHP is somewhat of a cross between ASP and C in syntax. For example:

 
 <?php echo "Hello World!" ?> 
 

A data-driven application engine, PHP is most frequently paired with MySQL, which is an open source database. As a platform-independent and freely available technology, PHP enjoys a widespread user base. For more information on PHP, visit http://www.php.net/.

The recipes in this book are designed to work with MySQL and PHP4.

JSP

Developed by Sun Microsystems, JSP is a Java-based technology that compiles server-side scripting and other components such as JavaBeans and servlets. Many application servers are capable of running JSP, including Macromedia JRun, IBM Websphere, BEA WebLogic, and Apache Tomcat.

Because of scalability and robust performance and its connection to the Java 2 Enterprise Edition (J2EE) protocol JSP is fairly prominent in the enterprise, as evidenced by the many .jsp pages found on commercial Web sites.

JSP applications use a combination of JSP tags, encapsulated in a <%... %> code block similar to ASP, and XML style tags, such as <jsp:forward page="sales.jsp" />. Much of the robustness of JSP comes from its ability to work with JavaBeans. After a JavaBean has been created and made available on the server, it is incorporated in the page like this:

 
 <jsp:usebean  /> 
 

In addition to working with JavaBeans, JSP developers have access to a library of special customizable functions known collectively as JSP Tag Libraries. You'll find more information about JSP at http://java.sun.com/products/jsp/.



Macromedia Dreamweaver MX 2004 Web Application Recipes
Macromedia Dreamweaver MX 2004 Web Application Recipes
ISBN: 0735713200
EAN: 2147483647
Year: 2003
Pages: 131

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net