WebCake WebCake


Web Development by Colin J Lacy



Subscribe:

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

Exploring Resolved Data in the Angular 2 Router

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

Categories:

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

My Gripe with Yeoman

Categories:

To be specific, this isn’t so much a gripe with Yeoman as it is a gripe with the way in which some people use open-source Yeoman generators. As I’ll discuss at the end of the post, Yeoman is an amazing tool which can yield incredible results in decreasing development time, but only when used wisely.  So …Read More

Posted: November 29, 2015

Calling All Promises – More ES6 Promises in Node

Categories:

This is the second of a two-part series. You can find the first post here. I’ve previously written about creating Promise-based calls in Node scripts, and at the end I promised (BOOM!) to go into scaling the promise pattern to run multiple async calls. This post starts off where the other one ended, with the …Read More

Posted: November 29, 2015

ES6 Promises in Node

Categories:

This is the first of a two-part series. You can find the second post here. One of the coolest features of ES6 is its built-in support for promises.  Unlike the way we’ve been developing Node modules, the promise API allows us to build an async workflow that aligns to the way many of us have been …Read More

Posted: November 26, 2015

How a Product Owner can Render Agile Useless

Categories:

I once had a user tell me that the app I had just been pulled in to start working on, already in production, was the worst thing that ever happened to his job.  It was alarming.  I told him I was specifically there to learn about his problems so that I could fix them.  He wasn’t convinced. …Read More

Posted: November 22, 2015

The Problem with Constant Success

Categories:

You might find yourself working on a dev team of like-minded people who take software very seriously, and truly feel that every aspect of the code – from the way it looks, to test coverage, to feature sets – reflect who they are as people. They’re proud of what they do, so they refuse to fail, …Read More

Posted: November 21, 2015

Installing MongoDB on a Mac

Categories:

I like Mongo for running PoC projects where I need a quick database and don’t know how database is going to grow.  It’s fast, works with JSON, and I don’t have to worry about fields being null or being of a certain data type. While helping a coworker install the Private Bower locally, I realized …Read More

Posted: November 21, 2015

A Private Bower Built in Express

Categories:

Working for a company like GE, there are a lot of rules that restrict the sharing of internally developed tools.  For the most part, anything that we build on the company’s dime has to stay within the company.  Not necessarily a bad thing, just the way it is.  However, it does restrict the amount of …Read More

Posted: November 20, 2015