Skip to content

Instantly share code, notes, and snippets.

View dgeb's full-sized avatar

Dan Gebhardt dgeb

View GitHub Profile
@samselikoff
samselikoff / future-proof.md
Last active April 21, 2023 17:14
Future-proofing your Ember 1.x code

This post is also on my blog, since Gist doesn't support @ notifications.


Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
@tchak
tchak / dws.md
Last active August 29, 2015 14:05
Distributed Web Storage

Some random follow up thoughts on todays discussion with @jo_liss, @terzicigor and @dgeb

After more thoughts it seems to me that on the backend it’s almost unavoidable to have commits built in to the database, or at last to have some kind of a persistence layer on top of the database. Basically if someone or something changes the database and do not update "commits table", the system will become inconsistent. So are we trying to invent a new database?

On most backend apis there is a serialization/presentation layer on top of the database, which means api objects != database objects. It means what we were describing today, is not a drop in replacement for REST apis in the form they exists today. Firebase is a “dumb store”, this is why they can be smart about synchronization.

We had only little talk about multiuser scenarios. Or even anonymous users. Seems like a lot to think about here. There should be a way to subscribe to some subsets of data with the right authorizations. What happens if authorizations c

@pixelhandler
pixelhandler / playing-with-orbit-js-and-ember-js.md
Last active February 22, 2018 21:55
Notes from Ember-SC April 2014 meetup - Playing with Orbit.js and Ember.js

Playing with Orbit.js and Ember.js

This presenation is an exploration of rolling your own data persistence for and Ember.js Application

During this discovery I attempt to roll my own data solution. I've selected to use alpha software, Orbit.js. So not also choosing other alpha software at the some time. Not covering es6, broccoli, ember-cli etc.

The exploratory app is based on converting my blog app (uses REST) to use Web sockets with a Node.js backend. I am using some build tools brunch.io also borrowing from tapas-with-ember. The modules in the source code are [CommonJS modules].

@domenic
domenic / promises.md
Last active June 24, 2024 03:11
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@lukemelia
lukemelia / config.ru
Created July 4, 2012 22:06
Example rack app for Ember development
require 'bundler/setup'
require 'sass'
require 'compass'
require 'rake-pipeline'
require 'listen'
require 'rack/lock'
require 'ruby-debug'
require 'securerandom'
require 'ruby_gntp'
@lancejpollard
lancejpollard / index.md
Created May 22, 2012 06:32
Notes on Ember.js overcomplicating...

Some random notes on the pangs of ember. Will be expanding as they are uncovered.

Building a form

Say you have a form that maps to a model, something like:

<form>
  <fieldset>
    <legend>Who are you?</legend>
@svenfuchs
svenfuchs / gist:2063855
Created March 17, 2012 18:27
Developing with dependent local gem repositories

When developing an application where you have split out shared functionality to multiple dependent gem repositories can get cumbersome when you

  • need to edit the Gemfile in order to swap local :path sources with :git or just plain Rubygems sources,
  • then forget to bundle update,
  • wonder why your git repository is dirty and it's just the modified Gemfile and Gemfile.lock,
  • accidentally commit the Gemfile.lock with local :path sources bundled etc. etc.

So what about this strategy:

A. Create a file .Gemfile.local containing:

@tomdale
tomdale / gist:1856842
Created February 18, 2012 01:54
Ember documentation TODO

Documentation

TODO

  • API docs
  • How to bootstrap a project
  • Application structure (M/V/C layers and what they're for)
  • Getting started with Ember and Rails
  • Built-in controls
  • How events are handled and bubbled
@joewest
joewest / ls-r.sh
Created January 28, 2012 17:06
Assetfile and dir structure
require "rake-pipeline-web-filters"
output "assets"
input "." do
match "{assets,tmp}/**/*" do
filter PipelineFinalizingFilter
end
match "app/**/*.js" do
@garth
garth / Jakefile.js
Created January 16, 2012 18:37 — forked from wagenet/Assetfile.rb
Precompile .handlebars templates with Jake (nodejs)
var fs = require('fs')
var vm = require('vm')
var handlebarsjs = fs.readFileSync('path/to/handlebars.js', 'utf8')
var emberjs = fs.readFileSync('path/to/ember.js', 'utf8')
var templatesDir = 'path/to/template/dir'
desc('Compile all .handlebars templates')
task({ 'handlebars': [] }, function () {
process.stdout.write('Compiling .handlebars templates')