Ember

Just documenting some things about Ember. It’s a tool that I’ve used off an on for many years now as part of my work at Discourse and I want to keep getting better at it.

One of the things that I love about the web is the URL and I appreciate that Ember respects that:

Routing

The URL has always been one of the major strengths of the web, and Ember apps respect that. Ember’s built-in router is a best-in-class solution that incorporates async data loading with dynamic url segments and query parameters. The Ember router seamlessly supports nested urls with incremental data fetching, nested loading, and error substates.

Ember has a Discourse Forum!

Glimmer

https://glimmerjs.com/

Fast and light-weight UI components for the web. Available for use within Ember.js and standalone apps.

Glimmer is one of the fastest DOM rendering engines, delivering exceptional performance for initial renders as well as updates. Architected like a virtual machine (VM), Glimmer compiles your templates into low-level code so it can run as fast as possible—without sacrificing ease of use.

QUnit Testing

This can be used to pause you tests, so that you can see what the current state looks like.

return this.pauseTest();

Prefer assert.dom if possible

This way you don’t also have to import exists if it isn’t being used. Plus it is a bit more readable.

assert.ok(exists("video"), "The video element appears"); // Not this
assert.dom("video").exists("The video element appears"); // Do this

JavaScript

Maybe I’ll make a separate topic later just for JavaScript, but here are some JS specific things I’ve encountered while using Ember.