Markus Oberlehner

Blog Page 6

Building Vue.js Applications Without webpack

In the good old times, creating a JavaScript-enhanced website was straightforward: create a .html file, add a <script> tag, write some JavaScript, and open the file in the browser. Nowadays, building web applications requires complex build toolchains, a node_modules directory with gigabytes of dependencies, and a complicated webpack configuration file...

JavaScript Runtime Bundling Concept

Imagine a world where you don't need to install a single dependency, but you're still able to use all modern JavaScript features. Where you don't need to run a build script every time you change a file. And you can do all of that knowing that your app will be perfectly minified and optimized for old browsers on production...

What Developers Can Learn from Playing Chess and Video Games

I watched some chess recently. Amateurs played against each other, and a grandmaster commented it. It was fascinating to see that the weaker players all made the same mistake: when the opponent attacked one of their figures, they solely focused on this one figure and where they can move it to save it. The more advanced players reacted very differently...

Progressive Enhancement and the Modern Web

A few years ago, before frameworks like React and Vue.js became popular and WordPress and jQuery dominated the web (which, strictly speaking, still is the case today), there seemed to be an agreement on the overall importance of Progressive Enhancement. My impression is that this consensus has vanished since...

Group, Extract, Share: Working with the Vue Composition API

One problem with the Vue Options API is that it is hard to share stateful logic that relies on reactive variables. The Composition API offers us an excellent solution to this problem. In this article, we look at a possible workflow for efficiently building components and applications with Vue 3 and the Composition API...

watch vs. watchEffect when to use what with Vue.js

When I first studied the new Composition API, I was confused that there are two watch hooks: `watch()` and `watchEffect()`. From the documentation alone, it was not immediately apparent to me what's the difference...

Partial Hydration Concepts: Lazy and Active

I am currently working on porting vue-lazy-hydration to Vue 3. With that comes the potential to make some significant improvements since Vue 3 has an API that allows controlling the hydration of VNodes. Working with the new APIs got me thinking about the general concept of hydration...

Vue.js Feature Toggle Context Provider

Some time ago, I read a very informative article by Pete Hodgson about feature toggles. I'm thinking a lot about the Context Provider Pattern and the types of problems it can help solve, and it appeared to me as if feature toggles are one of the use cases where this pattern can provide a lot of o value...