Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What are the advantages of using ASP.NET over PHP?

PHP is an open source language that will cost you practically nothing, while ASP.NET is a Microsoft technology that you have to purchase. So when to choose ASP.NET over PHP?

user-image
Question added by Deleted user
Date Posted: 2013/04/15
Muhammed Effat Ahmed Afifi
by Muhammed Effat Ahmed Afifi , Project Leader [Microsoft Business Unit] , Wipro Arabia Limited

For sure Asp/Asp.net are full of advantage over PHP which are listed as follows: 1- Visual Studio. 2- LINQ 3- The ease with which you can convert an ASP.NET application to a desktop client, mobile or webservice - if designed correctly you just provide a new presentation layer. This isn't possible with PHP. 4- The sheer power and elegance of C#. 5- The integrated nature of the technology stack - CLR support in MSSQL Server for example. 6- PHP is an interpreted language - ASP.NET is compiled 7- The framework class library and you can find more and more adv. if you surf the internet like : security,usability and reliability.

Deleted user
by Deleted user

Depends on your webserver, and your language knowledge.

Zubair Ali
by Zubair Ali , Software Developer III , S&P Global

AS Development point of viewASP.Net provides you manage controls and libraries to help build your UI more easily and less worry about browser combatibility.  Beside UI it provides you with better communication and data transformation medium. 

Network support, secuirty implimentation, profile management, session management on state servers and other powerful configurations will lesser effort are beauty of ASP.Net

Hazem Salama
by Hazem Salama , Senior Member of Technical Staff , Verizon Communications

ASP.NET will also practically cost you nothing. What you pay for is the IDE (Visual Studio) but even then you can get by using their free edition. The only downside is that you need a Windows machine, where as in the PHP case you can develop on pretty much any OS (Mac, Windows, or Linux). I know you can still develop .NET on Linux using the Mono project, but I am just talking mainstream here. It really boils down to your clients' needs and/or your interest. ASP.NET is a much better option if you use C#, since the language has a modern design and avoided a lot of the pitfalls of its predecessors. Unlike VB.NET (and PHP for matter) that has been modified over and over to make it more modern and resulted in some crazy stuff being added in or has been bloated for backward compatibility. So in short, if you'd like to enjoy coding, I'd suggest ASP.NET with C#, just my two cents!

Deleted user
by Deleted user

I think a lot of this depends on your personal preference too

Emad AL Hawary
by Emad AL Hawary , Business Analyst | Project Management Professional , GCS

PHP Overview

PHP stands for Hypertext Preprocessor. PHP originated as a scripting tool that has quickly taken over the internet thanks to its easy learning curve and large developer community. According to one estimate, PHP is installed on over244 million websites with server support from virtually all major hosts. PHP is also free and boasts a number of frameworks to simplify web development.

Some of the major websites written in PHP include WordPress and Facebook.

ASP.NET Overview

ASP.NET was developed by Microsoft to provide developers with an easy scripting tool for building web pages and web applications. It is a successor to ASP (Active Server Pages), another platform pioneered by Microsoft in the mid-90s. You can code ASP.NET using any .NET supported language, which made it especially popular among .NET developers. Microsoft’s early domination of the web browser market with IE was also responsible for increasing the popularity of ASP.NET.

Some of the major websites that use ASP.NET are PlentyOfFish.com and MySpace.

The question now is: what language should you choose if you are starting out as a programmer?

Costs

This is a no-brainer – PHP is completely free, while ASP.NET is a Microsoft product. This means there are certain costs associated with ASP.NET development, namely:

  • Buying Windows, since ASP.NET development is possible only on a Windows machine. This shouldn’t be a problem for most people. If you use a Mac or Linux, you can use the Mono project to use ASP.NET on your machine.

  • ASP.NET requires Windows hosting. Until a few years ago, Windows hosting used to be significantly more expensive than Linux web hosting. This is hardly true today; you can easily find Windows hosts for almost the same price as Linux web hosts.

  • A development environment. The most popular IDE (Integrated Development Environment) for ASP.NET is Visual Studio. Microsoft also offers a free version of VS called VS Express.

As a beginner, you won’t have to specifically shell out extra for using ASP.NET, but once you upgrade to the professional stage, you will need something like Visual Studio, which can set you back by a few hundred dollars.

PHP, on the other hand, is entirely free, runs on Linux web hosting, can be used on Windows, Mac or Linux, and is supported by a number of free and paid IDEs.

Winner: PHP

Scalability

Both ASP.NET and PHP are highly scalable. Consider that Facebook, the second most heavily trafficked website in the world, was originally built in PHP, while MySpace, the website Facebook dethroned as the world’s favorite social network, was built in ASP.NET. This illustrates that both ASP.Net and PHP are highly scalable, as long as the programmer knows how to scale their application.

