Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rails "M" in "MVC"

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
Avatar for Piotr Jurczyński Piotr Jurczyński
April 14, 2015
40

Rails "M" in "MVC"

Avatar for Piotr Jurczyński

Piotr Jurczyński

April 14, 2015

Transcript

  1. 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
  2. Ground rules! • no funny pictures, or cats - sorry

    :( • have a question? Interrupt and ask!
  3. 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!
  4. Special Example - Hearthstone • a card game • a

    card database • hearthstone_war • bonus - a repository that uses war “API” - hearthstone_war_ui
  5. What we will use • Gems: ◦ Rails App Composer

    ◦ Rspec ◦ shoulda-matchers ◦ FactoryGirl ◦ ActiveResource - Bonus ◦ RailRoady - Bonus • Patterns: ◦ Null Object
  6. 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?
  7. Handy patterns • Null Objects • Value Objects • Form

    Objects • Decorator/Presenter (draper) • Services
  8. Lessons learned • Rails is just a framework • learn

    ruby.. • ..no - you should learn programming!
  9. 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