Home  >  Article  >  Should I learn PHP or JAVA for website development in 2019? Which is better?

Should I learn PHP or JAVA for website development in 2019? Which is better?

藏色散人
藏色散人Original
2019-03-01 16:02:5611586browse

For students who are new to IT, should you learn PHP or Java? Which is better? It is indeed a question that can make people have difficulty choosing. And even professional programmers will face the same problem. As the saying goes, there are too many skills to overcome. So if you want to choose between PHP and Java, you need to understand their respective advantages and disadvantages.

Should I learn PHP or JAVA for website development in 2019? Which is better?

Understand Java

Java is a computer programming language. Like C, Python and other programming languages, Java Wide range of applications. From the Android mobile apps we use every day to the application server programs of most websites or management information systems, they are all written in Java.

Advantages: JAVA is cross-platform and has many applications, such as Android, Swing, J2EE, J2ME, etc. The employment opportunities are wide and the market demand for employment is huge. Java mostly develops large-scale systems, so large enterprises often need many Java talents. (Free tutorial recommendation: JAVA video tutorial)

Disadvantages: JAVA has a high learning threshold (compared to PHP), and you need to learn many open source frameworks before learning to build a technical architecture. The learning cycle is long and development is complicated. Requires team development.

Understand PHP

PHP is the abbreviation of Hypertext Preprocessor and is a computer script language (Script languages). Scripting languages ​​do not need to generate binary executable files at compile time like programming languages, but directly execute the written PHP code to achieve the effect. Like the same scripting language JavaScript, PHP is also an interpreted language, which can be directly interpreted and executed.

Advantages: PHP is mainly used for website development. Currently 85% of domestic websites are developed using PHP. PHP is open source, which makes PHP durable. The reason for its longevity. In terms of e-commerce and communities, PHP has very mature open source codes and templates, which makes PHP extremely widely used. Famous companies using PHP include: Unilever, Philips, NTT, Cisco, Japan Airlines, Air Canada, Lufthansa, GE Marketplace, Wallstreet:Online Germany, AuctionWatch, VillageVoic, Dialpad and BMC, etc., among the top 40 websites in the world More than 20 of them were developed in PHP language. (Recommended course: PHP Chinese website sixth phase online class)

Disadvantages: The later scalability is relatively poor; there is substitutability.

Let me share with you an article on Zhihu about "How to view the development of PHP?" "Highly praised reply, I hope you can benefit from it!

Gao Qing:

I have been working in PHP for 10 years. In the past few years, I have been relatively little touched by PHP. With the rapid development of nodejs, php is the best at it. Web development has been replaced by many companies with front-end and back-end separation. After the back-end provides interface services, the advantages of heavyweight languages ​​​​such as Java have become more prominent. If purely processing web pages, PHP will soon be replaced by node-related products. The reason It is because the front-end is more friendly to js, ​​and php's own strengths cannot be fully utilized;

In a long-term maintenance project, php is easily replaced. In recent years, everyone has gradually turned their attention to swoole. I have also used swoole in production projects to make websockets. Now it is also running in a formal environment. This framework is very good and I am optimistic about it in the long term. However, there are only a few companies that can use it. , not many. At present, it seems that it is the gaming industry, video live broadcast industry, etc., but learning a technology that is not used much will be very tiring. In many cases, it is just like talking on paper and will not last long.

php7The new features are great, but ask people around you how many are using php5 to run projects, based on php7 There are several excellent frameworks. All phenomena are on the surface. My beloved php has begun to slowly become indifferent.

However, from an optimistic point of view, PHP already has a place in the market, and PHP still occupies a high share of ordinary web sites. There are also many old systems that are refactored using PHP; when I suggest architectures to some companies, I still recommend using PHP for new projects . I have led java, .net, and PHP teams, php It is definitely No. 1 in development efficiency; A language always has its cooling-off period and will always be impacted by other new languages. This is the process it has to go through;

One more thing, currently A large part of the reason why PHP is not as popular is that there are not as many startups as before. As a batch of startup companies have collapsed in recent years, PHP developers are slowly entering a job shortage. There is no such thing as before. It's so easy to find a job. And they have a fatal problem. Most of them are doing implementation, so many people have little experience with high concurrency and big data.

As for saying that PHP cannot have high concurrency and big data, it is all nonsense. Big data has nothing to do with language. The architecture of the database is the key. The weakness of PHP is intensive calculation. In ordinary web sites, the bottleneck is in the data layer, so there is nothing easy to calculate. High concurrency has nothing to do with language. It depends on how you use cache and how you build a web service architecture. As for AI, the most used one now is probably PHP's brother - python, which is both an interpreted language, and Python has many class libraries for artificial intelligence. I don't know much about Java, so I don't know it. Evaluation

In short, I am still optimistic about the language PHP in the long term. Language is a tool. Just use it to do what it can do and give full play to its capabilities.

For language learning, I think you need to be proficient in at least 3 mainstream languages ​​​​and understand about 6 popular languages. One is not to let yourself hang on a tree, and the second is to not let yourself hang on a tree. The first is that after learning multiple languages, you will be able to correctly evaluate the advantages and disadvantages of each language, and which language to use on what occasion;

Summary suggestions: Newbies who want to learn website development, choose php is a shortcut! ! !

Related recommendations:

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