Upload
fernand-galiana
View
1.737
Download
0
Embed Size (px)
DESCRIPTION
Slides from DeRailed 2/27/13 meeting Demo code here: https://github.com/derailed/brog
Citation preview
What new in Rails5?Fernand Galiana
Saturday, March 2, 13
Who’s that fool yo?
@kitesurfer
github/derailed
Saturday, March 2, 13
Rails5 features...
Saturday, March 2, 13
Ah ah...
Saturday, March 2, 13
Paradigm shifting...
Saturday, March 2, 13
Seven principles
Data on the wire
One language
DB everywhere
Latency compensation
Full stack reactivity
Embrace ecosystem
Clean simple apis
Saturday, March 2, 13
Installation
$ curl https://install.meteor.com | /bin/sh
Saturday, March 2, 13
Create an app
meteor create myBitchinApp
Saturday, March 2, 13
Command line
meteor [run] [-p] [--production] [--settings]
meteor mongo
meteor reset
meteor update
Saturday, March 2, 13
Bundler?
meteor list [--using]
meteor add pkg
meteor remove pkg
Saturday, March 2, 13
Deploying
mrt deploy bitchindemo.metor.com
mrt bundle bitchindemo.tgz
Saturday, March 2, 13
Infrastructure
Saturday, March 2, 13
Mongo loves...
Db
Server
Client Client
Saturday, March 2, 13
Collections
Items = new Meteor.Collection( “fred” | ... )
Items.insert { fred:”Blee” }
Items.update {},{$set|$push|...}, [multi], [cb]
Items.find {}, {}, {}
Items.remove {}
Saturday, March 2, 13
Session (!session)
Session.set( “fred”, “Blee” )
Session.get( “fred” )
Session.equals( “fred”, “Duh” )
Saturday, March 2, 13
Handlebars?
{{#each posts}} {{#if duh}} <td>{{>post_duh}}</td> {{/else}} <td>{{>post}}</td> {{/if}}{{/each}}
Saturday, March 2, 13
Helpers
Template.fred.bitchin_css -> if Session.equals( 'blee', 'duh' ) 'yo-bitchin' else 'yo-lame'
<template name='fred'> <p class='{{bitchin_css}}'> really! </p></template>
Saturday, March 2, 13
Events
Template.item.events = 'click #fred': -> Session.set( 'fred', true )
Saturday, March 2, 13
PubSub
Saturday, March 2, 13
Bundlesaccounts
angular | backbone | jquery
bootstrap
d3
underscore | handlebar | coffee
less | sass | stylus
mailer
atmosphere.meteor.com
Saturday, March 2, 13
Client + Server = 1
Meteor.is_client
Meteor.is_server
Saturday, March 2, 13
Tag merges
<body> {{> hello}}</body>
<template name='hello'> <h1>Hello World!!!!</h1></template>
<body> <p class=''{{bitchin_css}}'>Is it bitch'in yet, yo?</p> </body>
Saturday, March 2, 13
Reactivity! Stand by....
Saturday, March 2, 13
Reactivity...
Method.autorun -> Meteor.subscribe( 'messages', Session.get( 'fred' ) )
Meteor.publish('message', (search)-> Messages.find( {search_term: search} )
Saturday, March 2, 13
Reactive context
Template
Meteor.render
Meteor.renderList
Meteor.autorun
Custom
Saturday, March 2, 13
Reactive datasources
Session
Collection
Meteor.status
ready
Meteor.user | userId | loggingIn
Cust Meteor.deps
Saturday, March 2, 13
Reactivity...
fragment = Meteor.render -> name = Session.get("name") || "Batman!" "<div>Hello, I am #{name}</div>" $( 'body' ).append fragment
Saturday, March 2, 13
So what?
Perf
Security
Single page apps
Loose context
Testing
Server side reuse
Saturday, March 2, 13
Competition
Mojito
Derby
Saturday, March 2, 13
Future looks so bright
POC != POS
Saturday, March 2, 13
Resourcesmeteor.com
atmosphere.meteor.com
@meteorjs
#meteor
github.com/meteor/meteor
meteor-talk.googlegroups
blackandwtf.tumblr.com
Saturday, March 2, 13
Questions, impressions?
Saturday, March 2, 13