flatironwhoami
Node.js and Travis CI contributor, open source hacker. Maintainer of cradle and vows. Favorite buzzword: web scale.
Quite cool guy.
No, really, Google it.
it doesn't tell you what to do
almost every component can be used standalone
battle tested in production at nodejitsu
isomorphic
it does web scale
also, you should probably think twice before using it for your website.
| works on both sides | works on the server-side only |
| plates | union |
| broadway | nconf |
| director | utile |
| resourceful | neuron |
| revalidator | prompt |
| winston | |
| complete | |
| api-easy | |
| flatiron | |
| ... and secret sauce |
objective: move as many projects from the right side to the left side.
but only if it actually makes sense.
plates (short for templates) binds data to markup
var Plates = require('plates'),
html = '<div id="hello"></div>',
data = { hello: "world" };
var output = Plates.bind(html, data);
// output == "<div id="hello">world</div>"
plates has no special syntax
it has the same API for client and server-side
lightweight application extensibility and composition with a twist of feature reflection
var app = new App();
app.use(HelloWorld, { "delimiter": "!" } );
app.init();
app.hello("world");
var HelloWorld = {};
HelloWorld.attach = function (options) {
this.hello = function (world) {
console.log("Hello "+ world + options.delimiter || ".");
}
};
director is a router. it's awesome.
var author = function () { /* ... */ },
books = function () { /* ... */ },
viewBook = function(bookId) { /* bookId is populated. */ };
var routes = {
'/author': author,
'/books': [books, function() { /* An inline route handler. */ }],
'/books/view/:bookId': viewBook
};
var router = Router(routes);
router.init();
it's also the only project with browser API different than node.js API
a storage agnostic resource-oriented ODM
var Creature = resourceful.define('creature', function () {
this.string('diet');
this.bool('vertebrate');
this.array('belly');
this.prototype.feed = function (food) {
this.belly.push(food);
};
});
var wolf = new(Creature)({
diet: 'carnivore',
vertebrate: true,
belly: ['squirrel']
});
a validator
var result = json.validate({
someNumber: 42,
shortString: 'hello'
}, {
properties: {
someNumber: { type: 'number', required: true },
shortString: { type: 'string', minLength: 10 }
}
});
/* result == {
valid: false, errors: [{
attribute: "minLength", property: "shortString",
expected: 10, actual: 5
}]
}
*/
blogs
doc sites
and whatever you can write a template for
shameless self plug:
built using presents - the best presentation tool ever:
https://github.com/mmalecki/presents