[Issue 769] 2016 JavaScript Development Status Survey

image
Preface

Once the end of the year is approaching, various summaries and various selections will be awarded. So as a somewhat "chaotic" front-end industry, we must also participate. Then take a look at the translation sharing by @余博伦. ps: At the end of the article, you can see various summaries of 2016. Although the survey is abroad, you can also refer to domestic ones.


The text starts here~


Some people think JavaScript is the best language, and some people think it's a mess. According to the words of the father of C++:


There are only two programming languages ​​in the world: one is sprayed every day, and the other is used by no one.


Whether you like to admit it or not, JavaScript has become popular day by day, even a bit too hot, the ecosystem is too prosperous, and new related build tools, development frameworks, or other libraries may be released every month.


Some time ago, Wei Guoren made a special survey on the development status of JS. The initiator was Sacha Greif ( [No. 761] 6-week study plan to overcome JavaScript difficulties ). More than 9,000 developers from all over the world participated in this survey, which involved:

  • Code style (JS precompiled language)

  • Front-end framework

  • State management

  • API layers

  • Full stack framework

  • Test framework

  • CSS build tool/preprocessor

  • Build tool

  • Mobile frame

  • New features

And some opinions and discussions on other JS-related topics.


The development status of JavaScript


JavaScript has gradually developed into a popular and reliable language, but at the same time it has also become bloated, and various complex dependencies between framework tools can even crash you.


It is even more a nightmare for you who have a phobia of choice: Should you use React or Angular 2? Do you really need to use Webpack? Is there any new solution for CSS this month?


I also have a headache for similar problems every day, so I have this survey. I received more than 9,000 responses in 2 weeks.


Code style


General comments:

  • ES6 has become the new standard

  • CoffeeScript is dead

  • A new wave of fashion trends is coming


JavaScript has more than one syntax. Since CoffeeScript appeared in 2009, various JS syntax and transcompiled languages ​​have sprung up: ES6, TypeScript, Elm...

image


First, explain how to look at this statistical chart. There are 5 options for the interviewee:

  • Never heard of it

  • Heard of it, not interested

  • Heard of it, would like to learn

  • Used it before, would not use again

  • Used it before, would use again

  • ES6, CoffeeScript, and TypeScript are all household names, but TypeScript does not seem to be as popular as the other two.


Elm and ClojureScript are not so widely known, they are still somewhat limited in their own independent ecosystem.


Although ES6 is not officially compatible with browsers, most developers have tried its syntax.


TypeScript and Elm may be because they are not particularly friendly to ordinary JS developers, so many people are willing to try but have not tried it. After all, for programmers who only know JS, static types are Concepts that are difficult to understand.


Front-end framework


General comments:

  • Choose React

  • Vue is getting more and more popular

  • Angular 2 is better than 1

image


The pros and cons of the framework are often the focus of debate. Among the several options provided by the survey, except for the relatively new Vue, all frameworks are basically well-known.


Angular 2 has just been launched, so it must have a process from the development stage to the actual application. From a statistical point of view, React is the undisputed winner. Due to Vue's excellent performance, it has ranked second in terms of satisfaction.


Supplement other:

image.png


State management


General comments:

  • Redux is the hottest

  • What everyone adopts is actually the Flux concept

image.png


State management has gradually become a new type of JS wheel. Currently not applicable to all developers.


Redux is obviously the hottest, and as the number one alternative to Redux, Mobx is still not heard by many people.


Redux developer Dan Abramov himself has repeatedly emphasized that not all applications need to use Redux, wait until you really have relevant needs.


Supplement other:

image.png


API layer


General comments:

  • GraphQL looks promising

  • REST APIs are still the most widely applicable

image.png


Needless to say, REST APIs are definitely used by everyone. Firebase is considered to have a certain share because of its own real-time BaaS (back-end-as-a-service) characteristics. End cloud).


And GraphQL, which has been hot in recent times, although many people are interested, it will definitely take some time to develop.


Supplement other:

image.png


Full stack framework


General comments:

  • The most mainstream are Meteor and MEAN

  • This "all-in-one" framework is not so popular

image.png


Meteor is the leader in the full stack framework. At the same time, there are many developers who use MEAN (Mongo + Express + AngularJS + Node.js) architecture, and it is the best performer in terms of satisfaction.


In addition, the MERN framework that uses React-Redux to replace AngularJS is hot.


Test framework


General comments:

  • The most mainstream are Mocha and Jasmine

  • Developers are generally not particularly satisfied with JS testing

image.png


