PHP ASP Robert Nelson Will Vanlue BA370 Business Systems Analysis Dr Ren F Reitsma November 13 2005 BA370 PHP ASP Bob Nelson Will Vanlue January 14 2019 Abstract PHP and ASP are two common languages that incorporate server side processing After a description of the principles of server side processing we explore a history of PHP and ASP The features of each language are discussed looking at their functionality from a web development standpoint Both ASP and PHP are demonstrated in three code demos They cover the topics of simple syntax sessions and cookies and database interactivity Finally the benefits and drawbacks of each language are discussed Introduction The increasing popularity and convenience of the internet has led to a large growth and need for dynamic and personalized websites and services Since HTTP is a stateless protocol technologies had to be created to allow for web servers to keep track of client activities Two of the technologies that have gained popularity from this need are PHP and ASP two similar yet rival technologies PHP Hypertext Preprocessor PHP and Active Server Pages ASP are dynamic content web scripting languages Both are commonly used to create websites that allow clients to experience the web as a dynamic customized interactive entity PHP and ASP s popularity stem mainly from their relatively low learning curve and language support They both support and interact easily with session cookies and databases which are used to dynamic customized and interactive websites Both PHP and ASP have large followings that claim one is better than the other The purposed of this paper is not to say which technology is better but instead it is intended to inform the reader of the history behind PHP and ASP their respective strengths and weaknesses and to demonstrate how each can be used as a server side processing technology 2 14 BA370 PHP ASP Bob Nelson Will Vanlue January 14 2019 Server Side Processing Server Side Processing can be described as applications and coding that evaluates and dynamically creates content before it is served to a client As stated earlier HTTP is a stateless protocol that does not retain any information about the clients requesting data In order for dynamic content and customization to exist on the web the statelessness of HTTP had to be overcome somehow This is accomplished with the idea of server side processing With server side processing web application programmers can a personal client dimensions such as time geographic location connection information and browser dependant information Server side processing is also the driving technology behind online shopping online shopping carts personalized content developing directories and other non static web applications Server side processing is more of an idea than a technology Server side processing is made possible through many different languages Some of these languages include ASP PHP JSP Coldfusion ASP NET Java Perl Python C Some of these languages are strictly for web programming and dynamic Figure 1 content while others are stand alone languages How they are used with server side processing is decided by those in charge of the system utilizing server side processing How these languages interact with a web server follow the same basic idea Figure 1 is a flow chart of how dynamic content is usually produced through server side processing For the purposes of this paper it has been geared toward PHP ASP processing rather than a generic model 3 14 BA370 PHP ASP Bob Nelson Will Vanlue January 14 2019 In this process a client will request a dynamic document from the server usually a web server The server will look at the request and see that it is a dynamic document and it will send it to the interpreter application and take hold of the applications standard input and standard output The interpreter application could reside on the same server as the web server or it could reside on a completely different machine it does not matter The interpreter application will then parse the document accordingly In the case of PHP ASP the application will step through the document and any HTML that is encountered is echoed directly back to the standard output Once it finds PHP or ASP code the interpreter parses and processes the code During this time the interpreter could be echoing back HTML making calculations or even contacting other servers and requesting documents database records applications etc Once the interpreter finishes parsing the document the web server delivers the resulting HTML document back to the client that requested it This leaves the entire server side process completely transparent to the client History of PHP PHP started its life out as PHP FI Personal Home Page Forms Interpreter It was created by Rasmus Lerdorf in 1995 as a set of Perl scripts He used PHP FI to track who was viewing his resume and other documents online When Lerdorf created PHP FI it had a fairly inconsistent syntax but he did choose to publicly release the source code In 1997 PHP FI 2 0 was released By this point it had found a solid cult following of around 50 000 pages or about 1 of the internet The interesting thing about PHP FI 2 0 was that it actually spent most of its life in Beta versions Its development started briefly after the original version of PHP FI was released but the official release of 2 0 was very close to the release of PHP 3 0 The first version of PHP that resembles the modern version was released in 1998 Lerdorf helped Andi Gutmans and Zeev Suraski turn PHP FI 2 0 into PHP 3 0 The name was changed to a recursive acronym PHP Hypertext Preprocessor to express the fact that it could be used for a more commercial and public 4 14 BA370 PHP ASP Bob Nelson Will Vanlue January 14 2019 applications The syntax became object oriented and very consistent At this point in its life PHP saw usage on hundreds of thousands of pages or about 10 of the internet Some problems did exist with PHP 3 0 however There were issues with information security and portability to some servers PHP 4 0 addressed these issues with its release in 1999 The release of 4 0 saw PHP get a new Zend Engine at its core The engine was named after Zeev Suraski and Andi Gutmans and provided better support for third party databases as well as some new functionality PHP was now being used on several millions of web pages or around 20 of the internet In 2004 PHP 5 0 was released 5 0 had several pre releases that let users have a peek at
View Full Document