Re: PHP vs ASPFrom Rod on 18 July '00
replying to Re: PHP vs ASP posted by David A
There are some excellent articles about this at zend.com. But the problem is not being sucked into MS and away from standards. The problem is ASP.
PHP is a much more stable product and the language makes much more sense than VBscript.
PHP has more useful built in functions. For example, in PHP it is very easy to create an interface for a user to upload a file (www.bachelorsindia.com). In ASP you have to have a special component to allow this (www.4guysfromrolla.com).
There is also much more open source components available for PHP. Open source allows you to learn from the code, improve it if you can and use some one else's hard work to speed the development of your own.
ASP has problems with a lot of bugs, like most MS products. For example, I have a piece of VBscript that worked for three weeks during the testing of a web site. The day it went live, the code stopped working.
We made the code simpler and the site began working again. However the original code now works on other sites on the same server with the exact same database.
There are many documented cases of ASP code that stops functioning for no apparent reason (www.zend.com/zend/art).
With PHP, all arguments become variables, making dynamic code easier to develop. In ASP, if the argument is in the URL, the code is request.querystring("myArg"); if it is in the httpheader the code is request.form("myArg"). The equivilent code is PHP is simply $myArg. Much less typing.
PHP uses a more object oriented approach to development with Classes and Methods. ASP has the availability of subroutines that can accomplish similar tasks as a method, but finding good documenation on them is difficult.
The biggest problem with ASP is that is uses VBscript, making it dependent on MS Basic. Although BASIC had its place in programming it was not designed for web-based apps. Because of this VBscript has a lot of baggage that make programming for the web less stable.
PHP on the other hand was created for the web from the start and wtih the new Zend Optimizer (www.zend.com) it flies so much faster than ASP.
Using PHP in coordination with MySQL is a very nice solution for a great price on the web. But MS Access is also an application not intended for web development and using it on the web is a very dangerous venture. Sooner or later, you will lose data. It is not made for multiple users or for connections to it that simply get cut off because the Internet drops connections sometimes.
I have been programming on the web for 5 years. I'm a certified Pervasive Tango Instructor (www.pervasive.com). I've programmed in Cold Fusion, SilverStream, PHP and ASP also. In my opinion PHP is the best tool out there right now.