Based on the four aspects of price, speed and efficiency, security, open source or not, this paper analyses the pros and cons of PHP and ASP.net, and the author thinks that the performance of PHP in terms of price, speed, efficiency, security, platform support and open source is far more powerful than weakness.
Whether you've chosen PHP or not, according to its performance on price, speed, efficiency, security, platform support, and open source in the table below, we can tell that its strengths are far more than weaknesses. The only disadvantage is the lack of object-oriented support. However, this is a relatively minor flaw, although the structure of the language can not be ignored, but in the end, good coding is due to repeated practice, implementation, good habits and discipline.
|
PHP 4 |
PHP 5 |
asp.net |
Software price |
Free |
Free |
Free |
Platform Price |
Free |
Free |
$$ |
Speed |
Strong |
Strong |
Weak |
Efficiency |
Strong |
Strong |
Weak |
Security |
Strong |
Strong |
Strong |
Platform Security |
Strong |
Strong |
Weak (IIS only) |
Platform Support |
Any |
Any |
Win32 (IIS only)) |
Whether open source |
Is |
Is |
Whether |
Exception mechanism |
Whether |
Is |
Is |
Oop |
Weak |
Strong |
Strong |
Price: I will not simply consider the price of the first investment, it is obviously free for PHP, but we also have to think about the cost of development, maintenance and commissioning, and you may want to buy Zend optimization engine. For ASPs, you will be investing in the product at the outset, and you'll be spending extra on the technology, such as buying graphics-processing libraries, or whatever. But in the long run, PHP won't ask you to pay for upgrades or buy more license. Anyone who has ever contacted license will know that companies often spend a lot of time and money on ensuring product compatibility. In addition, the feedback processing of finding bugs and fixing them varies, which can also be converted into time consuming, which in turn affects the cost of the entire development.
Speed and efficiency: As I mentioned earlier, ASP. NET is a framework that allows you to use a variety of different programming languages. In addition, it boasts an excellent object-oriented programming model. That is true, but it has brought about a decrease in speed. Speaking of these advantages, for the same function of the page, compared to PHP, running ASP's pages need their server analysis, execute more code. and PHP is the "fast-food" solution, first the function is done, there are a lot of robustness problems can be left to 2.0 or 3.0 to supplement, and its core code has been compiled optimization, the program can run at high speed. Speed is not the only consideration, and memory consumption is also important.
Security: asp.net runs on top of IIS, a system that has been attacked countless times, with similar messages on almost every week's it news. In fact, it has become a liability, and many IT professionals have refused to expose their networks to IIS Web servers, regardless of how many dollars the entire market has invested. PHP and Apache work together, it has a good speed, reliability performance, but also excellent security.
Platform support: ASP.net was originally run in IIS and can now run on Apache, while Apache can run on all platforms. PHP is inherently designed to run on Apache, so you have a lot of proven platforms to choose from.
Open source or not: Open source is not just a patent for idealistic programmers, nor is it unique to companies that want to save dozens of of dollars on license. When you come across a bug in the software you buy, open source can be a godsend.
Whether it's in asp.net or PHP, there may be a lot of users using your software and discovering bugs. For ASP.net, these bugs have to go through a bureaucratic process to tell, fix, validate, and then wait until the next patch is released. And the fixes and releases of PHP are fast. Anyone who has seen open source development knows that a new product release or patch is often a matter of days rather than a few weeks or months of business software. If you think that's not fast enough, if you want, you can fix it yourself.