iEntry 10th Anniversary RSS Newsletter Advertising
Visit Twellow.com

ASP vs. PHP

When building web sites, ASP and PHP are very popular languages. Here's my opinion on whether ASP or PHP is best.

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 (PHP: Hypertext Preprocessor) 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.

Halstatt Pires is an Internet marketing consultant with http://www.marketingtitan.com - an Internet marketing firm in San Diego offering automated web site systems through http://www.businesscreatorpro.com.

News Tags: PHP, ASP
About the author:
Halstatt Pires is an Internet marketing consultant with http://www.marketingtitan.com - an Internet marketing firm in San Diego offering automated web site systems through http://www.businesscreatorpro.com.

103 Comments

disagree

aim sorry but i have to disagree with you as of my perspective i had rode another article that tells me that the asp.net in speed is more than php

http://naspinski.net/post/AspNet-vs-php--speed-comparison.aspx

correct me and this article if u are both wrong although u have no evidence to proof that php speeder than asp.net but this article has

It's funny when you hear

It's funny when you hear people talk about the so called "web 2.0" like it's the new web. It's a tell-tale sign of somebody who obviously does not know anything about the web and its underlying technologies.

"Micsoft may have

"Micsoft may have user-friendly OS , But sadly it doesnt know anytng abt web 2.0 , Who uses ASP? Google ? Facebook ? , Micsoft is outdated in every aspect" -- Just love that line... LOL : )

the confusion remain the same

hii all
i think after reading all these articles and many more like this once cannot make a decision on whether he should choose asp or php.
i think once should choose what he understands faster and is more interesting for him.
as asp and php both has advantages and disadvantages. so go with what u like.

I've always preferred PHP.

I've always preferred PHP. Its stuck around alot longer and I believe it will out live ASP. Your post is dominated by the advantages of php and they are all true.

facts for end user

If you want to choose a OS, "Windows" is the best choice in this world. Because It is user friendly,easy and has a growing mega list of available softwares for it. But Microsoft doesn't know anything about today's web2. How many people use ASP for their blog? And who told you guyz that bigger and corporate websites should be in ASP? Google is ASP?Facebook is ASP? Microsoft never succeeded in getting a little share of the web.Google and yahoo throwed MS out of this virtual world. But how?because MS is out dated in every aspect. On the other hand others introduced new technology and features day by day.
A VB.net application and a ASP application looks same,except ASP.net runs in a browser.
PHP is even a easier language than C.you don't have to know c to learn it. Guyz from C will find it so easy because it is built on C.but that's not mandatory.

Thanks for sharing. I'm a

Thanks for sharing. I'm a PHP man now.

I really don't care which is

I really don't care which is better. WPN was built on Drupal as I know.

PHP is the preferred language to me for some reasons:

  1. Easy to Learn / Use
  2. Platform Compatibility
  3. Free Third Parties & Great CMS (Smarty, CakePHP, Drupal, Wordpress)

Usually, I develop my new sites with PHP + Smarty + ADODB. It's really easy to start even using text editor like VIM. Check out my case at Domain-daily.com .

Thanks!

This is a great straightforward article, pretty much in layman's terms, that compares TWO of the scripting languages out there (the two major languages in my opinion). Many thanks to Mr. Pires.

The responses? Well, with all this squabbling and smarmy, self-righteous opinion-slinging among ourselves, it's no wonder "web nerds" have such an unsavory reputation. Save it for a Tyra Banks audition, people! Sheesh!

I used both

I started with asp and I now i am php developer and I would never recommend my client to use ASP... it takes twice time as it takes for php..... and if you got a chance to upload a file ???? then you ask google to find you plugin... and many more...

great info on this topic

thanks guys to help me selecting better language

ASP vs. PHP

PHP Rocks!!

why are people still commenting

This article from 2005 is dated and talks about asp not asp.net.
It was useful when it was written but not now.

Great Article

