This post originated from an RSS feed registered with Ruby Buzz
by rwdaigle.
Original Post: Streamlined Framework: Domain Model Administration... for free
Feed Title: Ryan's Scraps
Feed URL: http://feeds.feedburner.com/RyansScraps
Feed Description: Ryan Daigle's various technically inclined rants along w/ the "What's new in Edge Rails" series.
I’m sitting in the middle of the Relevance guys’ presentation on the Streamlined Framework for the Raleigh Ruby Brigade right now – and I’m intrigued.
Most people have caught wind of Streamlined’s recent release but, if you’re anything like me, you haven’t really had a chance to dig into it or really understand what it’s about. Just so you hear it from another angle, here’s my take: Streamlined provides generation of domain administration views. Tada.
Running script/generate streamlined user roles permissions gets you a rich administration portal that lets you browse/edit/query your user, roles and permissions models – and does so in a way that recognizes your domain model’s associations. If your appetite has been appropriately wetted (is that a word?), check out their screencast.
If you have visions of wading through streamlined’s generated views to customize and update options, fear not. Streamlined represents rendered views as a model class – i.e. UserUI for the User model etc.. This means that this code:
class UserUI < Streamlined::UI
# Don't display the user's password in the view, but do
# display their id
user_columns :excludes => [:password], :includes => [:id]
end
Is all you have to do to adjust how Streamlined renders the user management view. (Obviously, there are several more options available…) The beauty in this is that this UI model is much less fragile to future upgrades, is very concise and just feels right. This is the part of Streamlined that excites me most.
Streamlined is an impressive solution to the problem of CRUD-based domain administration.