PHP Vs. .Net

In the world of web development, the choice of which development language to use commonly comes down to two popular choices.

Web applications, specifically those relying on back end databases, are typically being created using either Microsoft’s ASP.Net language, or the Open Source alternative language of PHP. Reasons why one might choose one over the other can include: The cost of development tools, or availability of such tools, or even ones comfort level with the Open Source initiative. The goal of this article is to provide some perspective on reasons why one might choose one over the other.

Active Server Pages or ASP has long been an option for creating dynamic web content. Active Server Pages facilitates the ability to use databases such as Access or SQL just to name a few, to create dynamic, feature rich websites. The work going on behind the scenes in serving up the dynamic content is being done at the server level by the Active Server Pages source code.

Microsoft has spent a great deal of time and resources promoting their .Net family of programming languages of which ASP.Net is a member. We can develop ASP.Net two ways: 1> We can develop only thru any text editor like notepad by inline code. Its not necessary to have code behind. 2> A web developer tool from microsoft which is free … visual web developer express. That is only for web based i.e. You cannot develop win apps in visual web developer. As with all of Microsoft’s products, support and updates are constantly made available for ASP.Net. The shear amount of features that Microsoft packs into Visual Studio, coupled with Microsoft’s extensive support make certainly make ASP.Net an attractive solution for any corporation’s web development needs, but the cost can be prohibitive, if not impossible to afford for the individual web developer.

PHP which is in its 5th revision now, is an Open Source web development language that also facilitates the creation of feature rich, dynamic websites that can use databases. Being Open Source means simply that PHP isn’t owned by anyone. Just as with Active Server Pages, the work going on behind the scenes of serving up the dynamic web content is being done by PHP at the server level.

As with most Open Source products, the resources available to a PHP developer are free of charge. This makes PHP extremely attractive to the independent web developer. There are some commercial quality development suites available from companies like Zend, but there is also wealth of free resources just a Google Search away. Because there is really no corporate entity behind PHP, support and development on PHP is done by the community of its users and developers themselves. Surprisingly this does not seem to adversely affect the ability to find support for PHP.

All in all, ASP.Net and PHP are both excellent options, offering basically the same functionality. Whether the decision comes down to the cost of initial investment, or the comfort level one has regarding Open Source, or something else entirely, the end result depends upon the mastery of whichever language is chosen.

Ian Wilson Lockwood is a support analyst for Apollo Hosting. Apollo Hosting provides website hosting, ecommerce hosting, vps hosting, and web design services to a wide range of customers.

I’ll say what I have to say (from someone who uses both daily)ASP.NET Its a great language, alot of power and functionality. Can easily move between web and desktop application (code wise) and its “moreless” a compiled lang. (I know I know about its bytecode, don’t want to get into that discussion). So it runs exceptionally fast after the first time its run, which is great for a site with major traffic.

It’s a windows only lang. (Has be run on a windows server. And I know about Projects like MONO, but I’m talking about native support) Personally I love Windows Server, but it does limit you to a platform. This is probably its biggest con, cause as you know, if your on a budget, Windows Server isn’t cheap. I would say that it native support for MSSQL Server is a con, but now with SQL Server Express, thats no longer (to me) a vaild agrument.

I love PHP. Its portable, now also has OOP support, and myself as a java and c# programmer, I was able to jump on this language and build complex apps inside a day or two. Very easy to get into. PHP has a large community, and I have seen some high traffic PHP sites (meaning it can be interrputed really fast) The greatest benefit to PHP is that you can develop on it for nearly free. You can host it on free OS’s, PHP is free (although so is .NET) and its native support for mysql is top notch, and MYSQL is free. The only con I really see, is that if your not a c type programmer, and you did moreless basic type programming, you will have a bit of a learning curve.
My summary:
Both languages are EXTREMELY well suited. Its a perference thing. Don’t sit here and listen to .NET fanboys or PHP fanboys agrue and rave because its the only language they know. I have seen exceptionally well coded .NET and PHP sites, and I have seen poorly coded .NET and PHP sites. Both supports the major players in the DB formats (MSSQL and MYSQL). It boils down to this…
1.) If your on a budget, I say go with PHP (Free everything)
2.) If your wanting to build a site and a complimenting desktop application, go with .NET You will be able to reuse alot of code (if coded correctly of course)
3.) If your wanting to use a free OS or hosting on a linux box, go with PHP
4.) If your not c type programmer and BASIC makes more sense to you, go with .NET
5.) If your using SQL Server, or SQL Server EXPRESS, “I” Say go with .NET although PHP can hook into these as well, its just that .NET has great native support for MSSQL, and MSSQL Express
6.) If your working with webservices again “I” say go with .NET, you can handle webservices with great ease. But so can PHP. So this is a perference for me.

