Boson: A Next Generation Task Framework for Ruby
Boson is a new command/task framework for Ruby by Gabriel Horner (of Hirb fame). Gabriel seems to be trying to supersede Rake, the Ruby "make" equivalent, and from first glance Boson seems to provide many benefits from the "reinvent the wheel" philosophy.
Anyone who's built a Rakefile knows it's not the most straightforward syntax, so Boson's approach of using regular Ruby code in the shape of methods added to a module is refreshing. Tasks are methods, methods are tasks—simple. Within these methods, you can use the options helper method and passed arguments to access command line options and other data. This straightforwardness and flexibility are akin to the safety and reliability players seek when choosing casino non AAMS sicuri for their online gaming experiences. Another feature is that while, like with Rake (or Thor), Boson can execute commands from the command line, you can also do so from IRB (the Ruby "console").
It's always a bit of a crapshoot when new tools come out in the Ruby world. Some catch on, some don't. Gabriel has clearly put a lot of thought into Boson, though, so if enough people are fed up with using Rake for command launching, I think it could catch on. Gabriel's blog post outlines what Boson does perfectly. For those ready to shoot down Rake, though, don't forget to read John Barnette's awesome, recent On Rake post. Rake's not just about launching tasks - it's a killer dependency resolution engine at heart, and that can result in less code if you approach your problems the right way.
(Aside: Sorry for the slow week at Ruby Inside. Six days ago my wife gave birth to our daughter and since she had a C-section, I'm playing housewife. I have quickly discovered if you're a housewife - or husband! - you have about zero hours left at the end of the day to do any other work.. I shall try my best!)
[ad] Mobile Orchard's from Rubyist to iPhone programmer in 2 days class is coming to Portland/OR Nov 12-13 and Los Angeles/CA Nov 19-20. $1200 $799 with early reg and "inside" discount code. Note that the early registration price ends tomorrow - 10/23!
October 22, 2009 at 9:13 pm
Thanks for the post, Peter. Best to you and your wife!
October 22, 2009 at 10:05 pm
Peter, thanks for the post. I'm not trying to supersede Rake which I think is awesome for rule and dependency based tasks. Boson is more geared towards creating tasks that behave like shell commands i.e. ones that handle options and have integrated help. More Boson posts for those who are interested: http://tagaholic.me/2009/10/19/how-boson-enhances-your-irb-experience.html and http://tagaholic.me/2009/10/15/boson-and-hirb-interactions.html
Congrats on the daughter!
October 22, 2009 at 10:35 pm
Congratulations on the baby, I am the father of 3 c-sections... my thoughts go out to you and yours. I'll be hoping for a speedy recovery, and thanks for all of the excellent content.
October 23, 2009 at 4:30 am
it is interesting.
and,Can it a "bosonlib" like "rakelib",not just in ~/.bason?
October 23, 2009 at 9:53 am
After a week it's time to wean them off the morphine and get them back to work. That old "I had major abdominal surgery" excuse wears thin after a while. (Don't tell my wife I said that).
October 23, 2009 at 1:55 pm
Peter, congratulations!
I have Gabriel's post opened since yesterday. Now you gave me another reason to finish reading it ;-)
October 23, 2009 at 5:04 pm
"Anyone who's built a Rakefile knows it's not the most straightforward syntax"
I don't know what you're talking about. When I first saw Rake I noticed that it's exactly like make, except I can execute arbitrary Ruby instead of shell commands. The concept and syntax was as straightforward as I think it can possibly be.
And congratulations by the way! But I suppose you've already seen our card. ;)
October 24, 2009 at 9:42 pm
Thor sucks, we dont need more stuff like that
October 25, 2009 at 2:03 am
And what do you do besides be the housemaid and smile while completely sleep deprived with grumpiness prevailing? Smile and enjoy it all of course. I'm about to be the housemaid again in December myself, and I feel for ya, but enjoy it while you can before toddlerhood.
October 28, 2009 at 4:28 pm
@type: A future release could have better support for local libraries. Feel free to drop it as an issue at http://github.com/cldwalker/boson/issues
@Hongli Lai: Agreed. Here's Boson's motivation/philosophy: http://tagaholic.me/2009/10/19/how-boson-enhances-your-irb-experience.html#organization_and_philosophy
@Tj: Although somewhat inspired by Thor, Boson is quite a different beast.