It's OK to make a new folder within Rails.

          Collin Schaafsma, Founder @ Quick Left
                     @collinschaafsma
My Rails app just got complex bro


            so now what?
(Clojure)
Node.js
JKLOL


this is a ruby / rails talk
WTF is Rails
WTF is Rails
it’s why we can’t have nice things
WTF is a Framework
I promise this is the last time we define something in this talk
Just to be clear
    I like Rails
But... Rails is not your app
Has Rails owned your app?
What does this remind you of?
So. What is a model?
I lied, we are about to define something again
Classes that store, and optionally
         separate, data
         Persistence mother-fu@*er!
How do we break this apart?
This is not a new problem
   Most likely it’s been solved before
Facades        Bridges
Factories                Presenters
            Decorators
                          Proxies
  Mediators
             Builders
    Reactors       Observers
But wait, we have three choices
model / view / controller
we can randomly toss shit in helpers/ and lib/
Don’t let Rails kill your software
          design skills
         you’re smarter than that
Example Apps
 Oh snap. Real code.
Why?
                       Dude. I gotta get shit done.



If you don’t have time to do it right, when will you have time to do it
over?                                                    John Wooden

The only way to make the deadline -- the only way to go fast -- is to
keep the code as clean as possible at all times.      Robert C. Martin
S.O.L.I.D
Folks can grock it
Easier Refactoring
  Testable Code
Speaking of testing
Speaking of testing
Testing should be fast. Really fast.
Step (1) Cut a hole in a box
Step (2) Don’t put Rails in that box
Example Code
Damn son. More code.
TDD promotes good design
    TDD might not actually suck!
The word on the street
We need something better. Persistence and logic are two separate
responsibilities that every rails app combines.      Steve Klabnik

I pull the behavior out of my models into other objects that wrap the
models. I prefer to make the AR objects simple wrappers around the db-
access stuff in AR.
                                                        Corey Haines
Let’s recap
Thanks!
Resources
            Example Rails app
https://github.com/collinschaafsma/loyd

            Example Sinatra app
https://github.com/collinschaafsma/slimfit

              More resources
     https://gist.github.com/1934139
             @collinschaafsma

It's OK to make a new folder within Rails.