WebCake WebCake

Web Development by Colin J Lacy


Enter your email address to receive notifications of new posts by email.

Moving from Ionic to React Native: A Retrospective


These days, it’s rare to find someone who would argue that Ionic is the best way to build a mobile app. I, like many people, use Ionic for PoC work. It’s a good solution for quick builds. And in the case of a recent project, it was a good solution to get something on my …Read More

Posted: December 27, 2018

Why I’m Building My Own Financial Tracker App


Like most people, when I turned 30 I came to a very stark realization: that my time on this planet is limited. Good lord, how terrifying. The immediate changes I started to make in my life: I increased my hourly rate for freelance work…by quite a bit. I’m much more selective about the video games …Read More

Posted: December 24, 2018

Using Technology to Force Process Changes


I recently met with an executive who had very strong feelings about how technology played a role in the life of a business. The many executives that I’ve met have always had a personal stance on where technology fits into enterprise operations. Some have a tech background and like to get involved, while others want …Read More

Posted: August 6, 2018

Using a ConfigMap to Set Environment Variables on a Kubernetes Deployment


In this exercise, I mixed a couple of tutorials together from the Kubernetes site to demo the following: – deploying an app that has pre-configured env vars – leveraging those env vars in application code – updating the env vars on the server – running a fresh rollout to demo the updated env vars in …Read More

Posted: July 8, 2018

Better Dynamic Import Paths in Webpack


About six months ago I started playing with Webpack in hopes to find a clean way to build multi-platform support into our code base at work. This was based on Webpack 1, and while I did find a way (and even wrote about it), I wasn’t entirely thrilled with how it worked at scale. So …Read More

Posted: August 7, 2017

Dynamic View Model with @ngrx/store


In pushing out a new release of one of the frameworks we use in my office, I had an idea that I started exploring at home. Its previous release was built on AngularJS 1.5 using the UI-Router, and we had put in a lot of work to abstract-out data calls in the UI-Router resolve properties …Read More

Posted: July 6, 2017

Dynamic Import Paths in Webpack Using Resolve Alias


While the solution in this post does work, I personally didn’t like it at scale, so I found a different solution that I felt works much better. You can find out more about that in a newer post. I’ll leave this one up as an alternative should anyone choose to go with this solution instead. …Read More

Posted: January 14, 2017

Exploring Resolved Data in the Angular 2 Router


If you’ve use UI-Router, there’s a really good chance you’re familiar with resolves. The folks on my team know I’m personally a huge fan, and I was glad to see that the new router in Angular 2 allow us to make use of them. Unfortunately, at least at the time of this writing, there’s very …Read More

Posted: July 25, 2016

Automating Your Main Nav in a Modular Angular 2 App


If you spend a lot of time on the front-end, you’re probably going to build a lot of navs. Main navs, sub navs, internal navs – all the navs. Not sure about you, but every time I build a nav I usually think to myself “I should really automate this.” Until today, I never had. …Read More

Posted: July 19, 2016

User-Selected Style Themes in an Ionic 2 Application


Earlier this week a conversation about theme selection in Ionic 2 applications came up. For example, if you’re using a game and want the change the colors based on where the user might be in the game. Or, in the app I’m working on at the office, where the user needs to be able to …Read More

Posted: July 2, 2016

Using Firebase 3 in Angular 2 and Ionic 2


Not too long ago I wrote a post about getting Firebase installed in your Ionic 2 app. Well, last week Google had their I/O conference, which debuted the next major release of Firebase, v3, which comes with some significant changes. In this post, I’ll go through the same topics I covered in the first one, …Read More

Posted: May 27, 2016

A Spinner Component Using View Encapsulation in Angular 2


A few weeks ago I wrote a post about how to create an inline spinner for your templates based on a loading state. While that’s still a viable solution, I ended up being my own devil’s advocate and building an alternative that I actually disagreed with at the time, and now find it to be …Read More

Posted: May 14, 2016

Listening for Pause and Resume Events in Ionic 2


When my Ionic 2 app went into beta, I learned a lot about app usage that I think I might have taken for granted over the years. One of the biggest facepalm moments came when one user told me that when she opened the app every morning, it would always show yesterday’s data and not …Read More

Posted: April 30, 2016

Using Firebase 2 in an Ionic 2 Application


This post is based on Firebase 2. About a week after writing it, Google announced Firebase 3. I’ve since written another post that explains how to use Firebase 3 instead. In this article I’ll show how I was able to get Firebase integrated into my Ionic 2 application. This was a great way to stand …Read More

Posted: April 21, 2016

A Loading Spinner in Angular 2 Using ngSwitch


One of the challenges of Angular 1.x template rendering was the possibility of a digest cycle attempting to process an object property when an object was not yet defined. This would inherently throw an error, and would break Angular. There were probably a lot of solutions to this, but for me a simple ng-if attribute …Read More

Posted: April 16, 2016

Looping Over Maps and Sets in Angular 2’s ngFor


