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
Web Application & Ruby intro for RailsGirls Berlin
Search
Tobias Pfeiffer
December 08, 2012
Education
0
160
Web Application & Ruby intro for RailsGirls Berlin
A little introduction to web applications and Ruby for the December RailsGirls Berlin workshop.
Tobias Pfeiffer
December 08, 2012
Tweet
Share
More Decks by Tobias Pfeiffer
See All by Tobias Pfeiffer
Going Staff - Keynote edition
pragtob
0
5.9k
Going Staff
pragtob
0
20k
Stories in Open Source
pragtob
0
20k
Metaphors are everywhere: Ideas to Improve Software Development
pragtob
0
170
Stories in Open Source
pragtob
0
380
Elixir & Phoenix – Fast, Concurrent and Explicit
pragtob
0
590
Functioning Among Humans
pragtob
0
330
Functioning Among Humans
pragtob
0
71
Do You Need That Validation? Let Me Call You Back About It
pragtob
0
420
Other Decks in Education
See All in Education
女子商アプリ開発の軌跡
asial_edu
0
390
Pythonパッケージ管理 [uv] 完全入門
mickey_kubo
20
13k
View Manipulation and Reduction - Lecture 9 - Information Visualisation (4019538FNR)
signer
PRO
1
2k
2025年度春学期 統計学 第3回 クロス集計と感度・特異度,データの可視化 (2025. 4. 24)
akiraasano
PRO
0
130
OpenSourceSummitJapanを運営してみた話
kujiraitakahiro
0
700
新卒交流ワークショップ
pokotyamu
0
400
より良い学振申請書(DC)を作ろう 2025
luiyoshida
1
3.2k
ふりかえり研修2025
pokotyamu
0
1.1k
新卒研修に仕掛ける 学びのサイクル / Implementing Learning Cycles in New Graduate Training
takashi_toyosaki
1
140
『会社を知ってもらう』から『安心して活躍してもらう』までの プロセスとフロー
sasakendayo
0
230
SkimaTalk Teacher Guidelines Summary
skimatalk
0
790k
2025.05.10 技術書とVoicyとわたし #RPALT
kaitou
1
210
Featured
See All Featured
Code Review Best Practice
trishagee
68
18k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Six Lessons from altMBA
skipperchong
28
3.8k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
940
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.4k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
Transcript
Introduction to Web Applications Tobias Pfeiffer @PragTob pragtob.wordpress.com
Today
None
What is a web application?
Not rocket science
I am Rails (and So Can You!)
Programming is fun!
What you are going to build today
So what is a web application?
Presented in a web browser
Runs on a server...
...or the cloud
is dynamic
A high level overview
High level overview
High level overview
High level overview Request
High level overview
High level overview Answer
High level overview Answer
High level overview
What parts does a web application consist of?
Web Application
Front End Back End
Front End Back End
CSS HTML JavaScript
Structure and content
CSS HTML JavaScript
Styling to transform...
...this...
...into this.
CSS HTML JavaScript
Back End CSS HTML JavaScript
Back End CSS HTML JavaScript
Logic Infrastructure
Logic Infrastructure
Logic • Behaviour • Implements the business logic • Ties
all the parts together • Generates content
Ruby on Rails
Logic Infrastructure
Web Server
Logic Infrastructure
Storing all your data...
...in giant tables
Recap
Logic Storage Infrastructure CSS HTML JavaScript Web Application Landscape
Logic Storage Infrastructure CSS HTML JavaScript Web Application Landscape Bootstrap
XML DOM jQuery Ruby on Rails Sqlite Apache WEBrick MongoDB Thin Ruby PHP Python Django
But what is Ruby on Rails?
A web application framework written in Ruby
• A general purpose programming language • Principle of least
surprise • Invented by Yukihiro Matsumoto
"I hope to see Ruby help every programmer in the
world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language." Yukihiro Matsumoto
Ruby on Rails • Framework written in Ruby • set
of functionality to help write web applications – Connecting to the database (ActiveRecord) – Generating HTML (ERB) – Pays attention to security – … and so much more! • Model View Controller • You write in Ruby
Let's get into some Ruby
But before that...
Cookies & Questions
Open a terminal/console
irb
tobi@speedy:~$ irb 1.9.3p194 :001 >
irb – interactive ruby • talking to ruby • You
tell ruby something • Ruby responds with what it understood • Coaches are going to help you!
1.9.3p194 :001 > 5 => 5
1.9.3p194 :002 > 5 + 3 => 8
1.9.3p194 :003 > 8 * 7 => 56
1.9.3p194 :004 > "Tobias Pfeiffer" => "Tobias Pfeiffer"
1.9.3p194 :005 > name = "Tobi" => "Tobi"
1.9.3p194 :006 > name => "Tobi"
1.9.3p194 :007 > result = 8 * 7 => 56
1.9.3p194 :008 > result * 10 => 560
1.9.3p194 :009 > name + " likes Sweden" => "Tobi
likes Sweden"
1.9.3p194 :010 > puts "Hello World!" Hello World! => nil
1.9.3p194 :011 > fruits = ["apple", "keewee", "orange"] => ["apple",
"keewee", "orange"]
1.9.3p194 :013 > fruits.each do |fruit| puts fruit end apple
keewee orange => ["apple", "keewee", "orange"]
1.9.3p194 :014 > fruits[0] => "apple"
1.9.3p194 :015 > symbol = :wuh => :wuh 1.9.3p194 :016
> symbol => :wuh
1.9.3p194 :017 > dictionary = {:hi => "Hej", :good =>
"bra", :cookie => "kaka"} => {:hi=>"Hej", :good=>"bra", :cookie=>"kaka"} 1.9.3p194 :018 > dictionary[:hi] => "Hej" 1.9.3p194 :019 > dictionary[:cookie] => "kaka"
1.9.3p194 :020 > def hello 1.9.3p194 :021?> puts "Hello there!"
1.9.3p194 :022?> end => nil
1.9.3p194 :026 > hello Hello there! => nil
1.9.3p194 :023 > def greeter(person) 1.9.3p194 :024?> puts "Hello "
+ person 1.9.3p194 :025?> end => nil
1.9.3p194 :027 > greeter("Fanny") Hello Fanny => nil
1.9.3p194 :028 > greeter ArgumentError: wrong number of arguments (0
for 1) from (irb):23:in `greeter' from (irb):28 from /home/tobi/.rvm/rubies/ruby-1.9.3- p194/bin/irb:16:in `<main>'
1.9.3p194 :029 > class Person 1.9.3p194 :030?> attr_accessor :name, :age
1.9.3p194 :031?> end => nil 1.9.3p194 :032 > tobi = Person.new => #<Person:0x0000000205f080>
1.9.3p194 :033 > tobi.name => nil 1.9.3p194 :034 > tobi.name
= "Tobi" => "Tobi" 1.9.3p194 :035 > tobi.age = 23 => 23 1.9.3p194 :036 > tobi.name => "Tobi" 1.9.3p194 :037 > tobi.age => 23
1.9.3p194 :038 > tobi.age * 365 => 8395 1.9.3p194 :039
> puts "This was a talk by " + tobi.name + " - thank you!" This was a talk by Tobi - thank you! => nil
Thank you and enjoy coding! Tobias Pfeiffer @PragTob pragtob.wordpress.com listen
to me talking about learning Ruby (German)
Photo credit • http://www.flickr.com/photos/captainkimo/5918836159/ • http://www.flickr.com/photos/weppos/7486411688/ • http://www.flickr.com/photos/railsgirlsberlin/7882839698/in/photostream • http://www.flickr.com/photos/nirak/644336486/