32
What new in Rails5? Fernand Galiana Saturday, March 2, 13

What's new in Rails5?

Embed Size (px)

DESCRIPTION

Slides from DeRailed 2/27/13 meeting Demo code here: https://github.com/derailed/brog

Citation preview

Page 1: What's new in Rails5?

What new in Rails5?Fernand Galiana

Saturday, March 2, 13

Page 2: What's new in Rails5?

Who’s that fool yo?

@kitesurfer

[email protected]

github/derailed

Saturday, March 2, 13

Page 3: What's new in Rails5?

Rails5 features...

Saturday, March 2, 13

Page 4: What's new in Rails5?

Ah ah...

Saturday, March 2, 13

Page 5: What's new in Rails5?

Paradigm shifting...

Saturday, March 2, 13

Page 6: What's new in Rails5?

Seven principles

Data on the wire

One language

DB everywhere

Latency compensation

Full stack reactivity

Embrace ecosystem

Clean simple apis

Saturday, March 2, 13

Page 7: What's new in Rails5?

Installation

$ curl https://install.meteor.com | /bin/sh

Saturday, March 2, 13

Page 8: What's new in Rails5?

Create an app

meteor create myBitchinApp

Saturday, March 2, 13

Page 9: What's new in Rails5?

Command line

meteor [run] [-p] [--production] [--settings]

meteor mongo

meteor reset

meteor update

Saturday, March 2, 13

Page 10: What's new in Rails5?

Bundler?

meteor list [--using]

meteor add pkg

meteor remove pkg

Saturday, March 2, 13

Page 11: What's new in Rails5?

Deploying

mrt deploy bitchindemo.metor.com

mrt bundle bitchindemo.tgz

Saturday, March 2, 13

Page 12: What's new in Rails5?

Infrastructure

Saturday, March 2, 13

Page 13: What's new in Rails5?

Mongo loves...

Db

Server

Client Client

Saturday, March 2, 13

Page 14: What's new in Rails5?

Collections

Items = new Meteor.Collection( “fred” | ... )

Items.insert { fred:”Blee” }

Items.update {},{$set|$push|...}, [multi], [cb]

Items.find {}, {}, {}

Items.remove {}

Saturday, March 2, 13

Page 15: What's new in Rails5?

Session (!session)

Session.set( “fred”, “Blee” )

Session.get( “fred” )

Session.equals( “fred”, “Duh” )

Saturday, March 2, 13

Page 16: What's new in Rails5?

Handlebars?

{{#each posts}} {{#if duh}} <td>{{>post_duh}}</td> {{/else}} <td>{{>post}}</td> {{/if}}{{/each}}

Saturday, March 2, 13

Page 17: What's new in Rails5?

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

Page 18: What's new in Rails5?

Events

Template.item.events = 'click #fred': -> Session.set( 'fred', true )

Saturday, March 2, 13

Page 19: What's new in Rails5?

PubSub

Saturday, March 2, 13

Page 20: What's new in Rails5?

Bundlesaccounts

angular | backbone | jquery

bootstrap

d3

underscore | handlebar | coffee

less | sass | stylus

mailer

atmosphere.meteor.com

Saturday, March 2, 13

Page 21: What's new in Rails5?

Client + Server = 1

Meteor.is_client

Meteor.is_server

Saturday, March 2, 13

Page 22: What's new in Rails5?

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

Page 23: What's new in Rails5?

Reactivity! Stand by....

Saturday, March 2, 13

Page 24: What's new in Rails5?

Reactivity...

Method.autorun -> Meteor.subscribe( 'messages', Session.get( 'fred' ) )

Meteor.publish('message', (search)-> Messages.find( {search_term: search} )

Saturday, March 2, 13

Page 25: What's new in Rails5?

Reactive context

Template

Meteor.render

Meteor.renderList

Meteor.autorun

Custom

Saturday, March 2, 13

Page 26: What's new in Rails5?

Reactive datasources

Session

Collection

Meteor.status

ready

Meteor.user | userId | loggingIn

Cust Meteor.deps

Saturday, March 2, 13

Page 27: What's new in Rails5?

Reactivity...

fragment = Meteor.render -> name = Session.get("name") || "Batman!" "<div>Hello, I am #{name}</div>" $( 'body' ).append fragment

Saturday, March 2, 13

Page 28: What's new in Rails5?

So what?

Perf

Security

Single page apps

Loose context

Testing

Server side reuse

Saturday, March 2, 13

Page 29: What's new in Rails5?

Competition

Mojito

Derby

Saturday, March 2, 13

Page 30: What's new in Rails5?

Future looks so bright

POC != POS

Saturday, March 2, 13

Page 31: What's new in Rails5?

Resourcesmeteor.com

atmosphere.meteor.com

@meteorjs

#meteor

github.com/meteor/meteor

meteor-talk.googlegroups

blackandwtf.tumblr.com

Saturday, March 2, 13

Page 32: What's new in Rails5?

Questions, impressions?

Saturday, March 2, 13