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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
joren
November 27, 2013
Programming
350
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby on Rails introduction
A short walk through Ruby and Rails/
joren
November 27, 2013
More Decks by joren
See All by joren
Sock Techtalk
joren
0
300
RubyCamp BE #01
joren
0
140
Git techtalk [dutch]
joren
0
430
Chef and Rails, our story
joren
0
130
Mo.by
joren
0
86
Drupal deployments met Capistrano
joren
2
550
Git Techtalk
joren
3
210
Git
joren
11
1.7k
Other Decks in Programming
See All in Programming
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
250
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
180
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
320
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
200
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
450
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.6k
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.3k
Modding RubyKaigi for Myself
yui_knk
0
910
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
320
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.2k
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Designing Powerful Visuals for Engaging Learning
tmiket
1
410
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
The Cost Of JavaScript in 2023
addyosmani
55
10k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
210
Building a Scalable Design System with Sketch
lauravandoore
463
34k
YesSQL, Process and Tooling at Scale
rocio
174
15k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
The Art of Programming - Codeland 2020
erikaheidi
57
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.