Paul Krill
Editor at Large

Vue.js JavaScript framework revs up rendering

news
Oct 6, 20162 mins

Vue.js 2.0 supports server-side rendering, streaming, and component-level caching

bigstock businessman flying super fast 85436978
Credit: www.BigStock.com

Vue.js, which has been positioned as a rival to Facebook’s popular React JavaScript library, has moved to a 2.0 release, featuring a redone rendering layer for better performance. The framework also is set to get a push in the mobile realm.

The upgrade to Vue, a JavaScript framework for building UIs, has a rendering layer that was rewritten using a lightweight virtual DOM implementation forked from the snabbdom library.

“On top of that, Vue’s template compiler is able to apply some smart optimizations during compilation, such as analyzing and hosting static sub trees to avoid unnecessary diffing on re-render,” Evan You, who has been the principal developer of Vue, said. “The new rendering layer provides significant performance improvements compared to v1 and makes Vue 2.0 one of the fastest frameworks out there.” Also, version 2.0’s template syntax remains mostly compatible with 1.0 with minor deprecations, said You.

The upgrade supports server-side rendering, along with streaming and component-level caching, for fast renders. Libraries and tools including vue-router, vuex, vue-loader, and vueify have updated to support version 2.0. Vue core, vue-router and vuex 2.0, for state management, all have TypeScript typings shipped in npm packages. The Vue team has provided a migration guide and a CLI migration helper.

You also said engineers at Chinese e-commerce company Alibaba were working on a project called Weex, to render components written in a Vue-inspired syntax into a native mobile UI. Eventually, “Vue-inspired” will become “Vue-powered,” according to You. “We have started an official collaboration to make Vue 2.0 the actual JavaScript runtime framework for Weex,” he said. “This will enable users to write universal Vue components that can be reused across Web, iOS and Android.”

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author