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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sebastian Sogamoso
June 20, 2015
Programming
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Intro to Rails
Brief introduction to Rails followed by a workshop.
Presented at: RailsGirls Bogotá 2015
Sebastian Sogamoso
June 20, 2015
More Decks by Sebastian Sogamoso
See All by Sebastian Sogamoso
The overnight failure
sogamoso
0
130
The Overnight Failure
sogamoso
1
680
Refactor yourself
sogamoso
1
170
The overnight failure
sogamoso
0
440
The overnight failure
sogamoso
0
300
Leveraging N+1 queries
sogamoso
0
90
TCP Socket programming in Ruby
sogamoso
1
190
Dealing with payments
sogamoso
3
1.3k
When making money becomes a headache
sogamoso
0
170
Other Decks in Programming
See All in Programming
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
550
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
720
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
180
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
220
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
110
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
490
Cloudflare is Agents
chimame
0
160
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
200
yield再入門 #phpcon
o0h
PRO
0
1k
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Amusing Abliteration
ianozsvald
1
240
Designing for humans not robots
tammielis
254
26k
Chasing Engaging Ingredients in Design
codingconduct
0
260
Accessibility Awareness
sabderemane
1
170
The SEO Collaboration Effect
kristinabergwall1
1
520
The Invisible Side of Design
smashingmag
301
52k
A designer walks into a library…
pauljervisheath
211
24k
RailsConf 2023
tenderlove
30
1.5k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
56k
Color Theory Basics | Prateek | Gurzu
gurzu
0
410
Game over? The fight for quality and originality in the time of robots
wayneb77
1
240
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