Save 37% off PRO during our Black Friday Sale! »

Volt: Ruby Web Development Recharged

Volt: Ruby Web Development Recharged

Slide deck from my talk at the BulgariaWebSummit 2015.

Efd2550fb5f3059d815e731ecd61b701?s=128

Bozhidar Batsov

April 18, 2015
Tweet

Transcript

  1. Volt: Ruby Web Development Recharged by Bozhidar Batsov

  2. @bbatsov

  3. Joan

  4. None
  5. Few important things you need to know about me

  6. None
  7. None
  8. I’m an Emacs fanatic

  9. I still have nightmares about PHP4

  10. I love Ruby

  11. I tolerate Rails

  12. I don’t like JavaScript

  13. None
  14. Why am I here?

  15. Welcome to Rubylandia!

  16. Ruby (2005)

  17. None
  18. None
  19. None
  20. Ruby (2006)

  21. OMG, Rails is amazing!

  22. Ruby (2008)

  23. OMG, Rails is amazing & useful!

  24. Ruby (today)

  25. Rails is somewhat boring…

  26. Rails is the new JEE!

  27. Aren’t all the cool devs doing Clojure now?

  28. Hell, yeah!!!

  29. Rails innovation (2005-2008) Convention over configuration Interactive development Scaffolding ActiveRecord

    REST
  30. Rails innovation (today) Turbolinks foreign keys background jobs

  31. None
  32. None
  33. 10% 90% Rails Other

  34. 4% 96% Web Development Other

  35. Fuck this shit!!!

  36. Rails, Rails, Rails

  37. Development Complexity

  38. 0 25 50 75 100 1999 2000 2001 2002 2003

    2004 2005 2006 2007 2009 2011 2015
  39. Web development (2005) Model View Controller Routing Server Client

  40. Web development (2006) Model View Controller Routing Server Client AJAX

    RandomJS
  41. Web development (2010) Model View Controller Routing Server Client AJAX

    REST Assets RandomJS
  42. Web development (2013) Model View Controller Routing Server Client AJAX

    REST Model View Controller Routing Assets Assets
  43. None
  44. What’s the solution?

  45. VBScript!

  46. Isomorphic Development

  47. Isomorphic?

  48. Isomorphic being of identical or similar form, shape, or structure

  49. Same code runs on the client & the server

  50. Web development (2015) Model View Controller Routing Server Client AJAX

    REST Model View Controller Routing Assets Assets Shared Auto Sync
  51. None
  52. Meet Volt

  53. Volt is isomorphic

  54. Models, views, controllers & routing are shared between the client

    and the server
  55. WOW!!!

  56. Meteor.js

  57. Ruby on the server-side, Ruby on the client-side

  58. Ruby on the server- side, Ruby on the client- side

  59. Ruby on the server-side

  60. Ruby on the client-side

  61. Fuck this shit!!!

  62. Ruby > JavaScript

  63. None
  64. None
  65. Ruby’s advantages Does’t have this Sane nil semantics No need

    for a book called “Ruby: The Good Parts” Standard library Do you really need more?
  66. Fuck this shit!!!

  67. Opal.rb http://opalrb.org/

  68. Does this shit work?

  69. Yes!

  70. def hello(name) puts "Hello, #{name.capitalize}!" end hello("bruce")

  71. /* Generated by Opal 0.7.0 */ (function(Opal) { Opal.dynamic_require_severity =

    "error"; var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice; Opal.add_stubs(['$puts', '$capitalize', '$hello']); Opal.Object.$$proto.$hello = function(name) { var self = this; return self.$puts("Hello, " + (name.$capitalize()) + "!"); }; return self.$hello("bruce"); })(Opal);
  72. Is this shit any good?

  73. Debatable

  74. Opal features Source maps ruby-spec compatibility Small footprint Little performance

    overhead
  75. Ruby compatibility Mostly compatible with Ruby 2.0 Implements most of

    the Ruby stdlib Has immutable strings (unlike Ruby)
  76. Fuck this shit!!!

  77. Volt Architecture

  78. MVC Controller View Model

  79. MVVM Controller/ ViewModel View Model

  80. Volt is reactive

  81. Web Sockets FTW

  82. <:Body> <h1>Todo List</h1> <form e-submit="add_todo" role="form"> <div class="form-group"> <label>Todo</label> <input

    class="form-control" type="text" value="{{ page._new_todo }}" /> </div> </form>
  83. def add_todo page._todos << { name: page._new_todo } page._new_todo =

    '' end
  84. <:Body> <h1>Todo List</h1> <table class="todo-table"> {{ page._todos.each do |todo| }}

    <tr> <td>{{ todo._name }}</td> </tr> {{ end }} </table>
  85. None
  86. Demo

  87. Interesting bits Components User management is built-in Tasks

  88. Volt’s not perfect Opal isn’t quite there yet MongoDB is

    the only supported datastore Many features are work in progress The documentation is kind of lacking
  89. Contribute to Volt!

  90. https://github.com/voltrb

  91. 0 25 50 75 100 1998 1999 2000 2001 2002

    2003 2004 2005 2006 2009 2011 2015
  92. 0 25 50 75 100 1998 1999 2000 2001 2002

    2003 2004 2005 2006 2009 2011 2015 2016
  93. Hell, yeah!!!

  94. Getting Started with Volt Official docs (http://voltframework.com/docs) gitter office hours

    video tutorials
  95. Felina

  96. @bbatsov http://batsov.com http://emacsredux.com

  97. join@toptal.com