Rapid Prototyping with Rails
            isn’t
           Rapid
Rapid Prototyping with Rails
            isn’t
       Collaborative
Rapid Prototyping with Rails
           isn’t
           Easy
$ rails new protoypeapp
$ rails generate scaffold ...
Models and Controllers
Architecting =/= Prototyping
$ vi config/database.yml
$ mysql -uroot
NO
A database shouldn’t be
required to brainstorm
         ideas
Don’t even get me
started on migrations
Only Rails
Programmers can
   contribute
Prototyping should be
     All inclusive
$ serve create app
$ serve create app -j jquery

 # Works with jquery jquery-ui Prototype etc.
app/
    |
    +--   config.ru
    +--   public/                 # Directories for static assets
    |      +-- stylesheets/       # Compiled stylesheets
    |      +-- images/
    |      `-- javascripts/
    +--   sass/                   # Store Sass source files here
    |      `-- application.sass
    +--   tmp/
    |      `-- restart.txt        #   Needed for Passenger
    `--   views/                  #   Store your ERB, Haml, etc. here
           +-- _layout.html.erb   #   Example layout
           +-- hello.html.erb     #   Example view
           +-- view_helpers.rb    #   Example view helpers
           `-- stan.html          #   PLAIN HTML ALSO WORKS!
No Models
No Controllers
All views
No Routes Either
View folders
    are
Your Routes
All the simplicity of
  circa 2004 PHP
View Helpers
make it modern
$ gem install factory_girl
$ gem install faker
$ gem install factory_girl_extensions
# views/view_helper.rb
FactoryGirl.define do
  factory :user do
    first_name Faker::Name.first_name #=> John
    last_name Faker::Name.last_name #=> Smith
  end
end
# views/view_helper.rb
class Numeric
   def of &block
     Array.new(to_i).map &block
   end
end


@users = 50.of.User.build

           Cheap and easy Data Model
# /config.ru




     Serve is a Rack app!
$ curl get.pow.cx | sh
$ cd ~/.pow
$ ln -s /path/to/myapp
http://myapp.dev/
But, wait
Alt-⌘ + ⌘R
takes too long!
Guard
Guard




$ gem install guard
Guard




$ gem install guard-livereload
Guard



LiveReload refreshes the
  browser so you don’t
        have to
Guard



Available for Windows, Mac, Linux
                on
   Firefox, Chrome and Safari

 github.com/mockko/livereload
Guard




$ guard init livereload
Guard


# /Guardfile
guard 'livereload' do
  watch(%r{views/.+.(erb|haml|html)})
  watch(%r{views/helpers_.rb})
  watch(%r{public/.+.(css|js|html)})
end
Serve projects are rack apps
             so
    Heroku likes them
Front-End/Designer’s
    Perspective
Rails is a tool for
backend developers
Design in the Browser
Contribute more than
    sliced PSDs
Command-line is
becoming expected as
skill for front-end devs
Git isn’t that hard
Github & Heroku
          =
Great Reasons to Learn
Entreprenurs,
Get your ideas done
 faster and cheaper
Let people who love
  HTML do HTML
Let Rubyists wrestle
     with Rails
Empower front-end devs
          to
make the backend easier
Empower front-end devs
           to
make the backend easier
be a part of the process
Thank You
One more thing...
Rails 3 is
       a
Rack Application
Rack::Cascade
[Enter Stage Left]
Rack::Cascade




run Rack::Cascade.new([
  MyRailsApp::Application,
  serve_polished_protoype,
  serve_rough_wireframes
])
Rack::Cascade




   Reuse
 your mockups
and wireframes
This has been
Rapid Prototyping FTW!!!
       Emmanuel Mwangi
      Senior QA Engineer
           SendGrid

Rapid Prototyping FTW!!!

Editor's Notes

  • #2 \n
  • #3 \n
  • #4 \n
  • #5 \n
  • #6 \n
  • #7 Models and Controllers are architecting. They make you think about how the app should work rather than what the app should do or what it should look like or how it will interact with users.\n
  • #8 \n
  • #9 \n
  • #10 \n
  • #11 \n
  • #12 \n
  • #13 \n
  • #14 \n
  • #15 \n
  • #16 \n
  • #17 \n
  • #18 \n
  • #19 \n
  • #20 \n
  • #21 \n
  • #22 \n
  • #23 \n
  • #24 View_helpers are ruby files in each directory to execute in the context of the the views in each directory.\n
  • #25 \n
  • #26 \n
  • #27 \n
  • #28 Auto-generate random names, addresses, companies, slogans, etc with Faker.\n
  • #29 User.build comes from factory_girl_extensions\n
  • #30 \n
  • #31 \n
  • #32 That’s the install!\n
  • #33 That’s how to link an app to project\n
  • #34 That’s how to link an app to project\n
  • #35 \n
  • #36 \n
  • #37 \n
  • #38 \n
  • #39 \n
  • #40 \n
  • #41 Browser plugin for all the major modern browsers.\n
  • #42 \n
  • #43 \n
  • #44 \n
  • #45 \n
  • #46 Easy to install Pow, Serve and even Push to Heroku with a little help.\n
  • #47 Easy to install Pow, Serve and even Push to Heroku with a little help.\n
  • #48 Easy to install Pow, Serve and even Push to Heroku with a little help.\n
  • #49 Easy to install Pow, Serve and even Push to Heroku with a little help.\n
  • #50 Easy to install Pow, Serve and even Push to Heroku with a little help.\n
  • #51 Easy to install Pow, Serve and even Push to Heroku with a little help.\n
  • #52 Easy to install Pow, Serve and even Push to Heroku with a little help.\n
  • #53 \n
  • #54 \n
  • #55 \n
  • #56 \n
  • #57 \n
  • #58 \n
  • #59 Always wanted to do a deck with one of these slides...\n
  • #60 \n
  • #61 \n
  • #62 From top to bottom, Rack::Cascade will try and serve pages from the first app and if that page returns a 404, automatically serves from the next app down the list. Each of the apps on that list can be different projects, with different teams and different states of readiness.\n
  • #63 \n
  • #64 \n