while i am a asp.net man i am finding that more and more php websites are popping up. i think i need to make the dreadful change and bite the c++ bullet : (

thanks for sharing this article again!

ASP - PHP who cares !

There is only one big question : Will I make money with ASP or PHP ? This question goes with "finding a job" or starting a "Ebusiness" for the rest whatever you so a Blog, chat, forum ... who cares if this is linux, PHP, apache, Mysql... WHY ? Because it better be free :-))) since you won't make a penny.
If you look for a job you'll get the same opportunity so you don't really care.
If you have a business and starts Ebusiness then paying a Windows licence for few hundered of dollars/Euros is no big deal since ASP is included in Pro or Server version and you can use the free MS-SQL or simply Mysql with ADO connection.
So the choice is 100% what you understand best. In my case I come from Visual Foxpro 9 so reading ASP is very easy, if you come from C ++ then PHP is good for you.
So my point is "focus on the target only" and clearely the target is "to make money" from your knowlegde not feeling super cool because you put <$= instead of <%= instead. This is exactly like comparing Boeing/Airbus , Toyota / Mercedes ... The beauty is to have the choice let's hope this will stay like that.
I have Linux for my home worstation and Apache-ASP server !! and Windows for my development tools.
I am french so I hope I won't be get critics on my spelling !
All the best to all of you.

You make the sense. I really

You make the sense.

I really don't care which is better. WPN was built on Drupal as I know.

PHP is the preferred language to me for some reasons:

  1. Easy to Learn / Use
  2. Platform Compatibility
  3. Free Third Parties & Great CMS (Smarty, CakePHP, Drupal, Wordpress)

Usually, I develop my new sites with PHP + Smarty + ADODB. It's really easy to start even using text editor like VIM. Check out my case at Domain-daily.com .

That's the way

Good stuff, you say it perfectly. It's not all that simple and cool, just do what is best in terms of profit and time.

ASP.Net Are you kidding???

For anyone that is older than 10 years old would know that anything developed by Microsoft is flawed from the code on up. There are so many security issues with ASP, ASP.Net, IIS and any numerous MS Servers. As well as MS SQL has nothing on MySQL since SUN is the new owner. Also Php / Zend is way more powerful than anything Microsoft can come up with. I prefer Windows to Linux as an End User. When it comes to my business. Well enough said. The old debate used to be whether NT was good enough to over take Unix. LOL, we can all see where that failed. So once again There is nothing Microsoft can make that is good. Enough Said.

One more thing: SILVERLIGHT

One more thing: SILVERLIGHT

ok you may think php but

ok you may think php but hear this.
and i'm talking about asp.net and visual studio's now.

asp has c#or vb wich are two of the most used language's,
asp uses visual studio's wich means BOOM INTELLICENCE and the propper use of classes and all the libraries.

asp is overall also nicer coding i mean like when you have mayor sites written in php its hard to look at the code and see what it does while in asp its better to order it.

visual studio's also has a tool box wich takes allot of coding of your hands and face it linq rules.

but all of this indeed is not free.

i have visual studio's and my vote go's for asp!

I think the article is

I think the article is talking about Classic ASP vs. PHP and not ASP.NET (which is a lot different than ASP)

You don't program much, do

You don't program much, do you? Your spelling is not quite optimal, especially when you consider that one mistyped character in code can mess the whole thing up.

In your face, sucker.

In your face, sucker.

Did you consider the

Did you consider the possibility of English not being his/her first language? In programming, logical thinking is as important as properly spelling oh-so-hard commands such as "print", "while", for".

Not well done

You missed ".

Great comparison and great

Great comparison and great discussion. But I believe that this discussion never ends. Because they both have advantages and disadvantages. And the first place changes from which perspective you look.

I own a web hosting company

I own a web hosting company and from my experience, PHP is definitely the way to go. Why? Because it is FREE, stable, and with basic programming knowledge easy to learn. Whether you go down the path of PHP or ASP.NET, you will need to learn the language in order to use it. The LAMP platform (Linux, Apache, MySQL, PHP) is rock solid and has been for years. I have looked at both PHP and ASP.NET and to me PHP seems much easier to learn. I can set up a Linux machine without having to buy another copy of Windows, and get to work rather than worrying about costs and licensing. When it comes to running a Linux server alongside a Microsoft server, Linux is far more stable and has far fewer maintenance headaches of Windows. To me, the maintenance side is a selling point as I have better things to do than reboot a Windows server once a month installing security patches.

