EWM / PSI Objectives

The Age of Information | Optimizing Images for the Web | Web Tolerance

Market Your Web Site 101 | Smart Tags or Dummy Tags

The ePublishing Enigma | Making an MS Access Database Secure | Back

ASP Vs PHP

Which one is right for your next site?
by Charles E. Brown

TOO MANY ACRONYMS:

With all of the acronyms floating around the Web genre, it's difficult to keep track of the new (or old for that matter) technologies. But there are two acronyms that stand out in today's Web design vernacular more so than any others do. ASP and PHP are different approaches to building dynamic Web sites that can incorporate database interactivity and other application sever uses into your Web site.

ASP stands for Active Server Pages and PHP formerly stood for Personal Home Pages and is now known as PHP Hypertext Preprocessor.

Back to Top

THE BREAKDOWN:

ASP is a toy from the Microsoft development toy chest and is used with "Internet Information Server" (IIS) which is a program that runs on Microsoft servers. ASP is generally not supported beyond Microsoft servers. However, there are 3rd party applications that can make it compatible with a few other servers. ASP is widely used for large companies Web needs.

Rasmus Lerdorf originally designed the PHP parsing language during 1994/1995. Some other major contributors were Zeev Suraski and Andi Gutmans who rewrote the parsing engine to create PHP version 3. The major NT and UNIX Web servers support it and it is widely used with the mySQL database. Small and medium Web developer use it religiously.

Back to Top

DO YOU NEED EITHER ONE:

The need for either of these Web development tools is derived from the inability to control the end-users computer. In other words Web developers don't have control over what applications their site traffic may or may not have on their user system. Does a client have Access Database or SQL? Does the client have Microsoft Word or Corel Word Perfect? If your site is going to incorporate "on-the-fly" Web page design that will include database, word-processing and other application data, a developer has to know exactly what apps will be used to generate Web content. The best way to control this is to have all content generated on the Server instead of the client.

Sever Side Scripting is the way today's Web pages are run. Static Web sites (no dynamics) that just have information and no interactivity with server programs are becoming less of the norm. It is no longer a huge financial burden to pull of dynamic content. There are many free servers that allow you to write scripts to the server and you can run a full throttle business class site with just a small financial contribution each month using some of the more sophisticated Web hosting packages offered by today's Web space hosts. The real question is, which dynamic program do you want to use.

Back to Top

THE LEARNING CURVE: ASP

ASP
http://msdn.microsoft.com/library/default.asp?URL=/library/psdk/iisref/iiwaabt.htm
ASP is not a straightforward program that can be picked up from scratch easily. However this is typical of a Microsoft application. The major reasons that large companies are running it instead of PHP include the following 3 important factors.

1. Microsoft products are all over the globe and it makes their site compatible with a significant number of other big businesses sites. This makes business to business transactions easier because everyone involved is running the same platforms and applications.
2. Large companies already have their computers running Microsoft products and their employees are trained in the Microsoft program environment. This keeps training investments down to a minimum and keeps companies from investing in new equipment and software. They get to milk their current Microsoft product assets for all that they are worth.
3. If a large company wants to take over another (an acquisition or merger) or is bought out themselves, the ability to easily integrate systems (databases, document processing, spread sheet and accounting applications) is invaluable and can make a company appear to be a much more attractive prospect to potential benefactors. Therefore keeping your business dressed up in MS clothing can have a certain appeal.

There are many small and medium business that choose to run ASP as well. Most of these already were using NT, Excel and Access. Using IIS (Internet Information Server) to access their spreadsheet, database and word-processor applications to incorporate data into Web content is an easy transition.

Trying to incorporate existing Microsoft application data into a PHP run Web site would require starting from scratch with a great deal of headaches including purchasing new programs. Therefore some small and medium sized businesses that already are hooked on Microsoft products may opt for ASP as well.


Back to Top

THE LEARNING CURVE : PHP

