Home  >  Article  >  类库下载  >  About the differences between the three technologies of PHP, JAVA, and .NET

About the differences between the three technologies of PHP, JAVA, and .NET

高洛峰
高洛峰Original
2016-10-13 09:49:131375browse

A friend is asking questions in this regard. I will sort it out and post it for everyone, so that beginners can have a reference when choosing technology.
The three programming technologies each have their own advantages. We can probably distinguish them from two points: language and platform:

1. Language:

PHP: PHP was produced in 1994, and its syntax is a mixture of C, Java, Perl and other languages. Some innovative programming syntax; PHP is executed embedded in HTML; it is also an interpreted language. The early PHP was not a completely object-oriented programming language. It was only in versions after PHP 4 that object-oriented concepts began to be introduced.

JAVA: JAVA was born in 1995. The JAVA language and JAVA platform are collectively called JAVA; its syntax is very close to the C language and C++ language, and JAVA is an object-oriented programming language, and JAVA is a compiled language. You can compile the JAVA source code first After being converted into a .class file, it is interpreted and executed on the JAVA virtual machine.

.NET: In .NET, multiple programming languages ​​support development such as: VB, C#, F#, etc. Usually we use C# for programming. C# is a programming language specially created for the .NET platform, producing with the year 2000. Its language syntax is similar to JAVA, C, and C++, and it is also an object-oriented programming language. C# also needs to be compiled into a .dll file, which is then compiled and executed by the CLR in the .net framework.

Language distinction: The biggest difference between PHP, JAVA, and C# these days is the execution method. There are also some differences in the language itself, such as whether it is strongly typed, whether it can be dynamically compiled, whether it is multi-threaded, whether it is distributed, whether it can move values, etc. As for the performance issues that many people talk about, I think there is not much difference in the performance issues of the language itself. The key lies in how the programmer writes the code. In addition, there are certain differences in the database combined with the language. PHP usually uses MySQL database, JAVA usually uses MySQL or Oracle, and C#, because it is a product of Microsoft, usually uses Microsoft-related databases such as Sql Server or Access. Sometimes Sqllite database is also used.

2. Platform:
PHP: When most people call PHP, there is no distinction between platform and language. We often only use PHP for WEB application development. As for the development of desktop applications, it seems that PHP has developed this kind of development platform in recent years, but it is almost impossible to see it in real applications. But it has to be said that PHP performs very well in WEB presentation layer applications, and has good advantages in terms of handling interface layout and performance.

JAVA: When we call JAVA, we often don’t necessarily mean the language itself, but the JAVA platform. In the JAVA platform, you can use the JAVA language to develop various applications, such as: Java SE, Java EE and Java ME, which are used to develop JAVA desktop applications, WEB applications, mobile applications, etc. respectively.

.NET: In the .NET system, there is a clear distinction between language and platform, and multiple languages ​​can be developed on one platform, which allows programmers who master different languages ​​​​to develop the same application. In the .NET platform, like JAVA, you can develop different applications, such as: WinForm (desktop application), console application, ASP.NET (WEB application), WPF (new desktop application), WCF (network communication foundation) Applications), WEB services (service-oriented programming applications), ASP.NET MVC3.0 (new WEB applications), XNA (desktop and mobile game applications), etc.

Platform distinction: All three technology platforms can be used for our commonly used WEB applications. For desktop applications, PHP is not very suitable, and JAVA does not have better development tools for desktop applications. In this regard, the .NET platform has better advantages. Both Winform and WPF are very suitable for desktop applications. As for implementing some underlying complex businesses, PHP is not as good as JAVA and .NET, but it has better advantages when doing the front-end presentation layer. Therefore, many complex large-scale comprehensive applications may have .NET or JAVA as the data access layer and business logic layer, and PHP as the presentation layer. It is said that Taobao was developed based on this method. At the same time, both JAVA and .NET can be cross-platform, and .NET can also be cross-language.

Summary: Please note that no matter any programming language or technology platform, there is no good or bad, only suitable or not. Different technologies need to be used when developing different projects. Of course, as a beginner programmer, you need to start with a programming language and platform that is relatively easy to use, and develop your own learning abilities and interests. Only by laying a solid foundation can you continue to grow in the ever-changing technology updates in the future.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more