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. asp.net. 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.
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.