Skip to content

Instantly share code, notes, and snippets.

@daffl
daffl / example-usage.js
Last active April 14, 2017 23:09 — forked from marshallswain/example-usage.js
A FeathersJS hook to implement `findOrCreate`
const findOrCreate = require('./find-or-create-hook.js')
app.service('messages').hooks({
before: {
create: [findOrCreate()]
}
})
@daffl
daffl / pgservice.js
Last active November 9, 2015 19:59 — forked from randomnerd/pgservice.js
import dbmon from 'dbmon';
import EventEmitter from 'events';
export default function(name, schema) {
return {
setup(app) {
this._locks = {
created: {}
};
this.db = app.db;

CanJS and Backbone both provide structure for JavaScript applications through an MVC-like pattern.

CanJS

CanJS is a lightweight MVC framework built to provide structure for JavaScript applications. It is aimed at developers of any library who need a battle-hardened library that makes building complex applications easy. It is part of a larger offering named JavaScriptMVC from Bitovi (its creators) that has documentation, testing and dependency management tools.

Backbone

Backbone is a flexible, minimalist solution for seperating concerns in a JavaScript application. It provides just a little bit of structure to a jQuery application and has largely attracted developers who know just enough jQuery to get by and now want to organize their code a bit more.