Brother even education in the long ago, answered a question about the back-end language selection, then what are the back-end language, what are the advantages and disadvantages? So brother even share with you a little bit of experience.
Language Advantages and disadvantages
C + +
C language is very close to the operating system of the language, and the operating system API very good interaction, but the C language does not require modern engineering development needs of the object-oriented features, of course, also lacks the functionality of generics, if the CGI Development, the drawbacks are obvious, which is why the second-generation backend platform is emerging.
C + + has a variety of features required for modern engineering development, but it also has drawbacks:
lack of string handling, The main thing about WEB development is the processing of strings, almost all of which have to do with strings, but the worst thing about C + + is string processing, only std::string the string class provided by this standard library. As you know, this is the worst string class in all languages, with a lack of convenient UTF-8 support, a lack of regular expression matching, and almost anything missing.
Lack of WEB Standards Support, the standard I'm talking about here is the support for the HTTP protocol at the language level . the Web is based on HTTP protocols and TCP protocols,and the TCP protocol controls how it is transmitted,and the HTTP protocol defines how the browser and the server communicate. C + + is extremely lacking in this aspect of support, if you need to do non- CGI Development, you can only manually handle Socket communication.
Lack of the interface between the HTTP framework and the business code, the framework even completes the HTTP Communication section, and there is no standard specification of how the framework interacts with business code. However, the C + + Framework is actually implementing its own interaction process. But the lack of norms is the reason why the framework is scarce.
these three major shortcomings are very obvious, so the community is not interested in writing based on The WEB framework of C + + , even if there is a chipping.
Java
Java 's efficiency is low relative to the language of this kind of hand-managed memory in C/s + +, even if the reference count is used,C + + can throw Java out of N Street. But Java has an obvious advantage over other scripting languages
strongly typed, compiled languages, which makes Java is far more efficient than dynamic type language, and at compile time can find bugs, do not have to wait until run time to debug, now many Ides can do static language analysis, do not need to compile to find syntax errors, which can improve efficiency.
Java SE specification, which allows Java to be as close to the operating system as C/E + + , free to handle network-related,IO -related content, the function is very powerful.
Java EE Specification, the perfect specification makes Java Backend development has the very good normative foundation, the unified environment. The specification allows the framework and business code to interact with the standard (the servlet is derived from the applet, and theresult applet is no more OVA, but the servlet gets a great development).
Java has the most perfect ecological chain, whether it is the framework or the compiler tool chain, the module system is very good, modern engineering needs a variety of design patterns have a good practice. In addition toJava, the JVM has more languages to choose from.
of course, Java itself also has many drawbacks:
compiler language development efficiency is slow
It's easy to get started with business, but to really understand how servlets and frameworks work is difficult.
The language itself also has many drawbacks, such as the C there inherited the type and re-encapsulated once, some of the new technology has not been introduced in the first time, such as Lambda to the introduction of 1.8 , and even some people say thatJava is good, Except the language itself. But it is at least more acceptable than other languages on the market.
its own specifications and lack of flexibility also lead to the code itself is difficult to optimize, good code and poor code in a set of rules under the constraints of the actual performance does not have much difference, more optimization is given to the Jvm
Php
PHP as a scripting language, itself is not very efficient operation, but on the PHP7 platform,PHP training is already a relatively high scripting language, and on the existing hardware platform,PHP Its efficiency is not a bottleneck. It also has many advantages as a scripting language:
Natural Template language, no need to learn other template language, improve the development efficiency, but also improve the operational efficiency. (For example , CodeIgniter, for most frameworks, using PHP as a template language can improve efficiency, but like Laravel, which can be used to compile cache of templates)
easy to get started, the ecological chain is also very good, LAMP,lnmp so the deployment of technology can be said to be Bad street, the basic lack of learning costs
Disadvantages:
Interpreted language, unable to reside in memory, a huge flaw.
lack of easy-to-use package management and namespaces, but also lack of good modular system ( Composer said otherwise)
node. js
as a fiery language, node. JS does have its own unique features, which are listed here first:
Event Loop + asynchronous IO, which allows it to work in high concurrency situations.
JavaScript is easy to get started, with an active community and a lot of third-party libraries
Resident memory simply not too good
Available Module Systems
born with Docker destined
front-end use JavaScript, learning node. JS can do full stack development
Disadvantages:
is also JavaScript,which is a prototype-based language, is strictly not object-oriented, making JavaScript extremely difficult when writing business code.
Chaotic Language Specification, now parallel to the ES5, ES6,ES7, need to Babel such tools to help
only exist on the service side CommonJS module system, but there are many in the specification, it is not a big problem to be accurate, can ignore
ES5 's Stupid callback produced a callback to Hell, but ES6 solved the problem and was not exactly a big problem.
Swoole
Swoole is similar to node. js, which is more prescriptive than JavaScript at the language level . But it has two drawbacks:
Document! Document! Document! The important thing to say three times.
simple. Swoole extensions are basically not available and must depend on the Swoole framework, so ... Document! Document! Document! The problem or document
On the advantages and disadvantages of back-end language