How much does it mean to pursue consistency between client and server programming languages?

Source: Internet
Author: User
Keywords IT industry program Ape
Tags abstract application client code development function how much it industry

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

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.