Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rails "M" in "MVC"
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Piotr Jurczyński
April 14, 2015
40
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rails "M" in "MVC"
Piotr Jurczyński
April 14, 2015
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
530
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Navigating Weather and Climate Data
rabernat
0
560
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
620
Between Models and Reality
mayunak
4
500
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
480
Transcript
Rails “M” in “MVC” Model NETGURU
Who am I? Piotr Jurczynski RoR developer @ netguru
Why “I” do the talk? • Fun, fun, fun •
promote ruby • workshops - netguru.co/workshops ◦ April, 25-26 - Gdansk ◦ May, 23-24 - Gliwice ◦ June, 27-28 - Krakow
Workshops • netguru.co/workshops 2-3 weeks before event • solve special
task • have fun at workshops!
Ground rules! • no funny pictures, or cats - sorry
:( • have a question? Interrupt and ask!
Roadmap • What is a model? • Migrations - do’s
and dont’s • Validations • Callbacks - just beware • Observers - beware even more! • Associations - just read it • Bonus - ActiveResource And all this with a special example!
Special Example - Hearthstone • a card game • a
card database • hearthstone_war • bonus - a repository that uses war “API” - hearthstone_war_ui
What we will use • Gems: ◦ Rails App Composer
◦ Rspec ◦ shoulda-matchers ◦ FactoryGirl ◦ ActiveResource - Bonus ◦ RailRoady - Bonus • Patterns: ◦ Null Object
Handy links • tryruby.org • ruby-warrior • ruby guides •
ruby style guide • 7 ways to refactor fat models • when to refactor? • how can I update a model?
Handy patterns • Null Objects • Value Objects • Form
Objects • Decorator/Presenter (draper) • Services
Lessons learned • Rails is just a framework • learn
ruby.. • ..no - you should learn programming!
Remember! workshops NETGURU
Piotr Jurczynski • twitter: Merstzik • gplus: PiotrJurczynski • github:
pjurczynski speakerdeck.com/netguru/rails-m-in-mvc alt:speakerdeck.com/pjurczynski/rails-m-in-mvc Thank you! NETGURU