CSS build tool/preprocessor


General comments:

  • SASS/SCSS is dominant

  • CSS Modules are worth a try

image.png


CSS may seem to have nothing to do with JavaScript, but more and more build tools and frameworks combine them together.


CSS itself, like JS, has many shortcomings criticized by others. So people have invented a lot of CSS preprocessors or tools, etc. to extend and optimize native CSS, such as SASS, LESS, and CSS Modules.


Supplement other:



Build tool


General comments:

  • Webpack and Gulp are the most popular

  • Grunt is dead

image.png


Every tool involved in the survey is still relatively mainstream. Not surprisingly, only two-year-old Webpack is the biggest winner (combination of popularity/attractiveness/satisfaction). Webpack is a tool that can package and build everything and even static resources such as your pictures, audio and video, and can be flexibly matched Various plug-ins are used.


Supplement other:

image.png


Mobile frame


General comments:

  • Native apps are still the most mainstream solution

  • React Native proved itself

image.png


This realization of developing mobile applications through JS has only recently appeared, and most people are still adopting the solution of developing native apps.


But the disadvantage of the original is that you have to develop specifically for the corresponding system platform, which will have a high cost.


JavaScript provides a solution for developing iOS/Android platform applications at the same time (WP users are crying in the toilet). Programmers who only master front-end development languages ​​can even write apps on various devices, and more and more people are beginning to use this kind of technology.


React Native performed best in terms of satisfaction and popularity.


Cordova and PhoneGap are getting worse and worse mainly because their performance is really a problem.


Supplement other:

image.png


New features


Server-side rendering


JavaScript applications were originally born to play more browsers, instead of requiring servers to process logic and data every time.


But the server certainly has its own utility. Through server-side rendering, you can directly send the generated page content to the client, so you can improve the performance of the application, improve the interaction, and by the way solve the problem of SEO and accessibility.


Server-side rendering is essential for some content-based sites, but not so useful for sites that require logging in to use Web App and don’t worry about SEO. So most developers only think that server-side rendering can only be regarded as a Nice-to-have feature.


Code splitting code splitting/loading on demand


Although JavaScript is a language with a history of more than ten years, the development of JS applications in engineering has just sprouted. So most applications still send all the packaged code directly to the client.


Code splitting can split your code and load only the code that is really needed on the client side, which can greatly improve performance.


Optimistic Updates


Some complex JavaScript applications have a lot of client-server interactions. Through Optimistic Updates technology, the client can directly display the results of the interaction without waiting for the server's response, and then process the data that is directly out of sync between the server and the client.


Hot Module Reloading


Hot Module Reloading refers to that in the development process, you can see the effect of the change without refreshing the browser page after modifying the code. This is why many developers love this feature.


Time-Travel Debugging


Time-Travel Debugging is a new debugging mode, which refers to the simulation of changes in different states of the application when debugging applications that use Redux and other state management.


Real-Time Operations real-time interaction


As browsers become more powerful, internet speeds are increasing. The characteristics of real-time interaction will become more and more common. (For example, know that you can receive new reminders without refreshing the page)


Dead Code Elimination redundant code elimination


Now, on the one hand you can let the client load code on demand, on the other hand, you can also directly use useless code in the build process. This part of the content is actually introduced in this column's Introduction to JavaScript Modularization II: Module Packaging and Construction.


Progressive Enhancement


The various features of JavaScript are really cool. But imagine what your application would be like if it were running on a broken device or a poor network. So we need a progressive enhancement design, first load the most basic and main functions of your application, and then gradually finish loading. (Similar to the basic/extreme version provided by some websites)


Feature ranking:

image

View


  • JavaScript development is a bit too complicated now

We can easily discover this through the entire survey


  • JavaScript is overused

Is JS used too much in the webpage? JS programmers will definitely not agree with this


  • The development and change of JavaScript is too fast

When you have just mastered Grunt, Gulp has become popular, when you have just learned Gulp, everyone starts to use Webpack again


  • I am willing to choose JS as my main programming language

JS’s reputation has not been very good (in some people’s eyes, it’s a language that is forced to use), but

Most developers today are not because they have to use JS, but because they really want to.


  • JavaScript has a bright future

JavaScript has abused me thousands of times. I treat JavaScript as my first love. Most developers are still very optimistic about the development prospects of JS.


  • I enjoy developing apps with JavaScript

JavaScript is indeed a very interesting language


  • This questionnaire is really long!

(Crying, I'm almost exhausted from writing!)


Guess you like

Origin blog.51cto.com/15080028/2595041