You can insert your comments and suggestions for this article.

Vijay Modi


About Vijay Modi

Having 12+ years of experience in web application development. Expertise in various domains like E-Commerce, E-Learning, Insurance. I have expertise in web application development, window application development, Performance improvement, bug fixing etc. I have worked on various Microsoft technologies including ASP.Net, MVC, WebApi, WCF, Entity Framework, WPF, Window Application Development, AWS, Azure, AngularJS 2.0 / 1.5.2, .NetCore framework, jQuery. I am believing in quality work and achieving deadlines. Also like to work on new technologies and quick learner.
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

8 Responses to PHP Vs. .Net

  1. I use PHP daily as well, and advocate it. However, your statement “In order to develop with ASP.Net one must obtain the extremely expensive Microsoft Visual Studio Programming Suite” is just wrong. Microsoft makes available the “Express” editions of Visual Studio, customized for C#, ASP.NET and other platforms, for free. Yes, you’re paying for Windows, but you likely have that already. There are enough valid reasons to choose one over the other, but this statement about the cost of development tools simply isn’t true.

  2. Vijay Modi says:

    Hi michael kimsal,
    I very thankful u to reading my blog and give me a suggesion. Once more thank you very much. Be in touch.

  3. bhumit patel says:

    i read your article it is really good . i am .net developer so i dont have much information about php. so i have some quiries about php.

    1) Can php support all things that .net support?
    2) As i know php is an object oriented programing language. can php supports all features of OOPs?
    3) Which one give better performance and how?
    4) Can we use functions of php application in other application?

    Pl reply me on my given email id.

  4. Vijay Modi says:

    Hi Bhumit Patel,

    Nice questions asked u here. I like thats all questions. I am giving the answers one by one, thats all are below:
    Ans:1 > .Net is a technology, while Php is the Open Source web development language. As mentioned above .Net contains many languages like C#, VB, J# etc.., You question (Can php support all things that .net support?) is very good. Actually depends on the requirements developer should choose which one is better for the project. Thats also depends on the resorces available in the company and the budget of company. For your information some ways .Net is better and on some way php.

    Ans: 2 > Please visit:

    Ans: 3 > actually to tell you the truth, PHP is much faster than ASP.NET, the reason being that PHP interprets all of its code inside of the PHP program itself, and since it is not accessing any other outside sources like COM objects, etc. It can produce a page in about 1/8 the time as a ASP.NET page can. Also the Database communication between MySQL is much faster in PHP, overall PHP has way better performance than any language, however, it all depends on your preference in language and the efficiency of your code.

    Ans: 4 > Can’t understand your question. Please retype it.

    Thanks buddy,
    Best Regards,

  5. aledrees says:

    hi Vijay – I am getting some sarcastic comments on a php/ article I published on my new blog!

    Can you have a read and tell me if anything is wrong. I would be really appreciative.

    Aled Rees Bsc

  6. Vijay Modi says:

    Hey Aledrees,

    I have read your article. Its good. But there is some points which you have to change.. Please read your article and check the mistakes you have done there.

    Vijay Modi

  7. Vishal Patel says:

    Hii Vijay,

    Great Article…

    I also love PHP…

    you have written in your article that some of the high traffic websites also use PHP i.e.

    m i right ??

    Vishal Patel

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s