Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Introduction to Web
Development
With Ruby on Rails
Panos G. Matsinopoulos
Tech Career Booster
techcareerbooster.com
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Who am I?
● Panos G. Matsinopoulos
● Software Writer and Reader
● Computer Programming Proponent (techcareerbooster.com)
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
What is a Computer Program?
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
What is a Programming Language?
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
What is Web Development?
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Web Development
● Application that is used using a Web Browser
● Implementation relies on HTTP …
● … which relies on TCP…
● … which relies on IP …
● Other protocols are popular
● … SMTP
● … FTP
● … and more …
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Do I have to Learn Internet Protocols?
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
HTTP(S)
● Used by browser to issue a request to a Web server.
● Verb (GET, POST, PUT, PATCH, DELETE …)
● URI (“http://foo.bar.com/articles”)
● Headers
● Body
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
HTTP Request / HTTP Response
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Ruby on Rails - Web Framework
● Has solved many of the Technology Challenges
● Allows you to focus on the Application / Business Domain
● For example
○ Allows you to easily parse the values that are submitted using a form
○ Has solved many security concerns.
○ e.t.c.
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Prerequisites for RoR
● HTML, CSS (SASS), JavaScript (Coffee)
● HTTP Basics
● SQL and Database Design
● Ruby
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
6 Basic Architecture Components
● Ruby on Rails Server
● Routes
● Controllers (and their Actions)
● Models
● Views
● Assets
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
6 Basic Architecture Components
● Ruby on Rails Server
● Routes
● Controllers (and their Actions)
● Models
● Views
● Assets
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Rails Server
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
6 Basic Architecture Components
● Ruby on Rails Server
● Routes
● Controllers (and their Actions)
● Models
● Views
● Assets
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Routes
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Route Decision
HTTP VERB PATH TO RESOURCE
GET /articles route to
GET /articles/ruby-hashes
Controller &
Action
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Routes Configuration
get '/reset_password_request', to: 'reset_passwords#new', as: :reset_password_request
post '/reset_password_request', to: 'reset_passwords#create', as: :create_reset_password_request
get '/reset_password', to: 'reset_passwords#new_reset_password', as: :new_reset_password
post '/reset_password', to: 'reset_passwords#reset_password', as: :reset_password
HTTP Verbs Controllers Actions
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
6 Basic Architecture Components
● Ruby on Rails Server
● Routes
● Controllers (and their Actions)
● Models
● Views
● Assets
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Controllers & Actions
● A Controller is an Object.
● An Action is a public method on this Controller.
● It takes the data of the HTTP request.
● It does the job requested.
● It prepares the data for the View.
● Asks view to build up the response.
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Controller Example
class ArticlesController < ApplicationController
def create
article = Article.new(article_params)
if article.save
flash[:success] = 'Article has been created!'
redirect_to edit_article_url(article)
else
@article = article
render :new
end
end
# ...
end
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
6 Basic Architecture Components
● Ruby on Rails Server
● Routes
● Controllers (and their Actions)
● Models
● Views
● Assets
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
What are the Models?
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Models more like this:
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Models in RoR
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Persist Model State
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
RoR Favours RDBMS
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Objects <=>Tables
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
ActiveRecord
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Controller Example - Model Highlights
class ArticlesController < ApplicationController
def create
article = Article.new(article_params)
if article.save
flash[:success] = 'Article has been created!'
redirect_to edit_article_url(article)
else
@article = article
render :new
end
end
# ...
end
Model and ActiveRecord
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
6 Basic Architecture Components
● Ruby on Rails Server
● Routes
● Controllers (and their Actions)
● Models
● Views
● Assets
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Views and Layouts
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Layout Example
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
<title>Blog</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<div class="container">
<%= render partial: 'layouts/flash' %>
<%= yield %>
</div>
</body>
</html>
This is where the view part is embedded in
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
View Example
<% # File: app/views/articles/new.html.erb %>
<h1>Create a New Article</h1>
<%= form_for @article, url: articles_path do |f| %>
<div class="form-group">
<%= f.label :title %>
<%= f.text_field :title, placeholder: 'Give Title of Article', class: 'form-control' %>
</div>
<div class="form-group">
<%= f.label :text %>
<%= f.text_area :text, placeholder: 'Type in the text of the Article', class: 'form-control' %>
</div>
<div>
<%= f.submit class: 'btn btn-success' %>
</div>
<% end %>
<div class="text-right">
<a href="<%= articles_path %>">List of Articles</a>
</div>
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
6 Basic Architecture Components
● Ruby on Rails Server
● Routes
● Controllers (and their Actions)
● Models
● Views
● Assets
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Assets
● Images
● JavaScript
● CSS
● Minification
● Fingerprint (which helps browser caching the resources)
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
Folder Structure
Tech Career Booster - Online Computer Programming School - techcareerbooster.com
You’ve had enough of me ….
Want to land on a
Junior Web Developer job? …
Learn how by clicking this:
techcareerbooster.com

More Related Content

KEY
Enterprise Architectures with Ruby (and Rails)
PDF
EuroPython 2011 - How to build complex web applications having fun?
PPTX
The PRPL Pattern
PDF
Migration tales from java ee 5 to 7
PDF
Better and Faster: A Journey Toward Clean Code and Enjoyment
PDF
Curious Coders Java Web Frameworks Comparison
PDF
Monitoring 改造計畫:流程觀點
PDF
Wrangling Large Scale Frontend Web Applications
Enterprise Architectures with Ruby (and Rails)
EuroPython 2011 - How to build complex web applications having fun?
The PRPL Pattern
Migration tales from java ee 5 to 7
Better and Faster: A Journey Toward Clean Code and Enjoyment
Curious Coders Java Web Frameworks Comparison
Monitoring 改造計畫:流程觀點
Wrangling Large Scale Frontend Web Applications

What's hot (20)

PDF
Comparing JVM Web Frameworks - February 2014
PDF
有了 Agile,為什麼還要有 DevOps?
PPTX
GraphQL-ify your APIs - Devoxx UK 2021
PDF
Maven - Taming the Beast
PPTX
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
PDF
Big rewrites without big risks
PDF
TechSEO Boost 2018: Programming Basics for SEOs
KEY
Cross-Platform Mobile Chemistry Apps
PDF
Play vs Grails Smackdown - Devoxx France 2013
PPTX
MWLUG - Universal Java
PDF
The Future Of Web Frameworks
PDF
AliExpress’ Way to Microservices - microXchg 2017
KEY
Selenium at STPCon - Dallas 2011
PPTX
Comparing Agile QA Approaches to End-to-End Testing
PDF
Web Frameworks of the Future
PPT
Developing Java Web Applications
PDF
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
PDF
How to Build a Better JIRA Add-on
PDF
Play Framework vs Grails Smackdown - JavaOne 2013
PDF
Full Steam Ahead, R2DBC!
Comparing JVM Web Frameworks - February 2014
有了 Agile,為什麼還要有 DevOps?
GraphQL-ify your APIs - Devoxx UK 2021
Maven - Taming the Beast
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
Big rewrites without big risks
TechSEO Boost 2018: Programming Basics for SEOs
Cross-Platform Mobile Chemistry Apps
Play vs Grails Smackdown - Devoxx France 2013
MWLUG - Universal Java
The Future Of Web Frameworks
AliExpress’ Way to Microservices - microXchg 2017
Selenium at STPCon - Dallas 2011
Comparing Agile QA Approaches to End-to-End Testing
Web Frameworks of the Future
Developing Java Web Applications
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
How to Build a Better JIRA Add-on
Play Framework vs Grails Smackdown - JavaOne 2013
Full Steam Ahead, R2DBC!
Ad

Similar to Introduction to Web Development with Ruby on Rails (20)

PDF
C# Advanced L09-HTML5+ASP
PPTX
document object model in web technologies notes for engineering.pptx
ODP
Get going with CakePHP Framework at gnuNify 2010
PPTX
MCA-202-W4-L1.pptx
PDF
Streamlining Your Applications with Web Frameworks
PDF
django_introduction20141030
PPTX
An Introduction to Web Components
PDF
Client Side Measurement & Performance With Rails
PDF
Angular (v2 and up) - Morning to understand - Linagora
PDF
Framework Presentation
PDF
Front End Development for Back End Java Developers - Jfokus 2020
PDF
T5 Oli Aro
PPTX
Ruby on Rails + AngularJS + Twitter Bootstrap
PDF
Play framework 2 : Peter Hilton
ODP
The Importance Things of Full Stack Development
PDF
Code for Startup MVP (Ruby on Rails) Session 1
PPTX
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
PPTX
ASP.NET - Ivan Marković
PPTX
Scraping the web with Laravel, Dusk, Docker, and PHP
PDF
AngularJS for Web and Mobile
C# Advanced L09-HTML5+ASP
document object model in web technologies notes for engineering.pptx
Get going with CakePHP Framework at gnuNify 2010
MCA-202-W4-L1.pptx
Streamlining Your Applications with Web Frameworks
django_introduction20141030
An Introduction to Web Components
Client Side Measurement & Performance With Rails
Angular (v2 and up) - Morning to understand - Linagora
Framework Presentation
Front End Development for Back End Java Developers - Jfokus 2020
T5 Oli Aro
Ruby on Rails + AngularJS + Twitter Bootstrap
Play framework 2 : Peter Hilton
The Importance Things of Full Stack Development
Code for Startup MVP (Ruby on Rails) Session 1
NEXTjs.pptxfggfgfdgfgfdgfdgfdgfdgfdgfdgfg
ASP.NET - Ivan Marković
Scraping the web with Laravel, Dusk, Docker, and PHP
AngularJS for Web and Mobile
Ad

Recently uploaded (20)

PDF
CloudStack 4.21: First Look Webinar slides
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Architecture types and enterprise applications.pdf
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
Zenith AI: Advanced Artificial Intelligence
PPTX
The various Industrial Revolutions .pptx
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
Modernising the Digital Integration Hub
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPT
What is a Computer? Input Devices /output devices
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
Consumable AI The What, Why & How for Small Teams.pdf
CloudStack 4.21: First Look Webinar slides
sustainability-14-14877-v2.pddhzftheheeeee
Architecture types and enterprise applications.pdf
Microsoft Excel 365/2024 Beginner's training
Credit Without Borders: AI and Financial Inclusion in Bangladesh
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
Zenith AI: Advanced Artificial Intelligence
The various Industrial Revolutions .pptx
1 - Historical Antecedents, Social Consideration.pdf
Chapter 5: Probability Theory and Statistics
Custom Battery Pack Design Considerations for Performance and Safety
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Modernising the Digital Integration Hub
Enhancing emotion recognition model for a student engagement use case through...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Abstractive summarization using multilingual text-to-text transfer transforme...
A proposed approach for plagiarism detection in Myanmar Unicode text
What is a Computer? Input Devices /output devices
OpenACC and Open Hackathons Monthly Highlights July 2025
Consumable AI The What, Why & How for Small Teams.pdf

Introduction to Web Development with Ruby on Rails

  • 1. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Introduction to Web Development With Ruby on Rails Panos G. Matsinopoulos Tech Career Booster techcareerbooster.com
  • 2. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Who am I? ● Panos G. Matsinopoulos ● Software Writer and Reader ● Computer Programming Proponent (techcareerbooster.com)
  • 3. Tech Career Booster - Online Computer Programming School - techcareerbooster.com What is a Computer Program?
  • 4. Tech Career Booster - Online Computer Programming School - techcareerbooster.com What is a Programming Language?
  • 5. Tech Career Booster - Online Computer Programming School - techcareerbooster.com What is Web Development?
  • 6. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Web Development ● Application that is used using a Web Browser ● Implementation relies on HTTP … ● … which relies on TCP… ● … which relies on IP … ● Other protocols are popular ● … SMTP ● … FTP ● … and more …
  • 7. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Do I have to Learn Internet Protocols?
  • 8. Tech Career Booster - Online Computer Programming School - techcareerbooster.com HTTP(S) ● Used by browser to issue a request to a Web server. ● Verb (GET, POST, PUT, PATCH, DELETE …) ● URI (“http://foo.bar.com/articles”) ● Headers ● Body
  • 9. Tech Career Booster - Online Computer Programming School - techcareerbooster.com HTTP Request / HTTP Response
  • 10. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Ruby on Rails - Web Framework ● Has solved many of the Technology Challenges ● Allows you to focus on the Application / Business Domain ● For example ○ Allows you to easily parse the values that are submitted using a form ○ Has solved many security concerns. ○ e.t.c.
  • 11. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Prerequisites for RoR ● HTML, CSS (SASS), JavaScript (Coffee) ● HTTP Basics ● SQL and Database Design ● Ruby
  • 12. Tech Career Booster - Online Computer Programming School - techcareerbooster.com 6 Basic Architecture Components ● Ruby on Rails Server ● Routes ● Controllers (and their Actions) ● Models ● Views ● Assets
  • 13. Tech Career Booster - Online Computer Programming School - techcareerbooster.com 6 Basic Architecture Components ● Ruby on Rails Server ● Routes ● Controllers (and their Actions) ● Models ● Views ● Assets
  • 14. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Rails Server
  • 15. Tech Career Booster - Online Computer Programming School - techcareerbooster.com 6 Basic Architecture Components ● Ruby on Rails Server ● Routes ● Controllers (and their Actions) ● Models ● Views ● Assets
  • 16. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Routes
  • 17. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Route Decision HTTP VERB PATH TO RESOURCE GET /articles route to GET /articles/ruby-hashes Controller & Action
  • 18. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Routes Configuration get '/reset_password_request', to: 'reset_passwords#new', as: :reset_password_request post '/reset_password_request', to: 'reset_passwords#create', as: :create_reset_password_request get '/reset_password', to: 'reset_passwords#new_reset_password', as: :new_reset_password post '/reset_password', to: 'reset_passwords#reset_password', as: :reset_password HTTP Verbs Controllers Actions
  • 19. Tech Career Booster - Online Computer Programming School - techcareerbooster.com 6 Basic Architecture Components ● Ruby on Rails Server ● Routes ● Controllers (and their Actions) ● Models ● Views ● Assets
  • 20. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Controllers & Actions ● A Controller is an Object. ● An Action is a public method on this Controller. ● It takes the data of the HTTP request. ● It does the job requested. ● It prepares the data for the View. ● Asks view to build up the response.
  • 21. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Controller Example class ArticlesController < ApplicationController def create article = Article.new(article_params) if article.save flash[:success] = 'Article has been created!' redirect_to edit_article_url(article) else @article = article render :new end end # ... end
  • 22. Tech Career Booster - Online Computer Programming School - techcareerbooster.com 6 Basic Architecture Components ● Ruby on Rails Server ● Routes ● Controllers (and their Actions) ● Models ● Views ● Assets
  • 23. Tech Career Booster - Online Computer Programming School - techcareerbooster.com What are the Models?
  • 24. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Models more like this:
  • 25. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Models in RoR
  • 26. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Persist Model State
  • 27. Tech Career Booster - Online Computer Programming School - techcareerbooster.com RoR Favours RDBMS
  • 28. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Objects <=>Tables
  • 29. Tech Career Booster - Online Computer Programming School - techcareerbooster.com ActiveRecord
  • 30. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Controller Example - Model Highlights class ArticlesController < ApplicationController def create article = Article.new(article_params) if article.save flash[:success] = 'Article has been created!' redirect_to edit_article_url(article) else @article = article render :new end end # ... end Model and ActiveRecord
  • 31. Tech Career Booster - Online Computer Programming School - techcareerbooster.com 6 Basic Architecture Components ● Ruby on Rails Server ● Routes ● Controllers (and their Actions) ● Models ● Views ● Assets
  • 32. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Views and Layouts
  • 33. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Layout Example <!DOCTYPE html> <html> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> <title>Blog</title> <%= csrf_meta_tags %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> </head> <body> <div class="container"> <%= render partial: 'layouts/flash' %> <%= yield %> </div> </body> </html> This is where the view part is embedded in
  • 34. Tech Career Booster - Online Computer Programming School - techcareerbooster.com View Example <% # File: app/views/articles/new.html.erb %> <h1>Create a New Article</h1> <%= form_for @article, url: articles_path do |f| %> <div class="form-group"> <%= f.label :title %> <%= f.text_field :title, placeholder: 'Give Title of Article', class: 'form-control' %> </div> <div class="form-group"> <%= f.label :text %> <%= f.text_area :text, placeholder: 'Type in the text of the Article', class: 'form-control' %> </div> <div> <%= f.submit class: 'btn btn-success' %> </div> <% end %> <div class="text-right"> <a href="<%= articles_path %>">List of Articles</a> </div>
  • 35. Tech Career Booster - Online Computer Programming School - techcareerbooster.com 6 Basic Architecture Components ● Ruby on Rails Server ● Routes ● Controllers (and their Actions) ● Models ● Views ● Assets
  • 36. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Assets ● Images ● JavaScript ● CSS ● Minification ● Fingerprint (which helps browser caching the resources)
  • 37. Tech Career Booster - Online Computer Programming School - techcareerbooster.com Folder Structure
  • 38. Tech Career Booster - Online Computer Programming School - techcareerbooster.com You’ve had enough of me …. Want to land on a Junior Web Developer job? … Learn how by clicking this: techcareerbooster.com