// from the garrettmills/daton project - lib/src/lifecycle/Unit.tsimport { Status } from '../const/status.ts'import { Collection } from '../collection/Collection.ts'import {container} from '../../../di/src/global.ts'import {isInstantiable} from '../../../di/src/type/Instantiable.ts'import AppClass from './AppClass.ts'/** * Returns true if the given item is a lifecycle unit. * @param something * @return boolean */const isLifecycleUnit = (something: any): something is (typeof LifecycleUnit) => {  return isInstantiable(something) && something.prototype instanceof LifecycleUnit}/** * Base class representing a single unit of the application lifecycle, responsible * for booting and stopping some piece of the application. * @extends AppClass */export default abstract class LifecycleUnit extends AppClass {  /**   * The current status of the unit.   * @type Status   */  private _status = Status.Stopped  /**   * Get the current status of the unit.   * @type Status   */  public get status() {    return this._status  }  /**   * Set the current status of the unit.   * @param {Status} status   */  public set status(status) {    this._status = status  }  /**   * Method called to boot and start the unit when the application is starting.   * @return Promise<void>   */  public async up(): Promise<void> {};  /**   * Method called to stop the unit when the application is stopping.   * @return Promise<void>   */  public async down(): Promise<void> {};  /**   * Returns a collection of lifecycle units that this lifecycle unit depends on.   * @return Collection<typeof LifecycleUnit>   */// from the garrettmills/daton project - lib/src/lifecycle/Unit.tsimport { Status } from '../const/status.ts'import { Collection } from '../collection/Collection.ts'import {container} from '../../../di/src/global.ts'import {isInstantiable} from '../../../di/src/type/Instantiable.ts'import AppClass from './AppClass.ts'/** * Returns true if the given item is a lifecycle unit. * @param something * @return boolean */const isLifecycleUnit = (something: any): something is (typeof LifecycleUnit) => {  return isInstantiable(something) && something.prototype instanceof LifecycleUnit}/** * Base class representing a single unit of the application lifecycle, responsible * for booting and stopping some piece of the application. * @extends AppClass */export default abstract class LifecycleUnit extends AppClass {  /**   * The current status of the unit.   * @type Status   */  private _status = Status.Stopped  /**   * Get the current status of the unit.   * @type Status   */  public get status() {    return this._status  }  /**   * Set the current status of the unit.   * @param {Status} status   */  public set status(status) {    this._status = status  }  /**   * Method called to boot and start the unit when the application is starting.   * @return Promise<void>   */  public async up(): Promise<void> {};  /**   * Method called to stop the unit when the application is stopping.   * @return Promise<void>   */  public async down(): Promise<void> {};  /**   * Returns a collection of lifecycle units that this lifecycle unit depends on.   * @return Collection<typeof LifecycleUnit>   */// from the garrettmills/daton project - lib/src/lifecycle/Unit.tsimport { Status } from '../const/status.ts'import { Collection } from '../collection/Collection.ts'import {container} from '../../../di/src/global.ts'import {isInstantiable} from '../../../di/src/type/Instantiable.ts'import AppClass from './AppClass.ts'/** * Returns true if the given item is a lifecycle unit. * @param something * @return boolean */const isLifecycleUnit = (something: any): something is (typeof LifecycleUnit) => {  return isInstantiable(something) && something.prototype instanceof LifecycleUnit}/** * Base class representing a single unit of the application lifecycle, responsible * for booting and stopping some piece of the application. * @extends AppClass */export default abstract class LifecycleUnit extends AppClass {  /**   * The current status of the unit.   * @type Status   */  private _status = Status.Stopped  /**   * Get the current status of the unit.   * @type Status   */  public get status() {    return this._status  }  /**   * Set the current status of the unit.   * @param {Status} status   */  public set status(status) {    this._status = status  }  /**   * Method called to boot and start the unit when the application is starting.   * @return Promise<void>   */  public async up(): Promise<void> {};  /**   * Method called to stop the unit when the application is stopping.   * @return Promise<void>   */  public async down(): Promise<void> {};  /**   * Returns a collection of lifecycle units that this lifecycle unit depends on.   * @return Collection<typeof LifecycleUnit>   */

