Multiple HTTP Requests for an AngularJS + Google Sheets Prototype

As I continued to build out my AngularJS + Google Sheets prototype, I ran into another problem. I wanted to load the data from two Google Sheets and access the data in the same function. I created this example, which loads in one Sheet with weather forecasts and another with weather types and descriptions, as a proxy. Read more on Multiple HTTP Requests for an AngularJS + Google Sheets Prototype…

Using D3 with React and TypeScript

Typically, when working in React, it’s best to split UI elements into separate, reusable parts. This allows for more modular code and finer control over each element.

However, this goes against the way D3 operates, which is to subsequently call dot operators, building up elements and groups of elements.

So how can we utilize D3 in a meaningful way while simultaneously breaking up our elements into individual components? I’m going to show you by working through an example implementing a force graph.
Read more on Using D3 with React and TypeScript…

Using Higher-Order Functions to Build Queries in Knex.js

My team has been using Knex.js to build database queries for our latest project. To create increasingly complex queries, we developed a pattern to generate SQL queries using higher-order functions. I’d like to share how we leverage these higher-order functions to make our query builders modular, concise, and very easy to understand.
Read more on Using Higher-Order Functions to Build Queries in Knex.js…

JSON to XML with AngularJS in Preparation for InDesign

In a recent project, I wanted to use Google Sheets as a content management system: the source for a print layout and a website. I wanted the content to reside in a single, easily editable location.

In order to achieve that outcome, InDesign requires the data in an XML file. But first, I had to convert the JSON data in Google Sheets to XML. This would allow me to customize the tag names to leverage the custom mapping styles feature within InDesign, which would make it a breeze to update the InDesign document as the content of the book changed. Read more on JSON to XML with AngularJS in Preparation for InDesign…

React State vs. Redux State: When and Why?

Just about any app you write needs a way to manage state. Redux manages state and state transformations and is often used with React, but React has its own concept of state.

When using these libraries, it’s good to know which to use when. Even if you choose to use Redux in your project, you will still need to make decisions on how much of your data is stored in Redux. Read more on React State vs. Redux State: When and Why?…

Optimizing GraphQL Queries with DataLoader

In my post about GraphQL and the Apollo server tools, I primarily focused on setting up a simple GraphQL schema and set of resolvers, but did not go much deeper. The main example in that post defined a findBy method which simulated hitting a database, but for the sake of brevity, this detail was largely overlooked.
Read more on Optimizing GraphQL Queries with DataLoader…