4 ms·
ORMS: http://blog.brandonbloom.name/2009/10/orms-and-declarative-schemas.html http://blog.brandonbloom.name/2009/10/orms-and-declarative-s... Visual object-rel
by 10ren 16y ago
ORMS: http://blog.brandonbloom.name/2009/10/orms-and-declarative-schemas.html http://blog.brandonbloom.name/2009/10/orms-and-declarative-s...
Visual object-relational mappers allow you to integrate different DB schema and classes/objects, instead of deriving one from the other. What do people think of them? They aren't appealing to me, because they aren't very code-like... however, some relationships between disparate type-systems are much easier to express graphically than in code.
URL parameters: http://rails.nuvvo.com/lesson/6371-action-controller-parameters http://rails.nuvvo.com/lesson/6371-action-controller-paramet...
I really prefer Sinatra's way of doing this; and it's probably even more appropriate for prototyping (but not for big projects, where separate directories help handle complexity.) It's just amazingly simple and intuitive: http://www.sinatrarb.com/intro.html http://www.sinatrarb.com/intro.html
get '/hello/:name' do
# matches "GET /hello/foo" and "GET /hello/bar"
# params[:name] is 'foo' or 'bar'
"Hello #{params[:name]}!"
end
- jdminhbg 16y agoThat matcher syntax is available in Rails 2, and better and more concise in Rails 3 (http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/ http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in...) match '/hello/:name', :to => 'hello#index'