In this post I will explain how I enabled server side rendering for my blog.
I just realized the other day that my blog is in its fifth year now. Since the application is built from scratch, I figured it would be fun to do a write-up of the architecture behind my blog.
In this post I take a look at service workers in JavaScript. I will show how to use a service worker to support offline loading of an Angular application.
In this post I will show how to visually inspect the contents of Webpack bundles.
In this post I will show how Babili can improve dead code removal in Webpack builds.
In this post I will discuss JavaScript ASTs and show how you can easily generate an AST of your code using Rollup.
In this post I will show how to do code splitting in Webpack.
In this post I will take a look at how Webpack handles Tree Shaking.
Blogging is one of my favorite hobbies. In this post I want to share some info about how I built up my blog. Hopefully this will be helpful to other bloggers, but I am also looking for feedback and suggestions for improvement.
In the following post I will compare immediately-invoked function expressions (IIFE) to Universal Module Definition (UMD) bundles.
In this post I will show that putting entities in the same file does not impact Tree Shaking.
In this post I will show how to add error handling when using async/await in TypeScript.
At this point I've used so many different promise libraries that I've lost track of what's supported natively by ES6 promises. Today I learned that “finally” is not yet part of the standard even though it's commonly implemented by third party promise libraries. In this post I will show how to simulate “finally” while we wait for the standard to hopefully implement it.
In this post I will show how to simplify promise handling using async and await in TypeScript.
In this post I will talk about how to apply Tree Shaking to JavaScript code.
Lately I have spent quite a bit of time working in both Angular 2.0 and Aurelia, so I figured I'd share some of my experiences here.
TypeScript introduces interfaces – a concept very familiar to developers with experience from languages like C# and Java.
JavaScript lacks explicit access modifiers, so variable “privacy” is hard to come by :-) . Instead we have to come up with clever workarounds to encapsulate objects to simulate the type of private scope we are used to from other programming languages. In this post I will demonstrate how to use Object.defineProperty to lock down JavaScript properties.
Variable assignment is a concept that many developers find confusing. In this post I will try to explain how JavaScript treats variable assignments and argument passing.
EcmaScript 6 offers some new really nice syntax additions to JavaScript. One of them is arrow functions. Arrow functions provide a compact way to create filter functions, so to take advantage of this I have created a lightweight library for querying arrays using ES6 arrow functions.
One confusing thing about JavaScript is how the meaning of 'this' changes based on execution context. In this post I will demonstrate how to use bind() to inject the meaning of 'this' in functions where it's referenced directly.
Previously I showed how to write application code using ES6, but wouldn't it be nice to use ES6 when writing unit tests as well? In the following post I will demonstrate how to write Jasmine tests using ES6 syntax.
Proper object modeling is becoming more important in JavaScript development as client side features are growing in complexity. Most object models don't require inheritance, but for those that do, JavaScript is lacking proper/intuitive constructs to support it natively. True, it is possible to inherit objects in JavaScript through the prototype chain, but it still leaves a lot to be desired compared to languages where object oriented code is more of a first class citizen. In this post I have added an example of how to bring more streamlined inheritance to JavaScript through TypeScript.
Modern websites make heavy use of JavaScript to support a better user experience, but what is the impact on SEO?
There is a growing sentiment among developers that the community is saturated with frameworks that all promise to fix “JavaScript problems”. Some are just frustrated with the high number of frameworks available, but there is also the DIY crowd that opposes any form of JavaScript frameworks. I personally fall somewhere in the middle since I would love for JavaScript to be natively “self-sufficient”, but the current state of the language is just not there yet.
As so many other developers I got my first introduction to complex client side web applications through jQuery. It was essentially the gateway drug that got most developers hooked on JavaScript during a time when JavaScript played a relatively modest role in most web projects. I will always be grateful for the productivity boost I got from adding jQuery to my, back then, very limited repertoire of client side skills. However, as project requirements got more and more complicated, developers started to realize that the traditional jQuery pattern of very little separation between object model and markup was not scalable. I think this and a few other factors beg the question, is jQuery still relevant today?
Since JavaScript has made a big comeback as one of the most sought after skills in the job market, there has been a lot of talk about which frameworks to focus on. Developers have several frameworks to choose from today; Angular, Ember, Knockout, Durandal, React and the list goes on.... Granted some of these are not in direct competition since they serve different purposes, but they all deserve to be on the list of notable frameworks in today's market. In this post I will talk about why I don't think it really matters which one you end up going with.
JavaScript is everywhere these days! Both front end and the back end can be written in JavaScript, and in fact, this blog is an example of an application written entirely in JavaScript. Even though JavaScript has been around for a long time it's definitely a language in constant transition. The next really exciting milestone will be ECMAScript 6, which will usher in a whole host of new exciting additions to the language. In this post I will write about a few of the changes that excite me the most.