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 Applications & You
Search
Will Cosgrove
March 26, 2012
Programming
6
160
Web Applications & You
A really simple intro to rails I presented to a high school CS class
Will Cosgrove
March 26, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
Package Management Learnings from Homebrew
mikemcquaid
0
220
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
AI巻き込み型コードレビューのススメ
nealle
1
210
AgentCoreとHuman in the Loop
har1101
5
230
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
560
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
CSC307 Lecture 03
javiergs
PRO
1
490
Implementation Patterns
denyspoltorak
0
280
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
GraphQLとの向き合い方2022年版
quramy
50
14k
RailsConf 2023
tenderlove
30
1.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
56
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
66
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The Limits of Empathy - UXLibs8
cassininazir
1
210
Building an army of robots
kneath
306
46k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
49k
Transcript
Web Applications &you
What is a web application?
A web app is dynamic
dynamic websites are
dynamic websites are • different for each user
dynamic websites are • different for each user • usually
database backed
dynamic websites are • different for each user • usually
database backed • usually have a way to log in
what is a static website?
what is a static website? same for everyone
static websites are easy
congratulations you made a website
but Will, web app? what about a
pick a framework, any framework • Ruby on Rails •
Django • CakePHP • Sinatra • Play!
rails, I choose you!
good for? what is rails
really fast development make a blog in under 10 minutes
clean, structured code REST and CRUD and DRY oh my!
database agnostic rails talks to the database so you don’t
have to
4 there are key concepts
models
models map to the database posts id title body created_at
1 2 3 test lorem hello this i... ipsum world 03-25-12 03-26-12 03-26-12 database columns become instance variables with getter and setter methods
models contain validations validates :title, presence: true validates :password, length:
{ minimum: 6 } validates :email, format: /email_regex/
views
views are what the user sees the default template language
is ERB (embedded ruby), which is a superset of HTML
views are what the user sees <%= titleize @post.title %>
<% @post.each do |post| %> ... <% end %>
routes
routes are simple routes connect url paths /posts/:id/edit posts#edit to
controller actions
controllers
controllers connect the models and views view controller model db
user routes
a lot you just learned
now lets make a blog
resources for learning more • RailsCasts (railscasts.com) • Rails for
Zombies (railsforzombies.com) • PeepCode (peepcode.com) • Pragmatic Programmer (pragprog.com)
thanks for your time :)
[email protected]
{ twitter { github