is PHP excellent than ASP?

Source: Internet
Author: User
Tags ole php and mysql
is PHP excellent than ASP?

Seven reasons PHP is superior to ASP

ASP is a Microsoft company to implement Dynamic Web page of a technology. ASP supports some scripting languages, mainly Vbscripp. Compared to ASP, you can also choose another open source programming language--php,php can run under a variety of operating systems, including Linux and Windows.

Although ASP is a good technology, but in the long run I believe that PHP in the future technical field will have a remarkable performance.

I think there are seven reasons to say PHP is better than asp:

1, speed, speed, speed

When I first ran the php script, I couldn't help but say, "too fast," I was running my program on a 166MHZ machine, but it was still running fast.

ASP is never as fast as PHP, because ASP is built on top of the COM architecture. When writing ASP scripts with VBScript, actually using COM objects, when sending information to the user's browser, it uses the write method of the response object, which uses other COM objects when it accesses the database and file system. The use of these COM objects slows down the operation.

In PHP code, all of the work is running in PHP's memory space, which means that PHP is not based on COM objects, so he will run faster.

Here are the execution time statistics we ran a query statement in MSSQL7 40 times:

PHP querying MSSQL7 time (seconds)

With MSSQL extension 01.88

With ODBC extension 09.54

With ODBC via COM (ADO) 17.28

Using OLE DB via COM 06.19

When we use PHP.ODBC, it takes 9.54 seconds to access the database, and the COM interface to connect to the database requires 80% more time than PHP.

OLE DB is Microsoft's high-speed access to the database technology, he is faster than ODBC. But when we experiment with the efficiency of PHP and OLE DB, the result is that PHP's overall performance is 200% higher than OLE DB, so one conclusion is that if you do not use COM, you can get faster execution speed.

Of course, PHP execution speed is not the fastest, but we are just beginning, we will gradually improve him, and PHP is an open source programming language, many programmers in the world constantly improve his technology, I believe he will be more than the non-open source system to achieve higher execution speed.

2. Advanced Memory Management

Under the IIS4, An ASP script header.asp, if the 20 pages are included, then run, in memory will retain the 20 header.asp compiled copy, IIS5 solve this problem, but only windows2000 support IIS5, because of this IIS5 can not be compatible with the reasons, many The server still has to use low-level memory management under IIS4.

In PHP, there is no such problem, and an include file is called only when require.

3. No worries

One thing I hate the most is to buy a product that is not reassuring, such as when you buy a car, but because the engine is bad, you need to replace him; when you buy a house, you have to mend the leaky roof.

So ASP old Township These products, when you buy ASP, if you need encryption technology, you have to buy aspencrypt, when you need email management, you have to buy serverobjets Qmail, when you need file upload, you also want to buy artisans Sa-fileup.

4. mysql makes PHP more exciting

The combination of PHP and MySQL is both simple and exciting. PHP has many tools for managing and maintaining MySQL, and the support for MYSQK is the most comprehensive. Many useful functions, such as mysql_insert_id and Mysql_affected_rows, are not available in other databases.

Both ASP and PHP are ideal solutions for medium-sized web sites, but PHP's close integration with MySQL makes PHP superior.

MySQL is much faster than Microsoft Access, and MSSQL and Oracle are faster than MySQL, but at a higher cost.

5, Java and C + + into a style

This advantage is just a view.

I know you're not going to believe that a Visual Basic programmer will turn to PHP because PHP has Java and C + + programming styles, but you will believe that many people still like Java and C + +, PHP is an easier to learn language with the programming style of both languages.

PHP supports structured programming, in VB because he inherits the use of classes or less. The inheritance of PHP, like Java and C + +, makes a large program full of class shadows everywhere.

6, the handling of the bug

Have you ever asked Microsoft to modify some of the bugs in ASP? If you are not an organization like Boeing, you cannot get quick and proper modifications, and if you stop working when you encounter a bug, you will not be able to continue your work if the bug does not change.

PHP, when you find a bug, you can modify him, if you do not have the level of experts, you can ask experts to modify, and your changes will get open Code organization acceptance and recognition.

7. Transplant Sex

Microsoft often modifies ASP, and the next version, called Asp+, has now started testing. I am sure they will revise many of the questions I have mentioned. But there is no doubt that Microsoft will limit you to their product range.

I used to be an Apple programmer, when Windows95 came out, I started to change, but many of the original code can not be run under Windows95, the code is now put aside, I am very sorry. So I don't want to have this kind of tragedy again under Windows.

Don't forget that Novell used to be as hot and temporary as Microsoft's Web operating system, but now it's not used by many people, and so does Microsoft.

I found PHP and I still work under Windows, but I know that PHP code can run on Solaris, Linux, and many other operating systems, and my heart is comforting.

The above is the introduction of PHP is better than ASP, including the content, I hope the PHP tutorial interested in a friend to help.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.