In terms of current technology, which background technology Java can do PHP do not do?

Source: Internet
Author: User
Keywords java php
Tags zookeeper
I feel PHP has gone beyond Java, and I don't know why many big companies still use Java.

Reply content:

Storage, distributed computing, some of the underlying, is not the domain of PHP.
"PHP is the best language", originally a sarcastic irony, now seems to be a lot of people believe it.

PHP is a very bad language, I will tell you clearly. However, in the real world there are a lot of splicing strings beyond the work of PHP does not do intensive computing applications. PHP This language is good, so long as I build the service does not support the PHP call will not allow me to build so ...
"Why not do service discovery based on zookeeper" "PHP"
"Why not transfer logs via Kafka" "PHP"
"Why do you look so stupid B" "PHP" rookie one, forced to answer (escape

Personally think that PHP in writing business logic above is very advantageous, after all, the syntax is simple and rough, direct writing logic, throw in the direct run, need to worry about less things. So the open source program is mainly for the CMS forum and other applications.

And Java has accumulated many years of resources in distributed and middleware, zookeeper Activemq Kafka Hadoop. The company's business is a little bigger, and these things are always hidden away. All use Java development, the company only need a group of Java Research and development team, each part of the problem can be solved, maintenance team more worry.
Of course, lazy did not check the corresponding PHP solution. I guess there should be no alternative to Java than the maturity level. (Escape

The individual in writing the program compared to PHP, for reasons such as, simple rough. I hope PHP can replace the Java industry status, after all, there is a lot of place to pack the strings.


Finally, I quote the story of the wheel brother. Technology selection is generally not a technical problem. is a political issue. Write extension in C, call in PHP, calculate PHP language? The basic thing is that you can't do it. The reason is simple, PHP can not * very convenient * To use the excellent open source Java framework. Here's the point:
From a language design perspective, Java is for large enterprise applications, while PHP is a Web application for small and medium-sized enterprises.
What the Lord says cannot, I understand it is very difficult, the cost is very big. After all, PHP can be understood as the syntax, Python has Jpython, PHP to make a jphp difficulty is not too big.
The beginning of Java design was to replace C + +. Part of the process, such as memory processing, makes the virtual machine complete, and programmers don't need to think. For example a program c++2 hours, often Java 1 hours is enough, PHP of course faster. The cost is that the program is inefficient, such as Java to automatically free up memory, PHP has to do type conversion.
in addition to developing Web programs, PHP is a bit stretched out in other areas.
Java has SWING,GWT to do interface development (c/S field), PHP does not.

The Java process can run for a long time, and PHP's footsteps tend to run for a while, restarting a new one.

Gc:java is in a program that cares about how memory frees up without pausing a virtual machine, and PHP is still in the process of reducing memory consumption.
When Io:java has NiO, PHP can only basically read and write files.
Threads: When Java has its own thread pool, PHP can only fork out the process

Java is a statically typed language, and it is easy to find errors (the IDE can be smarter). Therefore, it is more suitable for writing algorithms than PHP. such as Weka's data mining algorithm library.

Java has Oracle IBM, and Zend has been acquired. What can compete with Java is C #. NET, not PHP. Does this question make sense? You understand that "backstage" is just a CRUD?
  • 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.