As far as I am concerned, the so-called client and server development, in most cases, do not need to solve their own problems from the very bottom, more of the use of "architectural power." The function of language is to invoke all the existing software, that is, to write "Glue code" (So, if you want to write the OS, you don't have to look down).
In this context, the main concern for programming languages is whether the abstract granularity it provides is suitable for its application scenario (glue). JavaScript has played its role well on the client side, needless to say. Well, on the server side. It can also play its part and become a good back-end language. Why do you say that?
In the final analysis, asynchrony (or delay) is actually an intrinsic feature that the system cannot afford to ignore. This feature, which needs to be expressed in a programming language, attempts to pretend that a nonexistent language (or API) is not really what the grammar implies-and frees the programmer from the problem. Moreover, it has an implied processing strategy for latency, which is usually a wait (block). Well, we have to admit, it's not about solving problems, it's about escaping.
At least face the problem, right? In fact, JavaScript has been used to deal with latency problems. For the code in browser, XHR to go back and forth on the server, which is an obvious delay and must be handled with a callback. The problem is the same for the server. To the database query, but also to consume time (only, the magnitude of these two times different, but, can not pretend not to), why the callback is not suitable for it. We can say that--at least when it comes to interacting with other systems (i.e. IO), the front end and back end are indistinguishable at the asynchronous point.
In summary, it is possible to express asynchronous logic, which is the core advantage of JavaScript as glue language. Maybe there's a better glue language than JavaScript (coffeescript?). , but it must also solve the problem of asynchrony.
All programs are solving the problem of computing and IO (interaction is IO). And, this part is not very different from other languages (or simply in a more appropriate language to implement, provide the interface for "glue code" to call the good).
And the peripheral, is the richness of the API and packaging problems. In this regard, the main community. The popularity problem will be solved faster. A less popular problem will be solved slowly. It's probably going to be solved anyway. The rest are bonus. Mahouve language, Mahouve table. Write once Setupcl everywhere. God horse, are advertising words.
Author: Zhao Dongwei