• Redux Outside of React

    Josh Miller

    Declarative user interfaces are a relatively new idea in the world of web design. With the rise of React and the VirtualDOM, the world of web development is shifting to reactive views based on single page applications. This has given rise to new problems, namely, how do we manage state in an ever changing environment. Enter Redux: a minimal JavaScript framework for managing state in these types of applications.

    Filed under:
     CodeJavaScript
  • Array Map, Filter and Reduce in JS

    John Ferris

    Lately, I’ve been working on an exciting data visualization project for one of our clients. This requires a lot of data manipulation as data is pulled from the API server and transformed into visualizations. I found myself using the same array methods over and over to get this work done–Map, Filter and Reduce.

    Filed under:
     CodeJavaScript
  • Factory Functions in JavaScript

    Josh Miller

    As we move from an age of jQuery plugins and script drop-ins to a world of CommonJS and modular architectures it's becoming increasingly more important to manage JavaScript wisely. One of the features currently missing from JavaScript is the ability to create classes, although that will soon change with ES6. There are multiple methods and patterns to try and recreate this functionality. One of those patterns is Factory Functions.

    Filed under:
     CodeJavaScript
  • Modularizing JavaScript

    Talon Poole

    Have you ever wished you could write your JavaScript modularly just like your PHP in order to take advantage of testing, better documentation and the Do One Thing Well philosophy? Well I have the solution for you: Browserify and NPM!

  • A Seamless Media Experience

    Rob Ballou

    One of the primary goals of the new CPR.org website was creating a great, seamless media experience. Part of this was the creation of a persistent audio player that worked on as many modern browsers and devices as possible. Creating this experience, though, was a bit of a process. The audio landscape is pretty scattered when you take a close look at HTML5 audio support and Flash support. So the first thing up was finding a library that let us use both types of audio to reach a wider audience.

  • Adding JS libraries to a Drupal project with Libraries API

    Garrett Dawson

    As a front-end developer, I often need to add JavaScript libraries to a project for front-end interaction. With most things Drupal, there are many different ways to go about adding these libraries, though some can be said to be more stylish than others. An approach that I’ve become particularly fond of utilizes a contributed module called Libraries API, which gives Drupal developers a consistent way to add libraries of all sorts.

  • JavaScript Logging with a bit of Sanity

    Rob Ballou

    Browsers have come a long way in giving web developers a set of useful tools for debugging JavaScript (JS): gone are the days of littering alert() statements throughout your code. We now have inspectors, debuggers, and other tools that make things much easier. And you've probably encountered console.log and the power of JS consoles. This can provide some good insight into what's going on with your code, but there is a catch.

Pages