javascript

Concatenate and Minify JavaScripts and Stylesheets for Production with Grunt

Concatenate and Minify JavaScripts and Stylesheets for Production with Grunt 150 150 Clark

In this post, you will learn why you should concatenate and minify your scripts and stylesheets into one small file using the task runner called Grunt.js. You will also learn how to concatenate and minify your scripts and stylesheets with Grunt. Concatenation of Files For each script that you force…

read more

Higher-Order Functions and Function Binding

Higher-Order Functions and Function Binding 150 150 Clark

In technical interviews, it is common that the interviewer will throw in a question that tests your knowledge of higher-order functions and function-binding. If you are applying for a job as a JavaScript engineer, then you should expect an interview question in some similar form to the following: Write a…

read more
Example of a decision tree Ro-Sham-Bo

Rollin’ Trees, yo

Rollin’ Trees, yo 662 424 Clark

I like trees. All kinds of trees — concrete and abstract. Redwoods, Oaks, search trees, decision trees, fruit trees, DOM trees, Christmas trees, and more. They are powerful beyond common recognition. Oxygen, life, shelter, food, beauty, computational efficiency, and more are provided by trees when we interact with them in…

read more

How to Create a Simple Server and Router

How to Create a Simple Server and Router 811 674 Clark

Who: this post is for anyone looking to learn some of the foundations required for working with Node What: this post will show you how to create a simple resource server using vanilla Node and the Node http module How: the magic of a simple request handler, also known as…

read more

Object-Oriented JavaScript – Pseudo-Classical Class Pattern

Object-Oriented JavaScript – Pseudo-Classical Class Pattern 1280 853 Clark

The benefit of a pseudo-classical pattern in JS is that only one instance of each method is created regardless of how many instances of the object are created.

read more

Object-Oriented JavaScript – Prototypal Class Pattern

Object-Oriented JavaScript – Prototypal Class Pattern 1280 719 Clark

The Prototypal Class pattern is fundamental to JavaScript, especially object-oriented JavaScript. Though used infrequently by developers, this pattern underpins the syntactic sugar provided by the new keyword and the ES6+ class — thus, worth learning.

read more

Object-Oriented JavaScript – Functional-Shared Class Pattern

Object-Oriented JavaScript – Functional-Shared Class Pattern 150 150 Clark

Often referred to as a ‘mixin,’ this compositional style extends an instance to add shared functionality.

read more

Object-Oriented JavaScript – Functional Class Pattern

Object-Oriented JavaScript – Functional Class Pattern 150 150 Clark

The Functional Class pattern, though simple and clear, suffers from its naïveté. Forced to create duplicate methods for every instance, and store significant closure state for each function on the instance, the memory overhead outweighs the clarity of this pattern.

read more
  • 1
  • 2