Audience:
Yu Yuxi , Vue.js creator, the founder of Vue Technology, is dedicated to Vue's research and development.
Interview content:
Why do you choose to work in front-end?
In fact, I majored in art history, graduate stage study design & Technology, is a mix of designing and technology. One of the important reasons for starting the front end is that no one helped me to put the design work on the website for others to appreciate. For example, design a website, but no one helped me to make the design out of the website. So I can only do it myself, do it and find that doing the website itself is also very interesting.
The process of doing the site also involves how to write good code, how to achieve the design of the work, and then slowly found that I am more interested in the front end, but also spent more time.
The front end needs to deal with the user, can say, the design background actually to you the help many.
It must have helped.
What prompted you to develop the Vue idea?
In Google work, we have to do a lot of interface of the prototype, the need to quickly get started, flexible use. Some of the existing frameworks used at the time, such as angular, were too cumbersome. Personally, I am more inclined to do a more lightweight implementation of my force, but also want to do some experiments to practice practiced hand, to study how angular in the end is how to achieve. So, the earliest Vue was done as a purely experimental project.
Since 2013 7, it has grown several times more than my own expectations, I would like to be able to use a bit of force to push. One push at a time, it's more than I expected, and it's slowly changing today.
There is also a large part of the reason that I think of Vue as a piece of my work, constantly refining it with a craftsman's attitude. After a version has been made, I will continue to think about polishing, so far I have rewritten twice. Every time Vue grows, it will give me more power to move on.
But, Google main angular, do not have any restrictions on you?
Google will not force you to use what technology, choice or freedom. At that time my team was also very special, creative lab to experiment-oriented, emphasizing the speed. For this type of project, angular will introduce a lot of unnecessary restrictions.
As you just said, Vue's code is simple and quick to get started. But simplicity and function is in fact the contradiction of two aspects, gu to simple, may limit the function, increase the functionality of the tool, the code will inevitably become cumbersome. How to do this fish and bear paw of both?
In English there is a word called pragmatism, which is pragmatism. At the same time, Vue emphasizes the purpose of the user to do things. It can be said that the earliest Vue is very important to this point, we also added a lot of similar to the convenience of the nature of the API, such as filters.
In the early days of design is not very mature, I learned from angular over some of the features have not been fully considered. At first the feeling should have a role, first put in. In the process of re-iteration, I find that they are not as good or as convenient as they seem.
With the promotion of force, Vue began to be used for some longer-term projects. In this case, some short-term convenience features become difficult to maintain. So vue in the light and function has also changed, from the beginning of the emphasis on speed, simple to use, to the back of the attention to user code maintainability, to avoid users themselves fall into the trap of their own writing, has been constantly transformed. The ultimate goal is to find a good balance and maintain a good experience that is easy to get started, while avoiding the momentary impact of long-term maintainability as much as possible.
Both immediate and long-term benefits.
Yes, for example Vue 1.0, 2.0 each time the change, discard the API, there will be a lot of discussion. Most of the time, some users say that something so good, why take it away? The reason to take it off, in fact, is that users use them to write some very strange code. After I read it, I thought it would be better to take it out if it would lead to the writing of this code.
Foreign situation is not very familiar, but there are some companies in the country, such as the United States, drops, hungry, and so on these internet companies, are beginning to use VUE development projects, how do you think foreign is a situation?
In foreign words, Vue's growth trend is divided into two pieces. Many small and medium businesses or startups use Vue to develop projects. For them, productivity is an important measure, emphasizing turnover efficiency, rapid investment, and quick end of projects. At the same time, training new developers to join the new project, to achieve a fast start level is also a very obvious demand, in such a demand, their adoption of Vue will be very high.
There are also large companies, such as the Japanese line and Nintendo, and a large UK department store chain, Sainsburry, has been using Vue to develop projects on a large scale. Interestingly, major American companies are more inclined to use their own Silicon Valley products. may be rooted in the industrial culture, after all, Google and Facebook brands in the United States is too loud.
What changes have Vue's success brought to your life and technology?
The biggest impact is definitely that I can develop vue full-time, and I have 2.0 refactoring to do. 2.0 in fact is to disrupt the original structure, from the beginning, re-construction, the bottom has made a lot of changes. The ability to develop VUE full-time, on the one hand from the donations from the online community, comes from a number of other sources that maintain the same income as before, but the degree of freedom allows me to take control of my time and do what I want to do.
When I was working at Meteor, I struggled for a long time because I found that I wanted to be vue, but I had to do the business. Although also talked with the company, but did not find a particularly reliable combination plan, finally I decided to go out to do.
Some technicians are overwhelmed by business, and personal ability is not improved, especially technical aspects. They are very distressed, do not know whether to succumb to business, or develop their own skills?
I feel very fortunate to be able to do what I really want to do. However, I hope that technicians do not follow blindly. Vue is a special case, and many opportunities allow Vue to evolve into the way it is today. Without proper channels or some financial support, I would not be able to develop Vue full-time.
What are the improvements in functionality and performance for the recent upcoming 2.0, versus 1.0?
Overall, performance has improved by almost a fold. We made a lot of changes in the technical details, the entire render bottom completely replaced, Virtual Dom's adoption opened many new possibilities, such as server rendering, manual render Function, with Vue as the runtime combined with Weex rendering to the native Client. 2.0 greatly improved performance on the one hand, expanding more scenes using Vue.
In addition, 2.0 also made further streamlining on the API. 2.0 of the APIs removed are more than the new API. Before also said, Vue in concise and multi-functional constantly seeking balance, so 1.0 inside a lot of "chicken" function-both can be realized in this way, and can be achieved in that way, we mercilessly took off.
The 2016 state of JavaScript survey shows that Vue is second only to react's popularity. Can you tell us something about the similarities and differences between react and Vue in positioning and internal implementation?
Although there are some intersections between the two, the differences are also obvious. Vue's API is much more familiar to traditional web developers, such as Vue's single-file component, which is presented in the form of a template-+javascript+css, which works better with the web's existing HTML, JavaScript, and CSS.
In terms of usage habits and thinking patterns, Vue will be friendlier and more consistent with his mode of thinking for a web developer without any Vue or react Foundation. React for developers with functional programming backgrounds and developers who are not primarily web-based developers, react is easier to accept. This does not mean that they cannot accept that the difference between Vue,vue and react is not as obvious to them as Web developers. It can be said that Vue pays more attention to the habits of web developers.
In the realization, the biggest difference between Vue and react is the reactivity of the data, which is the reactive system. VUE provides reactive data, and when the data changes, the interface is automatically updated, and the react needs to call method SetState. I call them push-based and pull-based, respectively. The so-called push-based means that after the data is changed, the data itself pushes the change out and tells the rendering system to render automatically. Inside the react, it is a pull form, the user wants to give the system a clear signal that now needs to be re-rendered, the system will be re-rendered. The two do not have the absolute merits and demerits of the points, more is also the mode of thinking and development habits of different.
The two are not completely mutually exclusive, for example, in react, you can also use some third-party libraries like MOBX to implement the push-based system, At the same time you can also in Vue2.0, through a number of means, such as freeze data up, so that the data no longer have a reactive feature, or by manually calling the component Update method to make a pull-based system. So the two do not have an absolute boundary, but the default bias is different.
For the general technical staff, mastering a technology has been a challenge, if you can develop a new tool should be said to be a look at the height. What advice would you give them to create new tools for development?
My advice is always to remain curious. Many people may be busy dealing with business, not in their spare time to do any attempt to explore, it can only stay on such a level. In addition, there may be some things can not be forced, such as when I do vue, many times from their own interests. I did not force myself to do something, it was a kind of spontaneous desire, I wanted to do the Vue better, and then went to study.
Interest is also a very important factor, that is, if you have the motivation to do something, you have to be as interested as possible a little more than a little higher, set a higher goal, to see if you can take interest in one step. Technical personnel will certainly have their own interest in the direction of technology, most of the technical field to make certain achievements in the people, may have a strong interest-driven. Without interest as the driving force, it is difficult to maintain a continuous learning, continuous study of the state. I don't know if this kind of interest can be cultivated, but explore more, try more, and maybe someday you'll find something new.
Vue.js author Yu Yuxi: Continuously polish and refine vue with the craftsmen's attitude