Question:
What are the main differences between PHP/MySQL and ASP.NET?
2009-04-15 20:06:55 UTC
I know one is open source and the other is microsoft. I want to create a database driven website and have only ever learned basic ASP and SQL many years ago. People have recommended I learn PHP these days, but I am not entirely sure why...other than it's cheaper (I think?) Which one is the easiest to learn and write? I never had to spend money when I wrote ASP before so I'm not sure where the cost issue comes in (more expensive to host?)
Five answers:
just "JR"
2009-04-16 01:43:01 UTC
PHP, (www.php.net), while loosely based on C and Perl, has never faced the overwhelming complications ASP has. PHP is an object oriented language - though scripts need not necessarily be developed that way (there are still a vast number of developers preferring procedural programming, and PHP caters to both schools). PHP is both cross platform and open source, available for every major operating system and works with most web servers. It is easily extendable by anyone capable of coding in C, and comes pre-bundled with more functionality than ASP could ever offer. Simple capabilities, such as FTP, data compression, file uploads, XML, MD5, encryption and email are not included in ASP and require expensive, third-party packages to be installed. All of this functionality and more are built right into PHP. Complex functions such as dynamic images, IMAP, SNMP, dynamic flash, PDF, native access (non ODBC) to Oracle, Ovrimos, Postgre, Sybase, mySql, MSSQL, Ingres, Interbase and Informix databases, LDAP, and sockets, just to name a few, are available for free to any installation of PHP, but are not (and probably never will be) available with ASP. In addition, one could make the point that PHP is a more mature language than ASP. ASP has only been around since 1996; PHP has been around since 1994, and has a huge base of developers working on it every waking minute of every day; bugs are usually fixed within minutes of being reported and new features are being integrated daily.

1) ASP is significantly slower than PHP, for obvious reasons. Primarily, PHP runs on notoriously fast Unix and Linux servers which have for years outpaced Windows running on comparable hardware. ASP does not run on any operating system other than Windows, and even then, only in IIS and PWS. I could discuss countless reasons why IIS makes a terrible web server, but that would be a discussion all on it's own. PHP runs on almost any web server, on almost any platform. I have even built a web server in PHP which was capable of executing PHP scripts.

2) ASP natively supports only Access and MSSQL, whereas PHP natively supports a huge number of databases. They both support ODBC equally well. MySQL is a database that PHP closely integrates with; it is a very powerful database that rivals Oracle in speed. Like PHP, MySQL is free, and blows most other databases out of the water. Another hidden cost with ASP is the database angle; Microsoft expects you to develop using Access and when your webpage outgrows it, to switch to MSSQL, an extremely expensive option.

3) While even the best software has glitches, PHP has notoriously few. The PHP development team has an outstanding reputation for fixing bugs, and in order to streamline the process they even have an online system through which new bug reports can be submitted. Most bugs are resolved within 24 hours, and I'm speaking from experience here. There are a huge number of outstanding bugs in ASP which will probably never be fixed. Unless you're a major corporation, chances are that your bug report to Microsoft will likely go unanswered.

4) And finally, cost. PHP is free. ASP isn't free. If you want to use ASP, you have to use IIS, and if you want to use IIS, you have to buy Windows. Traditionally, the cost of Windows has been high. Microsoft has been aggressively trying to reduce this factor but they're hardly going to give Windows away for free. The cost of running an ASP-based website implies a full Windows server platform; development costs are higher, software licenses are expensive and speed, security and flexibility are all sacrificed.

There's a reason that Unix and Linux are dominant in the server market: money, security and performance all speak volumes.
2009-04-17 01:04:44 UTC
Hello,



Really in this type of application, the main decision comes down to PHP and ASP .NET PHP is a relatively simpler language to use than ASP.net. Many developers find themselves to be more at ease with the user-friendly nature of PHP when it comes to coding. However, critics also count this advantage of PHP as a disadvantage. Some of them maintain that the language of PHP has not been updated much, and hence it is still quite archaic and even, somewhat cumbersome for coding. ASP.net, which is a relatively new development, has a lot of options when it comes to languages. Here, you can use languages such as C#, J#, C++ and VB.net. Hence, when it comes to sheer choice, ASP.net has better to offer. But PHP is no less, since it can do its task quite well, even with its minimum language tools. The main thing your site will be used for is database reference. PHP is has much better support for the database management system, MySQL. This factor alone should probably help you make your decision. There is a lot to debate on about the worthiness of PHP over ASP.net or vice-versa. There is probably no end to it, and there never shall be. The problem mainly is that both of them are good in their own place, but people who have been staunchly using PHP for several years now – some of them for more than a decade – would certainly not like to go in for the new ASP.net. The price to be paid is quite high, i.e. learning a whole new syntax and getting used to it. That is more the reason why PHP is still so popular.



Good Luck!

Sean Colicchio

Server Engineer

Host My Site

http://www.hostmysite.com/?utm_source=bb
mmarrero
2009-04-16 17:27:10 UTC
You can host your webpage in your own PC with your current internet connection for free.

1. Set up a dynamic DNS service, like DynIp. I use NoIp, which is free. Almost all routers support one or more providers.

2. Install IIS, unless you're unlucky to own XP Home

3. Download and install Web PIatform Installer from Microsoft, which includes the .NET Framework, SQL Server Express 2008, Visual Web Developer 2008.



My cheap $250 home PC server has only has a 256Kbps upload speed. I wrote a "porfolio" web application in C#, ASP.NET.



IMHO, if you plan to become a web guru, Linux sysadmin, or at your job there are Unix servers, choose LAMP (Linux, Apache, Mysql, Php), otherwise choose M$.
2009-04-16 03:12:09 UTC
php is the standard. Most real Web servers do not support asp. php is easier to use, faster, and more secure if used properly. And mysql is the standard database.
smithersprime
2009-04-16 03:14:49 UTC
In php you can basically pipe through the select etc commands.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...