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
690
Refactor yourself
sogamoso
1
180
The overnight failure
sogamoso
0
440
The overnight failure
sogamoso
0
300
Leveraging N+1 queries
sogamoso
0
95
TCP Socket programming in Ruby
sogamoso
1
200
Dealing with payments
sogamoso
3
1.3k
When making money becomes a headache
sogamoso
0
190
Other Decks in Programming
See All in Programming
AIの中の人になってみる
htkym
0
150
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
130
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
2
920
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.4k
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.6k
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
570
[DroidKaigi 26] How We Moved from Android Studio to Slack
thisaay
0
150
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
790
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
190
プロポーザルを書いてもらう
pvcresin
0
600
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
260
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
560
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
320
GitHub's CSS Performance
jonrohan
1033
470k
Google's AI Overviews - The New Search
badams
0
1.6k
A Soul's Torment
seathinner
7
3.5k
Darren the Foodie - Storyboard
khoart
PRO
3
3.8k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
440
Game over? The fight for quality and originality in the time of robots
wayneb77
1
260
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
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