Web Front end: 2015 several web technologies to watch out for

Source: Internet
Author: User
Tags new set

HTTP2
HTTP2 should be able to finalize this year, which is undoubtedly a big event in the Web world. HTTP2 a lot of features from Google's spdy, focusing on improving the performance of previous HTTP protocols in the current network environment. In short, HTTP2 is faster. Why, there are several major changes:

    • The first is that HTTP requests from the same domain can share the same TCP connection, which can largely solve the performance problems caused by network latency. For example, you have a lot of pictures, and now you don't have to Sprite, because they will be connected with the same one anyway. The advent of HTTP2 has allowed many of the previous web front-end optimization techniques to be discontinued.
    • HTTP2 is no longer plain text, but a binary protocol, so that the resolution of the Protocol is simpler, and the transmission is faster. The downside is that it takes a bit of effort to debug.

HTTP2 There are other features, such as header compression, where you can concentrate on your studies. Or check out this FAQ.

Firefox has started to support HTTP2, many browsers including Chrome before support Spdy, estimated HTTP2 support will also start quickly, and Nginx has now supported Spdy, see when the major mainstream Web server began to support HTTP2.

A less-than-good situation is that developers may have to face the simultaneous presence of HTTP2 and HTTP 1.1. If you enjoy the benefits of HTTP2 and can be backwards compatible with HTTP1.1, it could be a long-term problem for developers in the future.


ECMAScript6
The standard behind the JavaScript we are using (note that the JavaScript language itself, which does not contain other things like DOM) is ECMA-262, also known as ECMAScript 5. Its next version, ECMAScript 6 (abbreviated ES6), is almost finalized. This release has included a number of features that are needed in the development process, such as:

    • class definition syntax, including super, inheritance
    • The lambda-style function defines the lexical scope of this, default parameter, rest parameter, and so on within the,=> block level function definition
    • Destructuring, similar to Ruby [A, B, c] = [1, 2, 3], also applies to map and set, as well as function parameters
    • Symbol
    • Iterator iterators and generator, and new for-for-loop syntax
    • Template string, from which you can use multiple lines of string like in Ruby and Shell
    • module syntax, which supports modules from a language level
    • And there's a whole new set of things like Promise,proxy,unicode support.


Chrome and Firefox are now starting to support ES6 gradually. But you don't have to wait until all browsers start supporting ES6, because there are a lot of tools that compile ES6 code into ES5 code, such as Babel and Traceur. There are a lot of JS libraries have started to use the various features of ES6, including Angular 2.0.

Many people should use COFFEESCRIPT,ES6 's many functions to compensate for the previous es5 defects, absorbed a lot of coffeescript function, maybe we can not coffeescript later, unless you don't like curly braces, And like the syntax of Python. However, if Coffeescript does not upgrade, it is estimated that the benefits of future ES6 will not be enjoyed, and it is difficult to adapt to the needs of various numerical computations in the HTML5 era.

Finally give everyone a relatively good es6 learning resources, this book is very fine, and now is free online.

immutable JS and React
React believes everyone is no stranger, it is Facebook open source of a front-end view framework, the reason why it is mentioned is because of the ideas behind it is driven by some of the technology. The react itself is just a view frame, but the virtual dom behind it and the resulting performance benefits are attractive places, and it is a web-component-like encapsulation concept. Here is a comparison of the JS front-end frame performance test, although not very accurate, but can be a reference.

React's virtual DOM and the way it manages the front-end control data, and the immutable data structure (immuatble JS, remutable), functional programming can be easily combined to use. Clojurescript's OM framework is an example. Imagine all the states are immutable, and unified data storage (flux architecture such as Marty), each time the data update can easily pass the diff (Event source mode), the entire data flow in the front end is one-way, not only into the model becomes simple, And because all of the historical data has not been actually modified, the implementation of undo and redo will also become easy.

React has implemented UI programming in immediate mode through virtual DOM, and the low-cost and fast UI refreshes have also inspired people, and react this encapsulation is not limited to Dom view. For example, the Flipboard team's react-based packaging style encapsulates a layer of UI on the canvas, enabling fine-grained animations that ensure a consistent experience for both the Web and mobile versions. Facebook's react team recently released a framework for native mobile development using the JS and react APIs at the react Conference.

React may just be another Web view framework, but I like some of the new ideas it brings to me that might make it easier for us to develop on the front.

Realtime web (real-time web technology)
Today's web is becoming more and more demanding in real time, not only because today's technology can better support real-time, but also because of the user experience. Real-time is not only reflected in the demand of chatting; our mobile phone operation, web browser best can be reflected in real time, even if we do not refresh the page, the page should be able to be updated in real-time.

The front end has better technical support for real-time requirements due to the advent of HTML5, such as the new WebSocket, Webrtc,long polling, and server push technology. The backend has long been the async IO programming technology that can support a large number of long connections at the same time. But the progress of these technologies has never stopped, here is a casual introduction to you a few.

Pushpin is a high-performance real-time web backend technology that Fanout recently open source, unlike other technologies, which is a proxy that does not natively provide API programming frameworks, but is combined with existing Web APIs to turn them into APIs that support a large number of long connections. From the concept of design, it separates the function of maintaining a large number of long connections and the actual API business functions, so that the previous function through the form of proxy, so there is no requirement for the framework and language of the actual API, if you want to support more long connections, can also be implemented by scaling this proxy, Instead of having to change the backend API.

SOCKJS, a websocket simulation, uses native WebSocket on browsers that support WebSocket, while providing alternative technologies on older browsers. But it is not only a front-end JS Library, it also provides a backend programming framework, currently supports a lot of languages and frameworks.

WEBSOCKETD is an interesting thing, it can program any interface programming a WebSocket backend, you can even use the shell to write the API.

Many web frameworks support asynchronous programming patterns, and therefore can support a large number of concurrent long connections. There are also similar to meteor this provides the overall solution, there are a lot of recent firebase, we are interested to look for their own.

From the original: Entertainment world www.jxlazzw.com, entertainment world Platform www.shimanke.cn, reproduced please indicate the source

Web Front end: 2015 several web technologies to watch out for

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.