1 / 16

PHP/ASP

PHP/ASP. Robert Nelson & Will Vanlue BA370 November 4 th , 2005. Server Side Processing (SSP). HTTP is a stateless protocol How do we overcome this? With SSP Server Side Processing Definition:

thor-slater
Télécharger la présentation

PHP/ASP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PHP/ASP Robert Nelson & Will Vanlue BA370 November 4th, 2005

  2. Server Side Processing (SSP) • HTTP is a stateless protocol • How do we overcome this? With SSP • Server Side Processing Definition: • Coding that is placed in served files, and evaluated on the server while the files are being served to the client. They let you add dynamically generated content to an existing file (usually HTML pages). • With SSP, we are able to “remember” previous activity from internet clients • SSP has many other functions too.

  3. Server Side Processing (SSP) • Languages and technologies that allow for dynamic content in web pages • Call allow for the inclusion of time, connection, geographic, or browser –dependent information • Online shopping, personalized content, developing directories, and other non-static applications require SSP

  4. Server Side Processing (SSP) • Many technologies used to implement SSP • ASP, PHP, JSP, Coldfusion, ASP.NET, Java, Perl, Python, C#, etc. • Why PHP/ASP? • Very widely used languages • Both have relatively low learning curves • Large support communities • http://www.php.net • http://msdn.microsoft.com

  5. Server Side Processing 4 3 Client Server Interpreter (PHP, ASP) 1 2 • Client requests a page from the server • HTTP Server passes PHP/ASP page to interpreter application. • Interpreter parses code and returns it to HTTP server as HTML. • Page is delivered back to client as HTML. Other Requests (servers, database apps, etc.)

  6. History of PHP • PHP/FI (1995) • “Personal Home Page/Forms Interpreter” • Created by Rasmus Lerdorf • Sample set of Perl scripts to track online access to documents • Relatively inconsistent syntax • Lerdorf chose to publicly release the source code • PHP/FI 2.0 (1997) • “Cult” like following of thousands of users • Approximately 50,000 pages (1% of the internet) report usage • Spent most of it’s life in beta • PHP 3.0 (1998) • Recursive Acronym: PHP: Hypertext Preprocessor • First version to resemble modern PHP • Created by Andi Gutmans and Zeev Suraski with help from Lerdorf • Name was changed to make it sound more useful for commercial usage • Object oriented and very consistent syntax • Tens of thousands of users • Hundreds of thousands of pages (10% of the internet) report usage

  7. History of PHP • PHP 4.0 (1999) • New “Zend Engine” at the core • Named after Zeev Suraski and Andi Gutmans • Handled third party databases much more efficiently • Improved portability with a wider variety of server compatibility • Provides more secure transfers of information • Hundreds of thousands of users • Several millions of pages (20% of the internet) report usage • PHP 5.0 (2004) • Had several pre-releases • Zend Engine 2.0 • Dozens of new features

  8. History of ASP • “Classic” ASP • ASP 1.0 (1996) • Supports interpreted VBScript and JScript • ASP 2.0 (1997) • ASP 3.0 (2000) • ASP.NET • ASP.NET 1.0 (2002) • Can replace HTML scripting with full support for .NET languages • In-page scripts are still supported • VB.NET and C# classes can generate pages • ASP.NET 2.0 (2005) • Scheduled release of November 7th • Easier to use, “drag-and-drop”, interface

  9. PHP Features • Source code is not sent to the browser • Code is bracketed by “<?” and “?>” • Can be inserted into HTML code or can be a stand alone application • File extension needs to be .php, .php3, .php4, etc. • Server must have PHP interpreter installed • Supports database control • Source code is OPEN

  10. ASP Features • Source code is not sent to the browser • Code is bracketed by “<%” and “%>” • Can be inserted into HTML code or can be a stand alone application • Supports a wide variety of .NET languages • Server must have ASP.NET installed • Supports database control, but may need third party drivers • Source code is CLOSED

  11. Code Demos • Demo 1: Simple Password GeneratorPHP Code | ASP Code | Output • Demo 2: Sessions & CookiesPHP Code | ASP Code | Output • Demo 3: Database ConnectivityPHP Code | ASP Code | Output

  12. Comparison of ASP • Pros • Professional tech support • Versions are documented at msdn.microsoft.com • Run on many company intranets • Has a familiar Microsoft environment • Widely available • Cons • Only practical to run on a Windows server • Support can be expensive

  13. Comparison of PHP • Pros • Open source • Freely available • Very portable • Active user community • Uses relatively little processor power • Cons • More CPU intensive on a large scale • Extensibility is relatively limited

  14. ASP vs. PHP

  15. Questions?

  16. References • Wikipedia.org • http://en.wikipedia.org/wiki/Active_Server_Pages • Glasshaus.com • http://www.glasshaus.com/samplechapters/1086/chapter8.asp • Php.net • http://www.php.net/history • Apache.org • http://httpd.apache.org/docs/1.3/howto/ssi.html

More Related