apples and oranges

Comparing php and asp (or even asp.net) is rather impossible. Why? just because one can achieve similar results (a webpage, server administration, email) from them both, doesn't mean they are equal. That's like saying a steak sandwich is better than an orange, because the steak sandwich filled me up more, if you ate another orange until the price was the same, you would find the orange equally filling - might take longer, but it would still do the same job.
ASP is considerably different than php, growing up with Basic on an Apple II, and even basic on Mac, i had a background that allowed me to explore ASP (for free) however, as i started developing websites (initially with coldfusion/Access) i soon discovered that my clients wanted a less expensive platform, i switched to php, as i could build myself an enterprise server from an old 486 i had collecting dust.
I continued to learn ASP and moved into the .net realm, but at that time development tools were expensive, while possible to program ASP in Textpad (inexpensive syntax highlighting notepad) i found that it was much easier to debug and develop in Perl using my own dedicated server.
when I graduated from college and needed a job, companies hiring new grads were not looking for someone that was going to cost them a lot for rollout. And Php was the language everyone was looking for. (LAMP developers) So i gave up on ASP and started learning PHP so i could get a job.
While i revisit ASP from time to time, and know a lot of univerties focus on the ASP and Visual frameworks (due to bigger budgets, educational pricing) university graduates tend to graduate into larger firms requiring more comprehensive OS's and Technical resources. The ASP.Net Framework not only produces their website, it also reports sales directly into their Excel spreadsheets, and their accounting department access the MS SQL server for it's data. Big corporation money spending $ on technology to make even bigger money is how big business works, and ASP.Net is the tool for that job. It was a very wise decision for MS to develop a more familiar to C programmers a C like language and make a framework that was interoperable (.Net). While it's nothing new, corporations like the idea of having one name, no matter how much slandered, to manage all their technological solutions.
It takes experience and know-how to develop a PHP workstation, and inevitably along the way one faces hurdles and frustrations with the openness of PHP and making it work. If you have the time and patience, PHP is an excelent choice, but trying to get an extra 10 minutes out of a big shot manager to figure out why your IDE isn't working, doesn't always fly. So ASP has a very important place. PHP on the other hand is far more accessible, but at a steeper installation and management cost (time, not always $$).
While running a small multi server ISP, it was a full time job trying to keep everything up-to-date, and secure. A responsible ISP keeps track of numerous emails noting security alerts, and updating source code, not only of PHP installation, but of the base server, email server, DNS servers etc. It's nice to think that we can just pay MS to do that for us - even if they have a poor track record.
Some days i feel like an orange! Other days i feel like an Apple. And while today 90% of my bread and butter is made developing PHP web applications, i would never say that i would not, could not use ASP.Net should i need to. I don't like MS's latency on getting on board with new technology, but then there are many others who are quite happy to know what they know, and are not ready for Web 3.0 for another 5 years yet, they've just started to learn XML and Ajax, and having to switch gears to learn JSON is just too much to handle - they like the slow and sure roll-outs of MS releases.

Whilst we DO compare the

Whilst we DO compare the two, therefore they CAN be compared. They both serve the same end function, they are both tools to get a person to that end fuction. It's an issue of whether that tool fits in your hand or not. As semi-intelligent people, we look for efficiency in our method, even though the end result may be the same. If the end result is not the same, then we choose the appropriate tool to make the result both appear and function to be more appealing to the end user. Without the end user's approval, we have gained nothing from our intended goal. Do we buy a hammer because it's expensive, or do we buy it because it serves our purpose? Go PHP and MySQL - it serves all purposes and it's free.

awesome comment

awesome comment

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
11 + 9 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Featured Headline
FriendFeed Offers Real-Time Search
Results Actually Roll In
2 comments | 9 hours ago
 
Subscribe to WebProNews


Send me relevant info