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
Intro to Rails
Search
Sebastian Sogamoso
June 20, 2015
Programming
0
120
Intro to Rails
Brief introduction to Rails followed by a workshop.
Presented at: RailsGirls Bogotá 2015
Sebastian Sogamoso
June 20, 2015
Tweet
Share
More Decks by Sebastian Sogamoso
See All by Sebastian Sogamoso
The overnight failure
sebastianso
0
95
The Overnight Failure
sebastianso
1
660
Refactor yourself
sebastianso
1
150
The overnight failure
sebastianso
0
420
The overnight failure
sebastianso
0
270
Leveraging N+1 queries
sebastianso
0
70
TCP Socket programming in Ruby
sebastianso
1
160
Dealing with payments
sebastianso
3
1.3k
When making money becomes a headache
sebastianso
0
140
Other Decks in Programming
See All in Programming
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
670
SwiftUI Viewの責務分離
elmetal
PRO
0
140
Lottieアニメーションをカスタマイズしてみた
tahia910
0
120
chibiccをCILに移植した結果 (NGK2025S版)
kekyo
PRO
0
210
Rails アプリ地図考 Flush Cut
makicamel
1
110
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
110
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
640
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
730
Kubernetes History Inspector(KHI)を触ってみた
bells17
0
200
Grafana Cloudとソラカメ
devoc
0
140
TokyoR116_BeginnersSession1_環境構築
kotatyamtema
0
110
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
260
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
Six Lessons from altMBA
skipperchong
27
3.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
A Tale of Four Properties
chriscoyier
158
23k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Adopting Sorbet at Scale
ufuk
74
9.2k
GraphQLとの向き合い方2022年版
quramy
44
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Thoughts on Productivity
jonyablonski
69
4.5k
Transcript
Intro to Rails Sebastián Sogamoso @sebasoga
Intro to Rails What is Rails?
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails What is a web page?
Intro to Rails
Intro to Rails
Intro to Rails
Intro to Rails
Intro to Rails https://railsgirls.com/bogota
Intro to Rails https://railsgirls.com/bogota
Intro to Rails https://railsgirls.com/bogota Request
Intro to Rails https://railsgirls.com/bogota Find file: cities/bogota.html
Intro to Rails https://railsgirls.com/bogota <html lang=“eng”> <head> <meta charset=“utf-8”>…
Intro to Rails https://railsgirls.com/bogota <html lang=“eng”> <head> <meta charset=“utf-8”>… Response
Intro to Rails What is a web application?
Intro to Rails
Intro to Rails https://www.facebook.com/railsgirls <html lang=“eng”> <head> <meta charset=“utf-8”>… Response
Request
Intro to Rails m/railsgirls charset=“utf-8”>… • Get list of fans
• Get list of comments • Order the comments by date • Get group photos • …
Intro to Rails What is Rails?
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails How does Rails do that?
Intro to Rails By following the this ideas: • MVC
pattern • Convention over configuration
Intro to Rails MVC Pattern Model View Controller
Intro to Rails Model
Intro to Rails This class (model) represents a table in
the database called “carts”
Intro to Rails This class (model) represents a table in
the database called “carts” Convention over configuration
Intro to Rails Rails includes an ORM called ActiveRecord
Intro to Rails Associations with other models
Intro to Rails Validations of its own state
Intro to Rails “Business logic”
Intro to Rails Controller
Intro to Rails Methods are called actions
Intro to Rails Methods use models to access the database
Intro to Rails Methods set instance variables
Intro to Rails Can explicitly render or redirect
Intro to Rails Can access the request parameters as a
hash
Intro to Rails View
Intro to Rails Uses ERB, Rails default templating language
Intro to Rails Regular HTML
Intro to Rails Special tags to execute Ruby
Intro to Rails Access to the instance variables set in
the controller
Intro to Rails How do they work together?
Intro to Rails http://my-rails-app.com <html lang=“eng”> <head> <meta charset=“utf-8”>… Response
Request
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller Router
Intro to Rails How do I get started?
Intro to Rails $ gem install rails
Intro to Rails $ gem install rails Just the name
for Ruby libraries
Intro to Rails
Intro to Rails Rails is modular, made out of other
18 libraries
Intro to Rails $ rails new my_app
Intro to Rails $ rails new my_app The name of
your Rails app
Intro to Rails
Intro to Rails Creates a bunch of files and then
install the dependencies
Intro to Rails
Intro to Rails File with the list of libraries (gems)
you want to use
Intro to Rails Where app configuration files are
Intro to Rails Where database schema and migrations are
Intro to Rails Where tests go
Intro to Rails Where your application code is $ cd
app/
Intro to Rails
Intro to Rails Where CSS, JS and images go
Intro to Rails Where controllers go
Intro to Rails Helpers are “globally scoped” methods intended to
be used mainly in views and controllers
Intro to Rails Classes that make sending email easy
Intro to Rails Where models go
Intro to Rails Where views go
Let’s see this in action! @sebasoga