Instantly share code, notes, and snippets.

View initializers.monitor-perf.js
import instanceInitializer from '../instance-initializers/monitor-perf';
var EMBER_VERSION_REGEX = /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:(?:\-(alpha|beta)\.([0-9]+)(?:\.([0-9]+))?)?)?(?:\+(canary))?(?:\.([0-9abcdef]+))?(?:\-([A-Za-z0-9\.\-]+))?(?:\+([A-Za-z0-9\.\-]+))?$/;
/**
* VERSION_INFO[i] is as follows:
*
* 0 complete version string
* 1 major version
* 2 minor version
View controllers.application.js
import Ember from 'ember';
let nextNum = 1;
export default Ember.Controller.extend({
sort: Object.freeze(['tag:asc']),
things: Ember.computed.sort('model', 'sort'),
actions: {
add() {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
init() {
this._super(...arguments);
let model = this.store.createRecord('my-model');
// Why is this a getter only?
View components.my-modal.js
import Ember from 'ember';
import { task } from 'ember-concurrency';
export default Ember.Component.extend({
tagName: '',
openModal: task(function* () {
let { reason } = yield this.modalManager.open();
return reason;
}).drop()
View adapters.application.js
import Adapter from 'ember-data/adapter';
export default Adapter.extend({
createRecord(_, __, snapshot) {
return this.serialize(snapshot, { includeId: true });
},
updateRecord(_, __, snapshot) {
return this.serialize(snapshot, { includeId: true });
}
View components.rental-card.js
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['card', 'rental-card']
});
View components.user-row.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'tr',
classNames: ['user-row']
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ['bar'],
actions: {
go() {
let foo = this.get('foo');
this.set('foo', '');
this.set('bar', foo);
View components.child-component.js
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement() {
this._super(...arguments);
this.get('register')({
setID: (id) => this.set('id', id)
});
}
});
View README.md

I was very sad today to read some negative comments concerning ember. I can't help but feel that outside the Ember community there is a lot of hate towards Ember. Here is my observations from a big Ember proponent perspective.

Community

Back in 2016 I attended EmberConf and was blown away by the inclusiveness of the community. I felt welcomed the moment I walked in. This is drastically different from any other technology conference I've attended (including WWDC in 2014). First off they offered a mentoring program so that new attendees had a meet and great with seasoned attendees and did not feel alone and isolated in a strange town for a week. Then the first keynote ended with Yehuda addressing a very sensitive topic about alienation and bullying. He set the tone that all attendees are responsible for looking out for others and to help when you see someone shut down.

Often times I find I shutdown when met with mor