Programming, !
Web Applications !
and Ruby on Rails
Marco Schaden!
@donschado
Saturday 24th May 2014
Slide 2
Slide 2 text
Buzzwords!
Web Application
Ruby
Rails
Programming
HTTP
MVC
Model
View
Controller
Request
Response
Server
Protocol
?
?
?
?
?
?
?
HTML
all the stuff in 30 minutes
Slide 3
Slide 3 text
<>
Slide 4
Slide 4 text
No content
Slide 5
Slide 5 text
"It’s a boy’s thing"
Slide 6
Slide 6 text
http://en.wikipedia.org/wiki/Women_in_computing
Slide 7
Slide 7 text
http://en.wikipedia.org/wiki/Women_in_computing
Slide 8
Slide 8 text
"You need a Ph.D. in mathematics"
Slide 9
Slide 9 text
Not necessarily, but…
communication:
express your thoughts!
and ideas properly
passion:
care about what you’re doing !
and be curious how things work
research:
read documentation, !
consult others or!
just google it!
problem solving:
read the error messages !
and be hungry to solve issues
+ patience
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
programming: !
!
is telling a computer what to do!
!
(no magic involved)
Slide 12
Slide 12 text
step-by-step instructions
= program
Slide 13
Slide 13 text
3.times0do0
0 print0"Hello0World!"0
end
Slide 14
Slide 14 text
Ruby
A PROGRAMMER’S BEST FRIEND
https://www.ruby-lang.org/
Slide 15
Slide 15 text
imagine all the programming languages
Ruby
Slide 16
Slide 16 text
Why Ruby?
Yukihiro Matsumoto !
(Matz)
Ruby is designed to be human-
oriented. It reduces the burden of
programming. It tries to push jobs
back to machines.!
!
You can accomplish more tasks
with less work, in smaller yet
readable code.
"Matz is nice so we are nice"
Slide 17
Slide 17 text
Later we will learn more about Ruby…
Slide 18
Slide 18 text
Web Application
?
"A web application is a program that is displayed in a web browser. *
Web applications are usually stored (and executed) on a web server.
They can be accessed through the Internet
via a communication protocol such as HTTP. "
– Wikipedia
Slide 19
Slide 19 text
HTTP?
Hyper Text Transfer Protocol
http://weheartit.com/entry/17157559
Slide 20
Slide 20 text
HTTP
Request Cycle
In 4 Easy Steps
(or how the internet works)
Slide 21
Slide 21 text
your computer!
running a browser of your choice
a web server !
somewhere on the internet!
running a web application
David Heinemeier Hansson!
(DHH)
Why Rails?
Rails is an attempt to mold the
beauty and productiveness of
Ruby into a framework for
web applications.
Rails emphasizes principles such as:!
• convention over configuration!
• don't repeat yourself (DRY)!
• model - view - controller
architecture (MVC)
http://contributors.rubyonrails.org/
http://rubyonrails.org/
*over 3000 people have contributed:
Slide 30
Slide 30 text
MVC?
Model - View - Controller
http://weheartit.com/entry/17157559
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 52
Slide 52 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 53
Slide 53 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 54
Slide 54 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 55
Slide 55 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 56
Slide 56 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 57
Slide 57 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 58
Slide 58 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 59
Slide 59 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 60
Slide 60 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 61
Slide 61 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 62
Slide 62 text
Response
(HTML)
Browser
Layout
View
Request
Router
Controller
Model
Database
Slide 63
Slide 63 text
All The Tools You Need:
A Text Editor for writing code and editing files.
The Terminal (known as Command Prompt)!
Where you start the rails server and run commands.
A Web Browser (Firefox, Safari, Chrome,…)
for viewing and interacting with your application.
Ruby, the amazing programming language we love
Rails, the framework for building web applications