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 JavaScript (which Microsoft also calls JScript). 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, Windows 2003, and Windows XP Professional servers running Internet Information 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; Windows XP Professional uses IIS. ASP has proven so popular that a non-Microsoft variation is now available from Sun Microsystems; originally called ChiliSoft 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() functionwhich outputs whatever is in the parenthesesis used so frequently, you'll also see this shorthand method of coding that uses an equals 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 increasingly being used. Dreamweaver 8 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, Windows 2003, and Windows XP Professional servers with IIS 5 or later, .Net offers enhanced performance, more robust coding support, and greater scalability compared with 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 pagesassuming they are using VB.NETare 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, such as 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 ColdFusion Markup Language (CFML). After Macromedia and Allaire merged, ColdFusion underwent a complete restructuring and released a Java-based version, ColdFusion MX, in 2002. The current version, ColdFusion MX 7, was made available two years later. 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 # symbolvariously known as the number sign, 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 MXbecause of the Java foundationalso can incorporate JSP tag libraries and Encapsulated JavaBeans for extended J2EE functionality.

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

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, .php4 and .php5 are all valid filename extensions for PHP applications.

You identify PHP code by using <?php... ?> code blocks. In terms of programming syntax, PHP is somewhat of a cross between ASP and C. 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 www.php.net.

The recipes in this book are designed to work with MySQL 4.x, PHP4, and PHP5.

JSP

Developed by Sun Microsystems, JSP is a Java-based technology that compiles serverside 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 performanceand its connection to the Java 2 Enterprise Edition (J2EE) protocolJSP 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.




Macromedia Dreamweaver 8 Recipes
Macromedia Dreamweaver 8 Recipes
ISBN: 0321393910
EAN: 2147483647
Year: 2003
Pages: 121

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