Blog

Web technology tidbits

In-Memory Web API for Testing Angular Apps

May 22, 2017 by Chris Sherman

Front end and middleware components must agree on an interface for authentication, authorization, exchanging data, etc., and engineers developing these components often work on the same team or closely together. These components, however, do not require tight coupling, and separately developing and running components can increase feature velocity and improve reliability. To separate concerns between an Angular application and its middleware, let’s set up an in-memory API that runs in the debugging environment, while automatically switching to the HTTP API when the application runs in production.

Continue reading

Configure Routing In An Angular CLI Project

May 14, 2017 by Chris Sherman

Angular CLI gets projects up and running quickly. If we’re building any substantial web application, soon we’ll need to add routing for displaying different views. To add routing, follow the steps below after generating an Angular CLI project.

Continue reading

Calculate the Size of a Cassandra Table

May 5, 2017 by Chris Sherman

A Cassandra data store is made up of a collection of Column Families often referred to as tables. Within each table is a collection of columns. These columns consist of a combination of metadata and data.

Continue reading

Designing a Cassandra Data Model

April 26, 2017 by Chris Sherman

Cassandra is an open source, distributed database. It’s useful for managing large quantities of data across multiple data centers as well as the cloud.

Continue reading

Web Workers with AngularJS

April 22, 2017 by Chris Sherman

Web Workers provide a means for processing data in background threads. Processing that occurs off the main thread is useful because JavaScript code executes in turns on a single thread. In the context of a web browser, while a turn is executing, no other processing occurs, and, if a turn runs long enough, the browser’s interface will be perceptibly frozen.

Continue reading

AngularUI Router Dependent Resolves

April 14, 2017 by Chris Sherman

The resolve property of UI Router’s state definition delays changing state until data is loaded. This allows us to avoid entering states for which we don’t have necessary data, as well as prevents views from rendering in an unpredictable fashion when asynchronous requests finish at different times.

Continue reading

Cancel AngularJS $http Requests

April 13, 2017 by Chris Sherman

Requests made with the AngularJS $http service execute asynchronously. In certain situations, we may want to avoid executing the request’s success callback function and effectively cancel the request.

In the $http service docs, you’ll find a timeout configuration property. According to the docs, this property represents a “timeout in milliseconds, or promise that should abort the request when resolved.”

Continue reading

Zurb foundation With Angular CLI

March 28, 2017 by Chris Sherman

Create a new Angular CLI project with the SASS style option:
ng new my-foundation-app --style=sass cd my-foundation-app

Continue reading

Use Bootstrap SASS with Angular CLI

March 21, 2017 by Chris Sherman

Create a new Angular CLI project with the SASS style option:

ng new my-app --style=sass
cd my-app

Continue reading

Deploy an Angular CLI Application to Github Pages with a Custom Domain

March 14, 2017 by Chris Sherman

This is part three of a three part series on deploying Angular CLI applications to Github Pages.

In the angular-cli.json file, modify the assets object to look like the following:

"assets": [
   "assets",
   "favicon.ico",
   "404.html",
   "CNAME"
]
This configuration tells angular-cli to copy these files to the /dist directory of the project when it builds. Angular CLI deletes all unknown files from the /dist directory each time it builds.

Continue reading