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
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
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
120
One Enishi After Another
snoozer05
PRO
0
180
AIと人間の共創開発!OSSで試行錯誤した開発スタイル
mae616
2
870
業務でAIを使いたい話
hnw
0
230
CSC509 Lecture 09
javiergs
PRO
0
280
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
2
400
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
140
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
350
Register is more than clipboard
satorunooshie
1
370
SODA - FACT BOOK(JP)
sodainc
1
9.2k
お前も Gemini CLI extensions を作らないか?
satohjohn
0
100
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
260
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Language of Interfaces
destraynor
162
25k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
950
Stop Working from a Prison Cell
hatefulcrawdad
272
21k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
640
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
How to Ace a Technical Interview
jacobian
280
24k
Into the Great Unknown - MozCon
thekraken
40
2.1k
Why Our Code Smells
bkeepers
PRO
340
57k
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.