Hi, there.

My name is Garrett.

I'm a self-taught software developer and speaker.

Hi, there.

My name is Garrett.

I'm a self-taught software developer and speaker.

about me

Hi! My name is Garrett. Welcome to my little corner of the internet. I'm a self-taught developer and tech-nerd. I create software that I hope makes people's lives better. I created the Flitter web framework, and a couple other fun projects. I love to communicate my work, and help others pursue their projects, which is why I've got a long history of sharing about my passion. I write blog posts, create video tutorials, hold talks, and publish code from my projects in the hope that others will find it useful.

A bit more background: I grew up in the rural mid-west, so I taught myself everything I know. I'm a big fan of learning to code this way. I'm currently studying computer science at the University of Kansas.

about me

Hi! My name is Garrett. Welcome to my little corner of the internet. I'm a self-taught developer and tech-nerd. I create software that I hope makes people's lives better. I created the Flitter web framework, and a couple other fun projects. I love to communicate my work, and help others pursue their projects, which is why I've got a long history of sharing about my passion. I write blog posts, create video tutorials, hold talks, and publish code from my projects in the hope that others will find it useful.

A bit more background: I grew up in the rural mid-west, so I taught myself everything I know. I'm a big fan of learning to code this way. I'm currently studying computer science at the University of Kansas.

get in touch

I'd love to hear from you if you have questions or inquiries related to me or my projects. You can get in touch by text, e-mail, or using this form. I also tweet sometimes, and share thoughts on my blog.

E-Mail: shout@garrettmills.dev
Phone: (913) 730-7124

I'd love to hear from you if you have questions or inquiries related to me or my projects. You can get in touch by text, e-mail, or using this form. I also tweet sometimes, and share thoughts on my blog.

E-Mail: shout@garrettmills.dev
Phone: (913) 730-7124

what I've been up to

Blog Post

Blog Post

Converting an Ionic/Angular Site into a Progressive Web App

For the last year or so, I've been working on converting an Ionic app to a progressive web app with offline support called Noded. I decided to write up my findings on how to do this with Angular service-worker.

Read more about it here.

12/1/2020, 6:28:31 PM

Side Project

Side Project

My Technical Notes Site

I'm trying to write down or save all the technical tricks, notes, and fixes I find. That way, it's easier for me to find them again in the future, and maybe they can be of use to others.

You can check them out here.

11/29/2020, 9:13:30 AM

Code Release

Code Release

VuES6 - ES6 Vue.js Components, in Plain JavaScript

I recently released a small utility library for defining Vue components as proper ES6 classes, but in vanilla JavaScript. I like to use this in small projects where I don't want to have to set up vue-cli and compile templates. More info here.

4/22/2020, 11:17:15 PM

Code Release

Code Release

flitter-di@0.1

Flitter-DI is the second-generation dependency-injector used by the Flitter framework. It was pulled from the libflitter project in the hope that it can remain independent from the rest of Flitter and can be used in other projects. More info here.

12/19/2019, 9:19:39 PM

Blog Post

Blog Post

How to Code From Home Like a Boss

With the current need to work from home, I've put together a list of tricks and tools I use to do my work as a software developer remotely, and discuss the challenges. Here's what I use.

2020-07-23T09:15:49.731Z

Code Release

Code Release

Feed Page, RSS, & Atom - Minor Website Updates I recently made some tweaks to my website. I added a dedicated page as a historical archive for these updates.

I also added the ability to subscribe to this feed using RSS, Atom, and JSON thanks to a handy NPM package.

2020-05-09T00:30:33.192Z

Garrett Mills
Copyright © 2020 Garrett Mills