Winner: Tie

Performance

Performance for most web applications is a function of the interaction between the script, the database and the server. Most web applications written in PHP follow the LAMP stack – Linux (OS), Apache (server), MySQL (database) and PHP (scripting language). The LAMP stack is extremely popular for web development, and thus, has been optimized extensively for improved performance.

The database used most often with ASP.NET is MSSQL (Microsoft SQL Server), although you can also use MySQL with it. The performance different between a ASP.NET+MSSQL stack and a PHP+MySQL stack are very small with PHP+MySQL edging out ASP.NET.

Another factor that affects performance is the OS and file system used on the server. Most tests indicate that Linux and ext4 file system have better I/O performance than Windows and the NTFS file system. Thus, there’s a good chance a PHP application running on a Linux web host will slightly outperform a similar ASP.NET application running on a Windows host.

Winner: PHP

Support

PHP is free and among the most popular scripting languages online. There’s a huge open source developer community that regularly contributes to PHP development. The open-source community also tends to be very helpful, which is a big bonus for beginners.

ASP.NET, on the other hand, is a Microsoft property. While you’ll find plenty of developer boards run by ASP.NET enthusiasts, the scene is nowhere near as vibrant as PHP’s.

Winner: PHP

Availability of Tools and Editors

Most PHP developers prefer using text editors like VIM and Notepad++ instead of a full-fledged IDE. If you did want to use an IDE, however, you’ll find solid support for PHP in free editors like Eclipse.

ASP.NET is also supported by most IDEs but is mostly used with Microsoft Visual Studio. Microsoft VS is one of the most powerful, feature-rich and flexible IDEs around, even though it is not free. Thus, if you’re willing to shell out the cash, you’ll find that no PHP editor/IDE comes even close to Visual Studio.

Winner: Tie

Using Visual Studio? This course on C# with Visual Studio will help you get started.

Ease of Learning

PHP wins this one, hands down. ASP.NET is usually written in C# (pronounced C ‘Sharp’). C# is built on C which can be difficult to learn for most beginners. Its syntax is complicated and difficult to read, even for experienced programmers. People new to programming will find ASP.NET hard to pick up.

PHP, on the other hand, is very easy to pick up (so much so that most seasoned developers consider PHP coders as ‘newbies’). You can learn a few simple lines of code and start tinkering with WordPress themes almost right away.

Winner: PHP

Language Popularity

According to the TIOBE  Language Index, PHP ranks as the6th most popular language online. ASP.NET, on the other hand, doesn’t even show-up in the top20.

Winner: PHP

Conclusion

Unless you are already familiar with the .NET framework or want to stick to Microsoft technologies, there is no discernible need to use ASP.NET over PHP. PHP can do everything that ASP.NET can, and it can do it for free.

 

Panneer selvam xavier
by Panneer selvam xavier , Supply Chain Analyst / Trainer , Infonet

PHP will run on essentially any server, for free. That's a fairly compelling feature for many folks. There are lots of pros and cons of both, and it certainly doesn't boil down to scripting vs. compiled (incidentally, opcode caches like APC and things like Facebook's HipHop even the score on that point). I'd say if someone's recommending PHP over ASP.NET, they code primarily in PHP. If they're recommending ASP.NET over PHP, they code primarily in ASP.NET. There's probably not much more to it than that in the responses you're getting

Romany Saad
by Romany Saad , manager of gamified education department , United group

short answer:

if you want to develop fast use PHP, if you develop big systems with high availability you need more robust language to stand upon like C#.

 

long answer:

ASP.Net not to be compared with PHP as ASP.NET is a set of technologies and configurations built on top of Microsoft IIS that needs a programing language to take instructions into action 

 

PHP is a server side programing language.

PHP started to adapt OOP gradually before few years now PHP is alomst as strong as any OOP language as it now supports unit testing and all other tech standerds 

PHP is more flexible than C#.NET & VB.NET

On the other side .NET is a very fluent and robust and C# is now way far infront of Java and PHP as a programming language.

Syed Adeel Ali
by Syed Adeel Ali , Software Manager , BAHRIA TOWN PRIVATE LIMITED

Asp.Net is highly integrated.

If you want to build simple and fast database integrated website use PHP.

If you want to work Opensource use PHP.

If you want to build enterprise application then use Asp.Net

mohamed yassin
by mohamed yassin , Mud engineer , Scomi

hoe can i know it it is not my intrested study

  • Because the ASP.NET is rapid application
  • Compiled Web Application is working more faster and nobody can see your logic / code.
  • very easy to use, 
  • Freedom of using multiple languages in asp.net
  • easy to use thread for building asynchronous process.
  • asp.net we got more third party control and libraries.

 

More Questions Like This