FeaturedIT topics

React vs. Vue: Clash of the JavaScript titans

Was it just a few years ago when we built our websites by lovingly placing each tag in the file with care and grace? That era of handcrafted websites is long gone. Most modern websites are elaborate programs that are constantly pinging multiple data sources and then churning out a complex confection of tags nested inside of tags nested inside of other tags. It’s layers of code built on top of libraries linked to frameworks that call in web services, all to put some words and pictures on the screen.

Two of the favorite choices today for creating these elaborate mechanisms are React and Vue.js, two chunks of code that might be called libraries or frameworks depending upon how you define the words. They are machines for taking your collection of components and turning them into endlessly morphing, instantly reactive displays. Don’t say that they’re setting the foundation for web sites because the term web app is a better fit.

React and Vue come from forward-thinking programmers with similar ideas. React is open source and officially supported by a team at Facebook. It’s an example of how companies embrace open source to both share and build a creative fervor behind their vision for the Internet. Vue came from Evan You, a former Googler who wanted to create a smaller, more nimble version that does more or less the same thing with just a touch less of awesomeness, or whatever the buzzword may be for features.

Both get much of their performance boost by forgoing the native routines for manipulating the blocks of the web page, the so-called DOM or Document Object Model. React and Vue create a parallel “virtual DOM” that tracks all of the moving parts and only at the last microsecond do they hand off a clean, optimized collection of tags to the browser to render. The goal is to keep the browser from touching or doing anything to the moving parts because the browser’s representation isn’t as fast or as trouble-free as the virtual DOM.

Related Articles

Back to top button