Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Volt: Ruby Web Development Recharged
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Bozhidar Batsov
April 18, 2015
Programming
430
2
Share
Volt: Ruby Web Development Recharged
Slide deck from my talk at the BulgariaWebSummit 2015.
Bozhidar Batsov
April 18, 2015
More Decks by Bozhidar Batsov
See All by Bozhidar Batsov
RuboCop 2.0: Where do we go now?
bbatsov
0
56
Clojure: The Bad Parts
bbatsov
0
100
Weird Ruby (RubyDay 2024, Verona)
bbatsov
0
180
Sustainable OSS (Balkan Ruby 2024, Sofia)
bbatsov
0
190
Ruby's Creed (RubyDay 2023, Verona)
bbatsov
0
59
Victims of Complexity
bbatsov
0
340
Ruby 3.0 Redux (Spark Academy, Jan 2021)
bbatsov
1
290
Ruby 3.0 Redux (Pivorak 4.0)
bbatsov
0
500
The Elements of Programming Style (HackConf 2019)
bbatsov
0
220
Other Decks in Programming
See All in Programming
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
100
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
410
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.2k
ふつうのFeature Flag実践入門
irof
7
3.3k
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
140
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
180
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
670
Moments When Things Go Wrong
aurimas
3
130
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
750
Skillは並べた。動かなかった。契約で繋いだ。— 65個のSkillから、自走する開発サイクルへ
junholee
0
790
分析エージェント精度向上における データアナリストの役割
oura_shoya
0
140
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
1k
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
200
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.5k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Making Projects Easy
brettharned
120
6.7k
The Spectacular Lies of Maps
axbom
PRO
1
770
Optimizing for Happiness
mojombo
378
71k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
210
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.5k
Code Reviewing Like a Champion
maltzj
528
40k
Transcript
Volt: Ruby Web Development Recharged by Bozhidar Batsov
@bbatsov
Joan
None
Few important things you need to know about me
None
None
I’m an Emacs fanatic
I still have nightmares about PHP4
I love Ruby
I tolerate Rails
I don’t like JavaScript
None
Why am I here?
Welcome to Rubylandia!
Ruby (2005)
None
None
None
Ruby (2006)
OMG, Rails is amazing!
Ruby (2008)
OMG, Rails is amazing & useful!
Ruby (today)
Rails is somewhat boring…
Rails is the new JEE!
Aren’t all the cool devs doing Clojure now?
Hell, yeah!!!
Rails innovation (2005-2008) Convention over configuration Interactive development Scaffolding ActiveRecord
REST
Rails innovation (today) Turbolinks foreign keys background jobs
None
None
10% 90% Rails Other
4% 96% Web Development Other
Fuck this shit!!!
Rails, Rails, Rails
Development Complexity
0 25 50 75 100 1999 2000 2001 2002 2003
2004 2005 2006 2007 2009 2011 2015
Web development (2005) Model View Controller Routing Server Client
Web development (2006) Model View Controller Routing Server Client AJAX
RandomJS
Web development (2010) Model View Controller Routing Server Client AJAX
REST Assets RandomJS
Web development (2013) Model View Controller Routing Server Client AJAX
REST Model View Controller Routing Assets Assets
None
What’s the solution?
VBScript!
Isomorphic Development
Isomorphic?
Isomorphic being of identical or similar form, shape, or structure
Same code runs on the client & the server
Web development (2015) Model View Controller Routing Server Client AJAX
REST Model View Controller Routing Assets Assets Shared Auto Sync
None
Meet Volt
Volt is isomorphic
Models, views, controllers & routing are shared between the client
and the server
WOW!!!
Meteor.js
Ruby on the server-side, Ruby on the client-side
Ruby on the server- side, Ruby on the client- side
Ruby on the server-side
Ruby on the client-side
Fuck this shit!!!
Ruby > JavaScript
None
None
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?
Fuck this shit!!!
Opal.rb http://opalrb.org/
Does this shit work?
Yes!
def hello(name) puts "Hello, #{name.capitalize}!" end hello("bruce")
/* 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);
Is this shit any good?
Debatable
Opal features Source maps ruby-spec compatibility Small footprint Little performance
overhead
Ruby compatibility Mostly compatible with Ruby 2.0 Implements most of
the Ruby stdlib Has immutable strings (unlike Ruby)
Fuck this shit!!!
Volt Architecture
MVC Controller View Model
MVVM Controller/ ViewModel View Model
Volt is reactive
Web Sockets FTW
<: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>
def add_todo page._todos << { name: page._new_todo } page._new_todo =
'' end
<:Body> <h1>Todo List</h1> <table class="todo-table"> {{ page._todos.each do |todo| }}
<tr> <td>{{ todo._name }}</td> </tr> {{ end }} </table>
None
Demo
Interesting bits Components User management is built-in Tasks
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
Contribute to Volt!
https://github.com/voltrb
0 25 50 75 100 1998 1999 2000 2001 2002
2003 2004 2005 2006 2009 2011 2015
0 25 50 75 100 1998 1999 2000 2001 2002
2003 2004 2005 2006 2009 2011 2015 2016
Hell, yeah!!!
Getting Started with Volt Official docs (http://voltframework.com/docs) gitter office hours
video tutorials
Felina
@bbatsov http://batsov.com http://emacsredux.com
[email protected]