[LRUG] London Geek Night: Don't get tied to the Rails

Damian Janowski damian.janowski at gmail.com
Wed Jan 7 04:42:01 PST 2009


On Wed, Jan 7, 2009 at 7:45 AM, Anthony Green <Anthony.Green at bbc.co.uk> wrote:
> I watched the Ramaze presentation from RubyConf
>
> But examples like this
>
> [...]
>
> with the routing, layout and controller code all in one place, I don't get.

I think the point is "it can be done" (think Pratik Naik's
Rails-in-one-file). Not just because "it can be done" but also because
these micro frameworks are perfect for things that don't need much
routing and maybe not even views or layouts.

I'm currently developing a Sinatra app and while everything could be
done in one big file, we were able to split things across different
files (for the "controllers"), and have Haml views so that:

# app/controllers/home.rb
get '/' do
  haml :'home/show'
end

We also have app/models for the Sequel files. And a standard lib/ for
extra things.

(Just in case this is of interest to anyone, the full stack is
Sinatra, PostgreSQL, Sequel, Haml, Test::Unit, Shoulda, RR, Passenger,
jQuery).



More information about the Chat mailing list