Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ruby on Rails introduction
Search
joren
November 27, 2013
Programming
0
340
Ruby on Rails introduction
A short walk through Ruby and Rails/
joren
November 27, 2013
Tweet
Share
More Decks by joren
See All by joren
Sock Techtalk
joren
0
290
RubyCamp BE #01
joren
0
130
Git techtalk [dutch]
joren
0
410
Chef and Rails, our story
joren
0
120
Mo.by
joren
0
70
Drupal deployments met Capistrano
joren
2
540
Git Techtalk
joren
3
190
Git
joren
11
1.7k
Other Decks in Programming
See All in Programming
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
130
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
7
1.8k
UIデザインに役立つ 2025年の最新CSS / The Latest CSS for UI Design 2025
clockmaker
10
4.3k
CSC305 Lecture 17
javiergs
PRO
0
210
Microservices rules: What good looks like
cer
PRO
0
210
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
5
2.8k
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
240
251126 TestState APIってなんだっけ?Step Functionsテストどう変わる?
east_takumi
0
290
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
32
15k
なあ兄弟、 余白の意味を考えてから UI実装してくれ!
ktcryomm
10
9.9k
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
2
3.2k
エディターってAIで操作できるんだぜ
kis9a
0
450
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Designing Experiences People Love
moore
142
24k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
A Tale of Four Properties
chriscoyier
162
23k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
The Invisible Side of Design
smashingmag
302
51k
Optimizing for Happiness
mojombo
379
70k
Rails Girls Zürich Keynote
gr2m
95
14k
Transcript
Ruby (on Rails) PHPBenelux @ Nucleus
• @joren • Openminds • ArrrrCamp
Ruby
History
History • 1995 • Yukihiro Matsumoto (aka Matz) • Philosophy:
Designed for programmer productivity and fun.
History • Inspired by Perl, Smalltalk, Lisp, Python • “I
wanted a scripting language that was more powerful than Perl, and more object-oriented than Python. That's why I decided to design my own language.”
Syntax
Dynamic typing
Strong typing
Duck typing • it walks like a duck; • it
talks like a duck; • it will probably be a duck.
Objects
Objects • Everything is an object • Defined by its
BEHAVIOUR
Objects Even primitive types
Classes - Modules • can be instantiated • object creation
• can inherit • cannot be included • can *not* be instantiated • mixin facility, namespace • no inheritance • can be included in classes and modules
Classes - Modules
Dynamic re-open everything
Dynamic
Dynamic
Variables
Methods
Methods
Strings & numbers
Arrays
Hashes
Loops
Conditions
Stdlib abbrev base64 benchmark bigdecimal cgi cmath coverage csv curses
date dbm debug delegate digest dl drb e2mmap English erb etc extmk fcntl fiddle fileutils find forwardable gdbm getoptlong gserver iconv io/console io/nonblock io/wait ipaddr irb json logger mathn matrix minitest minitest/benchmark minitest/spec mkmf monitor mutex_m net/ftp net/ http net/imap net/pop net/smtp net/telnet nkf objspace observer open- uri open3 openssl optparse ostruct pathname pp prettyprint prime profile profiler pstore psych pty racc racc/parser rake rdoc readline resolv resolv-replace rexml rinda ripper rss rubygems scanf sdbm securerandom set shell shellwords singleton socket stringio strscan sync syslog tempfile test/unit thread thwait time timeout tk tmpdir tracer tsort un uri weakref webrick win32ole xmlrpc yaml zlib
Gems • + 65.000 gems • little code libraries/modules •
gem install twitter
Rails just another gem
History • 37 Signals (Basecamp) • David Heinemeier Hansson (aka
DHH) • July 2004
MVC
Models • persintence-layer • validations • data manipulation methods •
define relations • CRUD
None
Views • templates • html (erb, haml, slim), xml, pdf,
json • custom languages
None
None
Controllers • get, post, patch, put, delete,… • parameter parsing
• session / cookie management
None
REST
generators • rails generate model Product name description:text • rails
generate controller products • rails generate mailer OrderMailer • rails generate migration AddActiveToProducts active:boolean • rails generate scaffold products • ‘rails generate’ to view all possibilities
Migrations • rake db:migrate • rake db:migrate:rollback • rake db:migrate:redo
Migrations
$ rake • rake is to ruby what make is
to C • run little ruby scripts • often used for cronjobs • rake -T
Convention Over Configuration
Sinatra
Sinatra
Development
Ruby Version Management • chruby • rvm
Bundler • gem version management • bundle install rails •
bundle update rails • bundle exec rails console • Gemfile & Gemfile.lock
Bundler
Tests • mini_test, unit_test • RSpec • cucumber • capybara
Run it • Local • bundle exec rails server •
pow.cx
Run it • Online • rack: unicorn, puma, passenger
Deploy • mina • capistrano • cap deploy
Community & Learn
Ruby Tapas
RailsCasts
learn.thoughtbot.com/rails
Ruby Rogues (+parley)
Visit a conference (like ArrrrCamp)
rails girls <3
So…
Ruby makes me happy
Tell a story
Thanks! Let’s have a drink.