I came across this article over at articlecity.com, quite interesting. Comparison of ASP and PHP (and no contest here, PHP will always win…for me anyway
).. thought I’d share it with you all.
——————————————————–
ASP vs. PHP
by: Halstatt Pires
When building web sites, ASP and PHP are very popular languages. Here’s my opinion on whether ASP or PHP is best
ASP v. PHP
Both ASP and PHP are languages used to build Dynamic Web sites that can interact with Databases and exchange information. ASP (Active Server Pages) is from Microsoft and is used with IIS (Internet Information Server) that runs on Microsoft Servers. PHP (Personal Home Pages) is from Rasmus Lerdorf, who originally designed this parsing language which was later modified by different people. It runs on Unix and Linux servers and it also has an NT server version.
There are a lot of differences between ASP and PHP.
Cost
To run ASP programs one needs IIS installed on a Windows platform server, which is not free. PHP programs run on Linux, which is free. Even the connectivity of the database is expensive in the case of ASP as MS-SQL is a product of Microsoft that needs to be purchased. PHP generally uses MySQL, which is freely available.
Speed
If we compare the speed of ASP and PHP then PHP has an upper hand. PHP code runs faster than ASP. ASP is built on COM based architecture, which is an overhead for the server whereas PHP code runs in its own memory space.
Platform Compatibility
PHP programs can run on various platforms like Linux, Unix, Windows and Solaris whereas ASP is mainly associated with Windows platforms. However, ASP can run on a Linux platform with ASP-Apache installed on the server.
Additional Costs
Many of the tools used in PHP are free of cost and since PHP is open source a lot of code can be found in open source forums. PHP has inbuilt features like ftp, email from a web page or even encryption mechanisms but in ASP such features are not built in and some additional components are required. Therefore an additional cost is incurred for such components.
Base Language
PHP is based on C++ language and the syntax used in PHP is quite similar to C/C++. C/C++ is still considered the best programming language by many programmers and people who love this language would surely feel more comfortable with the syntax of PHP. ASP on the other hand has a more Visual Basic kind of syntax that again is closely related to only Microsoft products. So, it depends on a person-to-person which language he or she is comfortable
Database Connectivity
PHP, being extremely flexible, can connect to various databases, the most popular being MySQL. ASP mainly uses MS-SQL.
Conclusion
Both languages have their advantages specific to users. Some would argue that both the languages have their own importance and depending on the user’s requirements the language and the platform can be chosen. If we talk about developing a discussion board then ASP is equally capable but many feel the best discussion boards are developed in PHP. If a user is looking for some e-commerce application development then many would call ASP the ideal choice. This does not mean that PHP cannot provide e-commerce solutions, only that many people choose ASP.
From my perspective, PHP is an all around better choice than ASP.
About The Author
Halstatt Pires is with the Internet marketing firm - http://www.marketingtitan.com - a San Diego Internet marketing and advertising company offering automated web site systems - http://www.businesscreatorpro.com - for e-commerce solutions.






10 Comments
ninedoger is still waiting on the domain portfolio…
ninedogger will have to wait just a little bit longer
I have never played with ASP but ever since I have ventured into PHP I love it. I still have alot to learn about it but just recently got a huge book on it
PHP5 and MySQL BIBLE
I love it, do you have any good suggestions on some books i should check out?
Heather, actually, no. As I don’t mess with these PHP books
Not how I learned. I stuck w/the free resources. I.E. tutorial sites, free scripts, and the manual, of course.
Sites such as:
PHP Builder
PHP Freaks
The PHP Manual - Of course
For MySQL:
MySQL Freaks
MySQL Documentation - Of course
Free scripts - well, anything I could find really. Just tear ‘em apart, mess around w/them, customize them, get to know how they work and what they do.
PHP is an easy language to learn. Some make it out to be harder than it actually is.
Have fun learning, makes developing so much easier
Yea i’m pretty familiar with all those sites, i visit them often. about 18 months ago I knew nothing about scripts, how to install them or anything. Now i’m just about writing them. I just want to cram my brain with knowledge.
If you want a funny post read this from my blog
http://www.heathersblog.com/2006/in-one-years-time/
Many people look at PHP and say its a beginner language because it can function without being in proper form. I think its a great base to start with for dynamic sites and people can then move on to ruby on rails, etc.
If php is a beginner language then why do over 1/2 the websites of the world use it lol. I think its great.
Oh, don’t get me wrong, its a lovely language. But many people look down upon it because of its “lack of strict layout”
It’s a bit one-sided isn’t it? Most of the comments for ASP are negative ones…
I know I’m a little late into this conversation. But I do want to add that this comparison is very much from a programmer’s point of view.
The great advantage of ASP for the web designer is that it is much easier to learn. You can pick it up by simply modifying existing code (and yes, there is plenty of open source ASP code out there…)
PHP may be a more advanced language, but you also have to consider ease of use. PHP has a much longer learning curve. For the first-time programmer who only wants to learn enough coding to enhance his or her web design, ASP may be the better choice.
~Graham