Skip to content

Instantly share code, notes, and snippets.

View danielchappell's full-sized avatar

Joseph Chappell danielchappell

  • Austin, Texas
View GitHub Profile
@danielchappell
danielchappell / computed_properties.md
Last active October 21, 2019 11:51
Computed Properties Best Practices

Computed Property Theory & Best Practices or Functional Programming in Ember or How I learned to stop worrying and love the Tomster.

In a nutshell, computed properties let you declare functions as properties. You create one by defining a computed property as a function, which Ember will automatically call when you ask for the property. You can then use it the same way you would any normal, static property. -- The Ember Guides

The Ember Object Model is the corner stone of Ember, and at the heart of the Object Model are computed properties.

The guides do a fine job giving need to know information on how to create and use computed properties and what to expect from the cacheing system they provide. However, I feel so much of the beauty that computed properties provide is lost in terse (but wonderful) documentation.

Quick..the basics!

@danielchappell
danielchappell / tutorial.md
Last active November 2, 2015 01:39
Ember Tutorial

Ember Training

A hands on guide to writting idomatic Ember.

##Contributions

This training guide and app was build and designed by Daniel Chappell and Kevin Boucher. Both this guide and the source code for the app are open source and completely free.

Please open an issue or submit a pull request for clairification or correction. Nothing is perfect with out help from the community, Thanks!

@danielchappell
danielchappell / route_hooks.js
Last active February 27, 2023 13:34
Ember.Route hook order
import Ember from 'ember';
// Ember 1.10
export default Ember.Route.extend({
//---fire in order on route enter---
beforeModel(transition) {
//empty by default

MaybeNot

Maybe you should use this instead of nullable types..

Installation

yarn add maybe-not

Everyday Use Example -- If this is crazytown skip to "In Practice aka Guides" section

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});