Posts

Aurelia Reaches Release Candidate

After over a year of hard work from the community and Aurelia team, the framework I and many others have grown to love has finally hit RC. What does this mean? The framework is maturing. After a lengthy beta, Aurelia is almost ready for the primetime. This means you can now comfortably use Aurelia in production, even though many of us have been doing so since mid 2015. A new exciting addition is the Aurelia CLI which will simplify getting new Aurelia projects up off the ground without needing to worry about the skeletons (although the skeletons will be sticking around).

Aurelia + Jspm 0.17

Even though I have moved onto Webpack sometime ago in Aurelia, lately I have been partly driven by frustration over how buggy things are with Webpack support in Aurelia at the moment, so I decided to see if Jspm 0.17 would work with Aurelia. Without delving into unnecessary details, I got a skeleton setup with Aurelia and Jspm 0.17. Check it out here. There is one remaining issue and that is the Aurelia Bundler is broken. This means bundling does not currently work with this skeleton. However, I am looking into a bundling solution that might not even need the plugin and just use the Jspm builder directly. Watch this space.

Using Async/Await In Aurelia

One of the biggest upcoming additions to Javascript (in my opinion) is support for async/await. If you have worked with a language like C# before, then you will immediately know why async/await is fantastic. Currently async/await is in stage 3 which means it is almost a completed specification. At the time of writing this post, surprisingly Microsoft’s Edge browser is the only browser which has added in support for async/await. Support alert: While async/await will soon be standardised into the TC39 specification by the end of 2016 (hopefully) you still need to use a transpiler like Babel to add in support. At the time of writing this, TypeScript lacks support for async/await, so you need to use Babel with it.

Cool Brewing Bag: Australian Review

Anyone who’s tried homebrewing in many parts of Australia (I am in Queensland) knows it’s a battle against the elements. Scorching temperatures and stifling humidity can make it incredibly tough to maintain consistent fermentation temperatures. As any brewer will tell you, temperature control is key to producing quality beer. For a long time, I struggled with this, especially since I’m an extract brewer working without a dedicated temperature-controlled fridge. Enter the Cool Brewing Bag—a simple yet ingenious solution that has completely transformed my brewing experience.

Don't Get Skewered By "kebab-case" In Aurelia

This is one of those daily occurences I see in the official Aurelia Gitter chatroom (not a member, come say hello here). You are using a bindable in your application to add in binding, whether it be one-way, two-way or one-time. You might define your bindable inside of your custom element viewmodel like this: import {bindable} from 'aurelia-framework'; export class MyNameCustomElement { @bindable someNameValue = ''; } One would naturally assume that to use this attribute, you would reference it like this:

Working With Aurelia @observable

Even if you are new to Aurelia, you are probably familiar with the @bindable functionality which allows you to add bindable attributes primarily to your custom elements and custom attributes. There is a lesser known feature in Aurelia in the form of @observable which allows you to use the underlying observation layer in Aurelia to observe variables for changes and react accordingly in a similar way you react to changes on @bindable attributes.

String Enums In TypeScript

Sometimes you want to specify in your application multiple allowed values. For example, you might have a method which allows you to perform server requests and the only allowed values are; GET, POST, UPDATE, DELETE and PUT. Ideally you want to prevent any developer from calling a method with an invalid value. Normally you would use an enum for this, most languages support the use of an enum which might be used for this purpose.

Thrice – The Artist In The Ambulance (Instrumental Tracks)

Quite a while back I posted a rare find that I got off of Amazon: an instrumental copy of Thrice’s seminal release The Artist In The Ambulance. Well, I finally got around to posting it up on Youtube for your enjoyment here. Make sure you watch in 1080p for better sound quality.

Removing Items From An Array In Javascript (by index)

It is that time of the week for Obvious Javascript Tip of the week. You probably already know how to delete an item from an array, maybe not. Sometimes it can be confusing, do I use the delete keyword, do I use slice or do I use splice? Splice of life Using splice we can remove items from an array by providing the index (with the first item being zero).

Removing A Character From The Start/End of a String In Javascript

Show of hands if you can off of the top of your head remove/trim a character from the start or end of a string. If your hand remained down, don’t feel too bad. There are so many string manipulation methods in Javascript, it can be confusing. We have; substr, substring and splice (just off the top of my head). Not many people can tell you the differences between the three without Googling.