Thoughts on Application State

Mat Warger Articles, AWS, JavaScript, React 1 Comment

Use Redux! Use MobX! Just use `setState`!
Redux is functional! Mobx is reactive! `setState` is built-in!
But Redux has so much boilerplate! But MobX is more difficult to debug! But `setState` doesnโ€™t scale!
Why donโ€™t you just use Rematch to abstract the Redux boilerplate? Do I use redux-thunk? redux-saga? redux-observable?
How about using Unstated? How about just using the Context API?

:head-explodes:

There are a lot of options for developers regarding how and when to use state management libraries (SML).

Remember those last two articles (The Joy of Forms with React and Formik &ย One Router to Rule Them All: React Router) about the massively underplayed game library? There was a third part to comeโ€Šโ€”โ€Ša follow-up meant to implement an example of state management for an application. The application was small, granted, but this somewhat contrived example would tie it all up. Itโ€™d be the cherry on top. It would complete the rule of threes.ย ๐Ÿ˜‰

There is not going to be another tutorial about which state library we can use to better manage our game library. Rather, in this post, weโ€™re going to look at how and why you might use a library to manage your applicationโ€™s state, and why that particular application is a perfect example of when you might not need a SML at all.

How an SMS Application Took a Job (i.e. Task)

David Pitt Articles, Automation, Conversational Apps, JavaScript, Keyhole Creations Leave a Comment

This blog is about a humanโ€™s job being replaced by automation. But, before you start composing emails and social media responses, know that itโ€™s a job that I think most folks would gladly allow an automated mechanism to take over.

The โ€œjobโ€ discussed in this blog is the need to contact individual users (in this case, employees) when those users forgot to accomplish a required task.

In this blog, we discuss a conversational application solution used internally at Keyhole Software for automated SMS text messaging features surrounding time tracking. The solution, implemented with conversational application platform KHS {Convo}, allowed for time entries to be submitted via text and automated, schedule-based notifications….

One Router to Rule Them All: React Router

Mat Warger Articles, Development Technologies & Tools, JavaScript, React Leave a Comment

Previously, we looked at a very basic example of how one can benefit greatly by using community projects such as Formik to avoid the tedium of certain solutions while embracing convention to create composable and scalable applications. We will be build on that foundation to explore the objectively great library that is React Router.

React Router has been at the forefront of routing in the React ecosystem for as long as I can remember. If youโ€™re new to React, this is the way to go when you move state and start needing more options such as parameterized routing, nesting, and conditional rendering. If you have experience with React, this brings a powerful pattern to bear in that everything is a component. It takes the composablity of React and uses that to its benefit, handling any and all use-cases with relative ease.

In this blog, weโ€™ll introduce the basics of the React Router through hands-on examples using its features.

Angular Developer: JavaScript to TypeScript

Chris Shatrov Angular, Articles, JavaScript, React, TypeScript 1 Comment

New JavaScript frameworks and libraries are created every day. This generates a dilemma: which solution should we use when starting a project?

My web development experience over the last few years has mainly included the AngularJS and Backbone.js frameworks. Angular, jQuery and traditional JavaScript have been in my comfort zone. When I ended up being face-to-face with TypeScript, it felt new, scary, and pretty confusing. I want to make that transition easier for you!

The goal of this post is to provide you an understanding of TypeScript, particularly when you come from an Angular web development background. To do so, we will first give an introduction to TypeScript. We will then discuss the differences between the different versions of Angular & Angular vs. React, with an eye for what you need to know to understand the JavaScript tooling landscape TypeScript plays in. And, lastly, weโ€™ll go through a tangible TypeScript example for a look into syntax & structure.

Advanced Node.js Process Management with PM2

Matthew Brown Articles, Development Technologies & Tools, JavaScript, Node.js, Tutorial 18 Comments

If you’ve worked on any front end applications recently, you have likely had some contact with a Node/Express application. What you may not be familiar with is how these applications are managed in production.

I recently had a project where I needed to set up a Node application on an AWS server. I needed a tool to solve the technical challenges of managing the Node processes and deploying the application in a very efficient manner.

I chose PM2, which is a handy process management tool for running Node.js applications in production environments. PM2 provides a simple command line interface that makes it easy to get started. This powerful Node module has tools for managing application processes, logging, and more.

In this article, I provide an introduction to PM2, showing why it is such a valuable tool for managing Node.js applications. By way of a reference example application, we show the basic features and commands for using PM2 and give examples of generating configuration files for both running and deploying applications.