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
Ruby on Rails for .Net Developers
Search
Michael Dwan
September 12, 2007
Programming
1
570
Ruby on Rails for .Net Developers
I gave this intro to Rails talk to the Chicago .NET Users Group on September 12, 2007.
Michael Dwan
September 12, 2007
Tweet
Share
More Decks by Michael Dwan
See All by Michael Dwan
Mongo Boulder 2011: Data Modeling for Performance
michaeldwan
0
41
Other Decks in Programming
See All in Programming
僕がつくった48個のWebサービス達
yusukebe
18
17k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
9
1k
Outline View in SwiftUI
1024jp
1
200
gopls を改造したら開発生産性が高まった
satorunooshie
8
250
WEBエンジニア向けAI活用入門
sutetotanuki
0
310
のびしろを広げる巻き込まれ力:偶然を活かすキャリアの作り方/oso2024
takahashiikki
1
410
Piniaの現状と今後
waka292
5
1.5k
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
230
Tuning GraphQL on Rails
pyama86
2
1.1k
レガシーな Android アプリのリアーキテクチャ戦略
oidy
1
170
EventSourcingの理想と現実
wenas
6
2.1k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
200
Featured
See All Featured
Music & Morning Musume
bryan
46
6.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Why Our Code Smells
bkeepers
PRO
334
57k
A designer walks into a library…
pauljervisheath
202
24k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Into the Great Unknown - MozCon
thekraken
31
1.5k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
YesSQL, Process and Tooling at Scale
rocio
167
14k
Statistics for Hackers
jakevdp
796
220k
Transcript
Ruby on Rails
“Web development that doesn’t hurt” RoR is an open-source web
framework that’s optimized for programmer happiness and sustainable productivity. It lets you write beautifiul code by favoring convention over configuration. -RubyOnRails.org
None
Don’t Repeat Yourself - Keep it DRY
Don’t Repeat Yourself - Keep it DRY Convention Over Configuration
Don’t Repeat Yourself - Keep it DRY Convention Over Configuration
Agile Development
Embrace Web Constraints Not Hide Them
Examples
None
None
None
Why Rails?
Ruby MVC Architecture Migrations ActiveRecord Scaffolding Test Framework
Ruby
dynamic scripting language everything is an object designed with programmer
happiness in mind
None
None
MVC ! The ActionPack
Model Manages application state Enforces business rules View Generates the
user interface html, js, xml, pdf, etc... Controller Orchestrates interactions between model & view
Fill in the blanks
fakecompany.com/store/add_to_cart/123
fakecompany.com/store/add_to_cart/123 Routing
fakecompany.com/store/add_to_cart/123 Routing
fakecompany.com/store/add_to_cart/123 StoreController Routing
fakecompany.com/store/add_to_cart/123 StoreController Routing
fakecompany.com/store/add_to_cart/123 StoreController Routing add_to_cart Action
fakecompany.com/store/add_to_cart/123 StoreController Routing add_to_cart Action
fakecompany.com/store/add_to_cart/123 Model StoreController Routing add_to_cart Action
fakecompany.com/store/add_to_cart/123 Database Model StoreController Routing add_to_cart Action
fakecompany.com/store/add_to_cart/123 Database Model StoreController Routing add_to_cart Action add_to_cart View
fakecompany.com/store/add_to_cart/123 Database Model StoreController Routing add_to_cart Action add_to_cart View
people-friendly urls action security and access control caching session management
None
someplace.com/store/add_to_cart/123 :controller => store :action => add_to_cart :id => 123
None
None
None
None
None
None
None
None
Migrations
database neutral description of a change reversible managed in source
control alongside app
None
ActiveRecord
ActiveRecord design pattern object relational mapper vender neutral data layer
db to ruby type translation pre-built to handle many common scenarios
Model = Singular Table = Plural
Model = Singular Customer => Customers Person => People Table
= Plural
None
None
Testing
automated unit tests automated functional tests automated integration tests fixtures
for sample data
None
None
Getting Started
None
Windows: 1. download from RubyForge.org 2. gem install rails --include-dependencies
3. ready to run
Windows: 1. download from RubyForge.org 2. gem install rails --include-dependencies
3. ready to run OS X Leopard 1. ready to run
Sample
What we Saw database migrations Model-View-Controller ActiveRecord scaffolding validation
Criticisms
None
performance
performance constraints
performance constraints maturity
Questions? @michaeldwan
[email protected]