Quantcast

ASP vs. PHP

Get the WebProNews Newsletter:


[ Business]

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.

ASP vs. PHP


Top Rated White Papers and Resources
  • Guest

    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.

    • Guest

      One more thing: SILVERLIGHT

  • http://www.opuss.net Guest

    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.

    • http://www.vickizhao.net Guest

      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.

    • Guest

      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 .

    • Bino

      I agree 100%. The first real comment in here. The rest of the comments are from self-called PHP or ASP.NET lovers in a battle. So sad. I is not what you using, is what you do with this.

  • http://weboptimizationstrategies.com/ SEO Guy

    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!

  • Guest

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

  • http://www.naveenparth.net Naveen Parth

    PHP Rocks!!

  • Prakash singh

    thanks guys to help me selecting better language

  • http://rizfolio.com/ rizwan

    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…

  • Steve, Web Design Student

    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!

  • Guest

    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 .

  • http://www.lyrics3k.com/ lyrics3k.com

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

  • SAYEED

    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.

    • David

      “If you want to choose a OS, “Windows” is the best choice in this world…” – Utter nonsense! The only reason Windows is seen as “easy” is because that’s what most people grew up with. Just look at how many people have had difficulty coping with the transition to Vista. And insofar as software choice, are you even aware of the amount of software available for Linux systems? Just because they’re not produced by global brands doesn’t mean they’re not equal in quality or capability. Furthermore, Windows is riddled with problems and let’s not forget, is very expensive.

      No, the choice of OS isn’t as black and white as “this one is better than all the others”. It is entirely down to the user. For some, it may be Windows. But not for most. for most casual users, a simple Linux distro is ideal: you can do all the standard tasks you want from a computer (surf the web, access email, office programs) and benefit from its open philosophy, FREE charge and superior performance & stability.

      Oh, and in my opinion, the GNOME desktop environment is much easier to navigate and control than anything windows has done since 3.1.

  • http://www.alpharepro.co.uk Jack

    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.

  • AZHAR ,PUNE

    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.

  • vikhyath_4u@yahoo.co.in

    “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 : )

    • http://www.halladesign.com Guest

      good point !

  • Guest

    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.

  • mohamed

    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

    • Guest

      ASP is not the same as ASP.NET

  • John Ranger

    QUOTE “Database Connectivity

    PHP, being extremely flexible, can connect to various databases, the most popular being MySQL. ASP mainly uses MS-SQL.”

    WTF…? You can connect to a DBMS via any scripting language provided the libraries exists…so to summarize you could equally have said:

    ASP, being extremely flexible, can connect to various databases, the most popular one being MySQL/MSSQL/ACCESS/FoxPro/SQLLite. PHP mainly uses MySQL.”

    Doesn’t really cut it as an argument does it….

    • Guest

      PHP is like the NFL, while ASP is like highschool football. When company’s advertise that they are looking for individuals with ASP knowledge, I just sit back and chuckle, and then scoff at that company for their stupidity. Use ASP if you never want to advance in life. Use PHP if you want to be a demi-god among men. Thank you. – Sforce

  • Denis

    PHP and ASP.NET are tool set.
    PHP is an interpreted language and ASP.NET, which is part of the .NET framework is a compiled in-memory code.

    PHP is great for the easy and simple projects that you want to develop.
    This is actual how I started. The best part is that it’s free.
    When you get to big, overloaded environments you get into trouble. Big times.

    It will actually cost you more to make a PHP/MySQL solution work in a decent way, then it would an ASP.NET/SQL Server or Oracle solution. Plus you are in a deadlock.

    Your solution/app started as a small thing and it is a success, people us it and you are desperately trying to squeeze every last drop of performance out of your 6 WFEs and along comes a Google crawler and your Apache is sitting around for your database to respond.

    You are talking about big businesses that use PHP/MySQL to run their sites. Do you actually know what they are using? I guaranty you that they are not using the standard PHP or the MySQL engine.

    I know of such solutions that have modified the MySQL Engine so much, they made it into an SQL Server :)), but at 3 times the cost.

    What I’m trying to say is that scalling solutions in PHP is extremely expensive.

    On the other hand, you have ASP.NET. Granted, it may not have the best markup or the best JavaScript interpretation, but if you look at it like that you do not have the big picture.

    Who says you must use their controls, use HTML controls with runat=”server”. You have a heavy page, put you ViewState in a SLQ Server (Express edt – free) or just turn it off.

    You don’t like the way your controls look? Well consider using Silverlight / Moonlight for Linux.

    What to contribute, build solutions, share stuff or ask questions? Go to www.asp.net and CodePlex.

    If you are a good programmer you can get both technologies to work for your needs. The real question is how much will it cost you to get there.

    Thank you :P

    Denis
    MCT and supporter of all things that are free.

    • http://www.halladesign.com Guest

      Should you use PHP & MySQL from the ground for big scale projects, it would be really expensive and time consuming. However, there are several great PHP frameworks such as CakePHP and Symfony, that allow Rapid development of really large projects.

  • William

    PHP was originally designed to function similarly to C, even though the language has advanced a great deat since its early days, its roots are still C as Rasmus designed it. ASP is comparable to VB scripting, it comes bundled with lots of prewritten functions that are great for smaller projects.

    I code is asp, php and jsp. They all get the job done efficiently. Frankly its not about the speed of the languages since they are all very fast, its about the code structure and the skill of the programmer.

  • Mjhieu

    I dont understand what are all of you talking about ASP.NET and PHP. In my opinion, I vote for mr BILL!

  • Miko The Developer

    Hi Everyone,
    I’ve been a web/application developer for several years now. I’ve worked with many different languages and I have to say – PHP is by far my favourite.
    Mainly because its built for Linux(Unix) operating systems, which have an incredible amount of benefits for web developers, in fact I’d say essential.
    MySQL may not be the fastest database, but with a few tweaks (stored procedures, switch tables) it can perform with the best of the rest, and its free! I’m working for a website now that searches through around 30,000,000 rows, and user queries are all still under 0.5 seconds.
    PHP 5 is fully Object Orientated as well! the only disadvantage I’ve come across so far is that it doesn’t support multiple inheritance, however this can be overcome using ‘mixins’.

    Microsoft has done nothing but ‘hold back’ the web with redundant, bloated languages for a long time now. Do yourself a favour, use PHP.

  • Bleh

    You could just combine the two and make turkey, lets see who’s going to care 5 maybe 10 years from now.

    In the end Google wins :)

  • Bino

    I don’t know why you telling such things here around like PHP is better, because….It’s free? Come on, I was thinking you can do this better. Where are your proves that PHP is better? Not only talking, please give some proved samples. I can only say, that people learn to read and write with an age of 10, (some later) but is this means they can write a best-selling book already? You are just one of the PHP lovers. I was hoping to read more than such things.

    It’s a shame.

    Ps.: Free not means good always and doesn’t matter mySQL, PHP, Linux or whatever. Netscape, ICQ and a lot more show in the past what is means to be better because free.

    • Md Khalid Saifullah

      Hello Bino,

      I have worked in both ASP and PHP environment. My feeling is PHP is more user-friendly.

      Remember that PHP is not build by boys of 10 years old. There is a lot of dedication of experienced people who did it without intention money. PHP developers are enjoying to develop it. They do it from their heart. Whenever you do something for money, there must be some artificiality as you don’t do it from your heart.

  • Armin

    Could you please give me farther information about this subject?
    I want to start programming games on web, so which one is more useful for me?
    I’m Iranian and in my country most of programmers use ASP and a few friends advised me on ASP.
    Please help me.
    Thanks

  • http://www.jplwebdesign.com Jason

    Thanks for the insightful article. I am dabbling in PHP now and lovin’ it.
    Jason

  • Md Khalid Saifullah

    I would like to thank developers who develop PHP and make it so user friendly. We are using PHP without any cost, there are lot of works done behind it.

    Hats-off to PHP developers.

    • Md Khalid Saifullah

      Also thank for the nice comparison.

  • Guest

    actually php stood for personal home pages in the early years which was modified to hypertext pre-processor later.

  • Guest

    Wow you’ve done no studying and went and posted a ignorant “asp vs, php” thread, Asp can run VB C++ and many, many more, It’s Faster than Php, Windwos Vista Home premium comes with it FULL it’s all you need, nothing more. As for MS SQL that’s also free, if you paid for it you’ve been cheated.
    Next time try to post an Unbaised opinion, because it’s just that an opnion you’ve no expierence in this do you?

  • http://kayalife.com SYED NAYAB

    i really appreciate the way you have simplified the article. i request you one more thing.. well not necessarily if you simplify about C++

    THANKS

  • Guest

    Well, you were technically correct. As it was called “Personal Home Pages”, before it became common use on the Web.

  • Guest

    It’s funny how some of you dorks can’t respect someone’s opinion. So the author prefers PHP over ASP, so what?, what’s it to you?

    Does it really erk your egos that someone can come up with the advantages and disadvantages of both hosting environments, yet come to the conclusion (most likely based on personal experience) that PHP just might be more versatile in comparison?

    Do some of you complaining even have extensive experience when it comes to both PHP and ASP? Or are your posts inspired by ignorant fanboyism?

    I salute everyone who responded with a neutral attitude. Like a previous poster said, it doesn’t matter what you use, so long as you use it well.

    Use what you like and stop crying!

  • http://www.a-bon.cn Guest

    i am come from china shanghai good for write

  • http://www.bharatbuy.com/ Guest

    I have gone through this article and found it interesting . I have my own website www.bharatbuy.com and its designed in PHP and the vertical is e-commerce.

  • http://questionaries.org denim

    There is a great difference between asp and php. First one is syntax one and Php works on both platforms while asp works on windows platform.

  • Guest

    Vai passar mil anos e voc

  • Guest

    In fact, PHP originally stood for Personal Home Page. However, in 1997 the language’s name was changed to the recursive initialism PHP: Hypertext Preprocessor.

  • Rigoberto Soto

    Easy reading and clear explanation. You are a master my friend.

    Rigoberto Soto

  • Guest

    http://cheapesthostingcompanies.com/

  • http://www.knutselopdrachten.nl knutselopdrachten

    Thank you. This was very helpful information.

  • http://www.afrikaansemaskers.nl Afrikaanse kunst

    I also think that both languages have their advantages. greetz..

    maskers uit Afrika

  • http://saeed.ostaddaneshjoo.ir/ saeed

    yes offcorse ,php is beter than asp ,i am programing on php in the relax mode

  • msbadar

    Thank you sir

  • http://phpdaily.wordpress.com Shashi kanth

    Thanks for such an informative explanation. It really inspired me to go ahead with php.

  • Thota Ramkrishna

    Thanks for this post,

    I got lot of information from this post i like really

  • http://pagesofinterest.net/blog/ Mike

    I agree with you that PHP is preferable – why pay when you can get similar functionality for free??

  • Guest

    A very one sided article and a simple mistake stating PHP standing for Personal Home Pages imo shows the level of expertise in the area by the author.

    ASP.NET and the Visual Studios is considered one of the most efficient IDE’s in the World of computing. Very rarely will you find such a business directed platform that has so many useful tools at the finger tips of the programmer.

    Yes VS and ASP.NET is figured to work with other Microsoft products but then again that is the basis of the .NET framework, allowing products and technologies (i.e. LINQ) to be multi-compatable across all platforms.

    Also I belive you get what you pay for when you buy products like MY-SQL. A total begginer can be up and running, creating their first database in no time at all using the user interface within Visual Studios. Connectivitity for example could not be easier with a simple drag and drop function using the database type (MY-SQL, Oracle etc).

    Both have their pros and cons. I will say however that many PHP users (web-dev’s) from the new genertation seem to enjoy using pre-written code. This is all well and good and totally efficent but I also believe this can have a drawback in that people are becoming so dependable on other peoples code that they are now not spending the time in gaining the knowledge themselves. Of course this can be said to ASP.NET developers but no where near the same IMO.

  • http://www.hamsterdesign.si izdelava internetne strani – postavitev

    I think that this article claims are little out-dated. Speed comparison between PHP and ASP (now ASP.NET) are misleading. ASP is now compiled and heavy optimized web language which speed cannot be compared against interpreted language such as PHP.

    Dont get me wrong i am a PHP developer and I dont use ASP (and never will), because of open source and its ease of doing web development. But PHP by no means cant be faster when it comes to speed comparison with compiled language! ASP is faster, much faster!

    Besides that, i believe PHP is much more powerful web development tool as ASP, what also its popularity reflects.

    Nice article btw ;)

  • A Different Guest

    PHP originally stood for “Personal Home Page” until it was changed in 1997 to “PHP: Hypertext Preprocessor”. (see http://en.wikipedia.org/wiki/Php)

  • Guest

    Hey I have useing PHP for the past few months, and never actualy even looked into asp, i always had the impression it was quite ‘hard coded’ and stingy like alot of microsoft things (personal opinion). Your article has helped me decide i made the right choice learning PHP and MYSQL =) Thanks for the heads up!

  • Guest

    But at first… PHP stand for Personal Home Page

    see http://en.wikipedia.org/wiki/PHP

  • Join for Access to Our Exclusive Web Tools
  • Sidebar Top
  • Sidebar Middle
  • Sign Up For The Free Newsletter
  • Sidebar Bottom