The two armies competed with each other, and PHP and ASP. NET fought against each other

Source: Internet
Author: User
Tags what is asp
You have many choices when talking about Web development. Many of these methods involve preprocessing-that is, embedding code into HTML pages using specific tags that tell the preprocessor that they contain code and should handle it. Similar to CGI, these codes run on the server and return some content, which shows the partial appearance of the HTML page returned to the browser. The open source scripting language PHP and Micros now have many options when it comes to Web development. Many of these methods involve preprocessing-that is, embedding code into HTML pages using specific tags that tell the preprocessor that they contain code and should handle it. Similar to CGI, these codes run on the server and return some content, which shows the partial appearance of the HTML page returned to the browser. Open source scripting language PHP and Microsoft ASP. all languages in the. NET Framework belong to this type. the explorerver Pages (jsp (preferred for SUN Enterprise applications) and Perl/Mason also run in this way.
  
In this article, I will focus on the technologies-and ASP. NET that PHP-Oracle (large website database platform) has chosen to merge into its products. I will outline the strengths and weaknesses of both, and focus on factors that will help you decide which technology your development project should choose. There are many factors to consider. different projects may resort to different technologies. In short, you will see a comparison of price, speed and efficiency, security, cross-platform support, and other aspects, as well as the advantages of open source code solutions.
  
   What is ASP. NET?
ASP. NET, the latest version of ASP, is not completely backward compatible with earlier versions of ASP, because the software has been completely rewritten. In fact, the early ASP technology has much more in common with PHP than ASP. NET. ASP. NET is a complete framework used to build Web applications. One of the main features of this model is the flexibility of programming languages. ASP. NET can use scripting languages (such as VBScript, JScript, Perlscript, and Python) and compilation languages (such as VB, C #, C, Cobol, Smalltalk, and Lisp ). The new framework uses the universal language runtime environment (CLR). First, the source code of your language is compiled into Microsoft Intermediate language code, and then the CLR executes the code.
  
This framework also provides real object-oriented programming (OOP) and supports true inheritance, polymorphism, and encapsulation .. NET class libraries are organized into inherited classes based on specific tasks (for example, using xml (standardization is getting closer and closer) or image processing.
  
In addition to programming languages and methods, database access is also a key concern. When you use ASP. NET programming, you can use ODBC to integrate the database. ODBC provides a set of consistent calling functions to access your target database.
  
   Strengths and Weaknesses
The advantage of ASP. NET is its concise design and implementation. This is the dream of object-oriented programmers: flexible language and support for complex object-oriented features. In this sense, it can truly interwork with existing skills of programmers.
  
Another advantage of ASP. NET is its development environment. For example, developers can use WebMatrix (a tool supported by the community), Visual Studio. NET, or a variety of Borland tools (such as Delphi and C ++ Builder ). For example, Visual Studio allows you to set breakpoints, trace code segments, and view call stacks. All in all, it is a complex debugging environment. Many other third-party ASP. net ide solutions will also emerge.
  
However, if you get robustness, it will be at the cost of efficiency loss. ASP. NET consumes a lot of memory usage and execution time, most of which is due to a long code path. For Web-based applications, these limitations may be a serious problem, because on the Web, your applications may expand to thousands of users per second. Memory usage may also be a problem on the Web server.
  
   What is PHP?
PHP is a script language based on the pre-processing HTML page model. When the PHP preprocessor in the Web server finds a PHP language mark like the following, it will call the PHP engine to execute the code:
  
   Some code here
?>
  
Any programmer who has used imperative programming languages will be very familiar with PHP; you will find it syntactically similar to Perl, C, and Java. Strictly speaking, Java is a imperative programming language, but it also utilizes object-oriented structures and concepts. PHP draws on this structure when appropriate, but it is not a pure OOP language.
  
In the above discussion with ASP. NET, I mentioned the ODBC driver and how to build an application while considering database abstraction. In PHP, you can also use ODBC to talk to a database, so you already have a series of supported databases to choose from. There are also native drivers for MySQL (the best combination with PHP), Oracle (large website database platform), and IPVs. In addition, if you want to use Oracle (a large website database platform), a special OCI8 database will provide more access to Oracle (a large website database platform, this allows you to use features such as LOB, BLOB, CLOB, and BFILE.

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.