What's new in Rails5?

2,442 views

Published on

Slides from DeRailed 2/27/13 meeting

Demo code here: https://github.com/derailed/brog

Published in: Technology
  • Be the first to comment

What's new in Rails5?

  1. 1. What new in Rails5? Fernand GalianaSaturday, March 2, 13
  2. 2. Who’s that fool yo? @kitesurfer fernand.galiana@gmail.com github/derailedSaturday, March 2, 13
  3. 3. Rails5 features...Saturday, March 2, 13
  4. 4. Ah ah...Saturday, March 2, 13
  5. 5. Paradigm shifting...Saturday, March 2, 13
  6. 6. Seven principles Data on the wire One language DB everywhere Latency compensation Full stack reactivity Embrace ecosystem Clean simple apisSaturday, March 2, 13
  7. 7. Installation $ curl https://install.meteor.com | /bin/shSaturday, March 2, 13
  8. 8. Create an app meteor create myBitchinAppSaturday, March 2, 13
  9. 9. Command line meteor [run] [-p] [--production] [--settings] meteor mongo meteor reset meteor updateSaturday, March 2, 13
  10. 10. Bundler? meteor list [--using] meteor add pkg meteor remove pkgSaturday, March 2, 13
  11. 11. Deploying mrt deploy bitchindemo.metor.com mrt bundle bitchindemo.tgzSaturday, March 2, 13
  12. 12. InfrastructureSaturday, March 2, 13
  13. 13. Mongo loves... Client Client Server DbSaturday, March 2, 13
  14. 14. Collections Items = new Meteor.Collection( “fred” | ... ) Items.insert { fred:”Blee” } Items.update {},{$set|$push|...}, [multi], [cb] Items.find {}, {}, {} Items.remove {}Saturday, March 2, 13
  15. 15. Session (!session) Session.set( “fred”, “Blee” ) Session.get( “fred” ) Session.equals( “fred”, “Duh” )Saturday, March 2, 13
  16. 16. Handlebars? {{#each posts}} {{#if duh}} <td>{{>post_duh}}</td> {{/else}} <td>{{>post}}</td> {{/if}} {{/each}}Saturday, March 2, 13
  17. 17. 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
  18. 18. Events Template.item.events = click #fred: -> Session.set( fred, true )Saturday, March 2, 13
  19. 19. PubSubSaturday, March 2, 13
  20. 20. Bundles accounts angular | backbone | jquery bootstrap d3 underscore | handlebar | coffee less | sass | stylus mailer atmosphere.meteor.comSaturday, March 2, 13
  21. 21. Client + Server = 1 Meteor.is_client Meteor.is_serverSaturday, March 2, 13
  22. 22. Tag merges <body> {{> hello}} </body> <template name=hello> <h1>Hello World!!!!</h1> </template> <body> <p class={{bitchin_css}}>Is it bitchin yet, yo?</p> </body>Saturday, March 2, 13
  23. 23. Reactivity! Stand by....Saturday, March 2, 13
  24. 24. Reactivity... Method.autorun -> Meteor.subscribe( messages, Session.get( fred ) ) Meteor.publish(message, (search)-> Messages.find( {search_term: search} )Saturday, March 2, 13
  25. 25. Reactive context Template Meteor.render Meteor.renderList Meteor.autorun CustomSaturday, March 2, 13
  26. 26. Reactive datasources Session Collection Meteor.status ready Meteor.user | userId | loggingIn Cust Meteor.depsSaturday, March 2, 13
  27. 27. Reactivity... fragment = Meteor.render -> name = Session.get("name") || "Batman!" "<div>Hello, I am #{name}</div>" $( body ).append fragmentSaturday, March 2, 13
  28. 28. So what? Perf Security Single page apps Loose context Testing Server side reuseSaturday, March 2, 13
  29. 29. Competition Mojito DerbySaturday, March 2, 13
  30. 30. Future looks so bright POC != POSSaturday, March 2, 13
  31. 31. Resources meteor.com atmosphere.meteor.com @meteorjs #meteor github.com/meteor/meteor meteor-talk.googlegroups blackandwtf.tumblr.comSaturday, March 2, 13
  32. 32. Questions, impressions?Saturday, March 2, 13

×