Keith Dechant's Blog

Secrets to Project Happiness Using Git

I have worked with dozens of projects over my career, on platforms ranging from Drupal to Yii to Django to AngularJS to ASP.NET. Most of them have had a good, solid strategy for how to manage their Git repositories. A few notable ones have not.

Here are a few things I've learned for how to manage your repository to ensure a successful project.

By Keith Dechant, Software Architect
April 11, 2017

URL Routing for a Decoupled App, with Angular 2 and Django

Lately, I have worked on a few projects where a single-page Angular app is contained within a site built on a server-side framework like Django. One of the challenges is to get their URLs to play nicely together.

Say you have a project with an Angular 2 front end and an API back end using the Django Rest Framework. Further, imagine that your Angular 2 page is also served from within the Django app. Your URL structure might look like this:

By Keith Dechant, Software Architect
July 23, 2016

Angular 2: Using the HTTP Service to Write Data to an API

Update, November 27, 2017: This post explains the Http service used in Angular 2. This is now deprecated in favor of the newer HttpClient released in Angular 4.3. This post will remain here as long as Angular 4.x is in long term support. If you are using Angular 5, consider upgrading to the newer HttpClient. You can find a tutorial for the HttpClient service in my post Angular 5: Making API calls with the HttpClient service.

By Keith Dechant, Software Architect
July 5, 2016

Instant reload with Django, NPM, and Browsersync

Here at Metal Toad, we are starting to use NPM as a task runner to automate our development processes. This tutorial shows how to automate CSS compilation and instantly reload the browser when files change.

Objectives

In this post, we will be setting up an automated local build environment with the following goals in mind:

By Keith Dechant, Software Architect
February 23, 2016

Angular 2: HTTP, Observables, and concurrent data loading

Angular 2 provides a new pattern for running asynchronous requests, called Observables. Here, we will review a few of the concepts and eventually see how to run multiple concurrent HTTP requests, with the callbacks running only after all of them have completed.

By Keith Dechant, Software Architect
January 5, 2016

AngularJS: Adding a user-friendly default option to ng-options

Note: This article refers to AngularJS v1.x only. Angular 2 and above use a different templating syntax and these instructions do not apply.

Angular's ng-options directive provides a nifty way to build a select element based on an array in your scope. It can even bind the options to objects in the array, not just string values. But its handling of default values can be a bit puzzling.

If you ever find that your bound value doesn't match any of the available options, you could end up with this bit of inscrutable content in your DOM:

By Keith Dechant, Software Architect
November 3, 2015

AngularJS Query String handling using $location.search()

Note: This article refers to AngularJS v1.x only. If you're working with Angular 2 or above, take a look at the ActivatedRoute class, which can provide similar functionality. Updated on June 9, 2017.

Many times while developing an Angular app, you will find yourself displaying data in tables and filtering or sorting it. There are many tutorials out there to show you how to use Angular filters and ng-repeat to do this.

By Keith Dechant, Software Architect
August 11, 2015

Drupal 8 Migrations, part 4: Migrating Nodes from Drupal 7

Note: Now updated for Drupal 8.2!

Drupal 8 provides a flexible, plugin-based architecture for migrating data into a site. In Part 3 of this series, we explored how to migrate taxonomies from a Drupal 7 site. We will now expand on this by migrating basic nodes from a Drupal 7 site into Drupal 8.

By Keith Dechant, Software Architect
December 11, 2014

Drupal 8 Migrations, part 3: Migrating Taxonomies from Drupal 7

October 11, 2017: Now updated for Drupal 8.4!

Drupal 8 provides a flexible, plugin-based architecture for migrating data into a site. In Part 2 of this series, we explored how to migrate users from a Drupal 7 site. We will now expand on this by migrating Taxonomy vocabularies and terms from a Drupal 7 site into Drupal 8.

By Keith Dechant, Software Architect
December 11, 2014

Drupal 8 Migrations, part 2: Migrating users from a Drupal 7 site

In this article, we will be building a custom migration which will import users from a Drupal 7 site into a Drupal 8 site. The migration will include the standard user profile fields like username and email address, plus a few custom fields added to the user profile.

By Keith Dechant, Software Architect
November 30, 2014

Ready for transformation?