However PHP is the developers tool that has gained the most respect amongst Web gurus and aficionados. Most describe it as an easy to use and feature packed program that allows you to create dynamic and database driven Web sites effortlessly. It is a free program that is open source so it can be modified to fit developers needs. Most developers who like Linux and mySQL are also fans of PHP.

PHP
http://www.php.net/
Independent Web developers as well as a growing number of small and medium sized businesses love PHP. They have jumped onboard the PHP bandwagon and love every trail they blaze. What are the secrets behind the rapid growth of PHP and what are the advantages to using this highly regarded program?

1. It's easy to learn and the available support for it is through the roof. The Web has always been about individuals banding together to create resources for one another. PHP is loved by the Web community and you will find and abundance of tutorials, tools, Web sites and other online support ready and available to guide you from your Web sites conception to it's launch.
2. More and more host servers are supporting PHP; chances are you can find a good free or cheap host for your site that will allow you to run a dynamic PHP site.
3. ASP is supported by Microsoft servers only (unless you use a 3rd party utility that facilitates support); however, PHP is supported by many different "html" severs.

Back to Top

WHAT ELSE SEPARATES THE TWO:

PHP has it's own language and syntax, the language is simplified due to the programs incorporation of a parsing engine that is especially designed to make short work of translating PHP code into machine language that executes commands.

ASP makes use of a language that was dying before Microsoft managed to breathe new life into it. Visual Basic Script is the language used in ASP and was formerly used (and still is used by some developers) as a client side scripting language that was in direct competitions with JavaScript. This was back when Internet Explorer was still the #2 browser behind Netscape Navigator. During this era, JavaScript was whooping the pants of Visual Basic Script with its wide acceptance amongst Web developers.

However client side scripting languages were an invention of necessity and thrived in an era when Web hosting was an expensive operation and paying for server script access usually meant writing in CGI (Common Gateway Interface) languages like Perl that were difficult to learn. But these obstacles no longer exist. Today it's far too cheap and too easy to use ASP or PHP to create a dynamic site. There's no reason to be limited to only client side scripting.

Nevertheless, Microsoft was able to keep yet another product afloat by ingeniously (cough…cough) using it as the language catalyst for getting the IIS to generate dynamic web pages.

Back to Top

ARE THERE ANY OTHER ALTERNATIVES:

JSP:
http://java.sun.com/products/jsp/docs.html
(Java Server Page) is an extension to the Java servlet technology pioneered by Sun. Like ASP and PHP it provides a simple programming vehicle for displaying dynamic Web content. JSP is the Sun/Java attempt to compete with Microsoft's ASP. JSP is not widely used however it has a small core of enthusiasts who are claiming it to be as powerful and dynamic as ASP. These patrons usually fail to even acknowledge the PHP genres existence (probably because PHP is far more popular than JSP).


ColdFusion:
http://www.allaire.com/products/ColdFusion/whyuse.cfm
ColdFusion is an application development tool created by Allaire Corporation. It is used for writing Web pages that interact with databases. ColdFusion Markup Language (CFML) makes use of HTML-like tags that are embedded in the Web pages. ColdFusion uses an engine (like PHP), which interfaces with a Windows-based Web server (obviously an attempt to make good use of the huge client base afforded to Microsoft). However this would explain the reason it's not as popular as PHP amongst the anti Microsoft genre.

Back to Top

THE VERDICT:

Which one you choose is based on many variables but none more important than preference. When people visit your site they won't say, "Man, this page was generated by ASP,… that sucks!" What they will do is evaluate the sites usefulness based on design and content. Therefore as long as your site follows the rules of good design and also provides the content that the client was looking for any of these dynamic content tools will work just fine, so take you pick.

Back to Top

 

Back to Top

Author Charles E. Brown
Company EWM / PSI
Comments to email
Contact Page Form
Created Jan-01-1999
Updated

Copyright ©1999-2001.
All Rights Reserved.