TypeScript


Using the Iterator Pattern in JavaScript

I recently had to parse some markdown using the marked npm package and convert it into JSON objects for a project I’m working on. When I parsed the markdown I’d get back an array of tokens that would look something like the following: I started out the “normal” way by doing a for…of loop to iterate through the tokens in the array. This worked, but tracking the start and end of a token meant adding extra variables which ultimately complicated the code. For example, how do you know if you’re in a list? You track it with an inList variable […]


Simplifying Front-End State Management with Observable Store

I admit it – I think the use of some front-end JavaScript state management patterns has gotten out of control. When you’re spending a significant amount of time writing code (and often a lot of it) to handle application state or relying on a scaffolding tool that generates 100s or even 1000s of lines of code then it’s time to take a step back and ask, “Do I really need all of this?”. While you’re at it you might also ask, “What can I do to simplify my code and bring some sanity back to it?”. Rather than ranting about […]


New Pluralsight Course: Angular Architecture and Best Practices

I’m excited to announce the release of my next course on Pluralsight titled Angular Architecture and Best Practices! The goal of this course is to provide you with solid, proven guidance to plan out your Angular application architecture, address various challenges that typically come up, and ultimately create a more maintainable and flexible application. Here are a few questions this course will help you answer: Is there one “right” way to architect and build an Angular application? Short answer – NO! What are some key concepts I should consider when planning my application architecture? Is there any type of planning […]


Free Interactive Coding Course: Build Your First Angular App

About a year ago I was browsing the web and came across a site called Scrimba.com. It provided a unique way to learn about web technologies through a live code editor combined with audio that syncs with the code – something you have to actually try out to realize the full potential. Since I do a lot of training for companies the Scrimba tool really caught my eye. I was so impressed with the features Scrimba provided that I decided to contact the creators (Per Harald Borgen and Sindre Aarsaether) to let them know that I thought the tool they had […]


Real Talk JavaScript Podcast: End to End Testing with Cypress.io

I had the opportunity to talk with my good friends John Papa and Ward Bell about Cypress.io and end to end testing on the Real Talk JavaScript podcast.  We talked about why I think end to end testing should get more attention, how I’m using it in a current project, as well as the benefits it can offer developers. I wasn’t a huge fan of end to end testing in the past mainly because I hadn’t used it much on projects, had the misconception that it was for “dedicated testers”, and felt like it would require a lot of time […]


ngAir Podcast: Containerizing Angular Apps with Docker

I had the opportunity to chat with Justin, Bonnie, Alyssa, and Austin about Angular and Docker on the ngAir podcast recently and really enjoyed talking with everyone. We talked about the benefits of containers from a developer and DevOps standpoint, how to create custom images with Dockerfiles, how to build/push/pull images, and how to run containers. We of course focused on the role that containers can play with Angular applications but the concepts apply to any front-end app (or back-end app for that matter). Here are some of the key links mentioned in the podcast: ​Containerizing Angular Apps with Docker […]


New Pluralsight Course: Containerizing Angular Applications with Docker

I’m excited to announce the release of my next course on Pluralsight titled Containerizing Angular Applications with Docker! This course walks you through the process of containerizing front-end applications (with a focus on Angular) using Docker images and containers. Here are a few questions this course will help you answer: Why “containerize” front-end applications? Should I consider using a CDN? How can I serve front-end applications created with Angular (or other libraries/frameworks) using nginx? How do I create a custom Dockerfile and custom image for my application? What is a multi-stage build and how can I use it to build […]


Upgrading an Application to Angular 6: Step By Step

Angular 6 is out and it offers some great new functionality in the CLI and overall framework. One of the biggest new features (IMO anyway) is the CLIs support for schematics and the ng new library command to create and publish libraries (a big pain point that is now simplified). But, I digress….this post is about upgrading an application. Click here if you want a quick look at all of the great new features. I have a large project I’m working on that’s still in development so I decided to take the plunge and try out some of the new features to […]


“Containerizing” Angular with Docker: My ng-conf Talks and Overall Experience

ng-conf 2018 is officially over….too bad it can’t go on forever. It’s such a great conference that you don’t want it to end. In addition to hearing a lot of high-quality talks from the Angular team and other awesome speakers, I had the opportunity to hang out with John Papa a lot (one of my best friends) as well as several other close friends, and made many new friends throughout the week as well (thanks to my buddy Brian Clark for the picture to the right). Here’s a little information about the conference and my overall experience. If you’re only interested in videos […]


Choosing the “Right” JavaScript Library/Framework for Your Application 2

“What’s the ‘right’ JavaScript library/framework for us to use?”. That’s a question that comes up a lot nowadays given the multitude of choices available and one that doesn’t have a “right” answer of course. I’m fond of saying, “Use the right tool for the right job” when I’m onsite at a company teaching a training class or providing architecture/consulting services. While I certainly have my technology preferences, to force them on someone or on one of the companies I work with would quite honestly be naive and shortsighted. If there’s one thing I’ve learned working in technology over 20 years […]