I’ve been finding myself using Maps and Sets quite a bit lately. This is becoming especially true when I traverse through an array, or array of arrays, reducing it down to a set of unique, or key-value pairs. As a result, I recently had to write a Pipe similar to one that I previously wrote …Read More

Posted: March 31, 2016

Exploring Nav Hierarchy in the Ionic 2 Tabs Page


Recently I added a login workflow to my Ionic 2 app, where the user has to log in before they can take any other action. If the user is already logged in when they open the app, they’re automatically redirected to the main view. In this case, the main view is the TabsPage layout. This …Read More

Posted: March 17, 2016

Looping Over Object Properties in Angular 2’s ngFor


One of the challenges I noticed while working in Ionic 2 with a Firebase backend was that Angular 2 has a bit of a gripe with iterating over object properties by way of ngFor. At least at the time of this post, there’s nothing in the documentation on how to do it. I’ve seen a …Read More

Posted: February 23, 2016

Add PouchDB to an Ionic 2 app via Webpack


This post is now irrelevant, as the Ionic team replaced Webpack with Browserfy in their Beta 4 release. However, if you’re customizing to use Webpack, feel free to read on. In this post I’ll walk through how I got PouchDB working as part of the Webpack compilation process in an Ionic 2 project. There are …Read More

Posted: February 14, 2016

Tech Requirements in User Stories


Until recently, I was a true believer in only having functional user stories. In fact, I once had a very heated backlog refinement with a BA friend of mine over him adding a technical note to a user story about a form I had to build. My understanding of Agile was that you never stranglehold …Read More

Posted: February 3, 2016

Data Dependency Mapping in an Offline-First App


So you’re using something like CouchDB for your architecture, maybe Couchbase on the server with Couchbase Lite or PouchDB in your client. Great! You and I should get together sometime to exchange migrane medication tips. Offline applications have a very complex way of dealing with data. You might not have noticed, but when you start …Read More

Posted: February 1, 2016

Lending Credit to Corporate Travel


TL;DR: this entire post can be summed-up with one of the twelve principles of Agile software development, which is that the most efficient and effective method of conveying information to and within a development team is face-to-face conversation. Some Bad Experiences When I first started in the corporate world as a restuarant marketing manager, corporate …Read More

Posted: January 30, 2016

Let’s Build a Ticker in Ionic 2


I have a buddy who’s pretty bad at keeping track of his diet, and I’m pretty sure I know why. His wife showed me the 8.5″x5.5″ 7pt. font print-out of their weekly diet plan, complete with 4mm-wide checkboxes, and I had the immediate urge to help them out with a super-simple app that accomplished the …Read More

Posted: January 13, 2016

Binding Data to Toggles and Checkboxes in Ionic 2


At the time of this writing, the Ionic 2 docs don’t give much insight into how we can bind data to their ion-checkbox and ion-toggle components. So, I thought I’d go ahead and put up a code example of how I was able to get it working. This demo will load data through an HTTP …Read More

Posted: December 31, 2015

Page Lifecycle Hooks in Ionic 2


The v1 docs on the Ionic site specifically tell us that when we navigate between views, our view isn’t destroyed or removed from the DOM. Instead, it’s cached. If we have page load events that we need to trigger when a user navigates to a page, we’ll need to either handle it with an event …Read More

Posted: December 30, 2015

First Thoughts on Ionic 2


If you’re familiar with Angular 1.x, you’ve probably at least stumbled across Ionic at one point or another. It’s an amazing framework that creates hybrid cross-platform apps out of Angular 1.x projects, adding custom directives specifically built for touch-screen UI. With Angular 2 in beta, it would only make sense that those of us who …Read More

Posted: December 29, 2015

On Declaring Styles Inside Components


This post is about what I feel is a problem in the way some developers on the front-end are writing their components – whether in React, Polymer, or now Angular 2. Please feel free to disagree with me in the comments section, as I’d like to know if I’m missing something. A Widely Agreed-Upon Worst …Read More

Posted: December 22, 2015

Sending HTTP Requests from a Node Application


Node comes with some pretty awesome features, something that’s been well documented and widely accepted.  These days even some long-time Java devs that I know are pretty excited at how quickly something can be done server-side with Node, and the ES6/2015 features are making a lot of the old-guard naysayers come around. That being said, …Read More

Posted: December 14, 2015

Enabling Jetpack Plugins in Dev Mode


One of the reasons I left the WP community was this commonly adopted theory that everything just works…with a big, excited smiley face.  Even early in my development career I knew that not to be true; but it was the way of the world as far as I could see. I remember reassuring myself that any …Read More

Posted: December 9, 2015

Building a Yeoman Generator


When I sat down a few weeks ago to write my first Yeoman generator, I was pretty surprised by the lack of resources available beyond the basic Yeoman documentation. While the API docs were decent, the Getting Started section wasn’t. Most of the learning was done on my own. Hopefully this will help other people …Read More

Posted: December 5, 2015