Blogroll

Search

PowerBoots – a beautiful DSL , not to mention useful.

October 12th, 2009 by Karl

I’ve always liked the fact that I can extend PowerShell, whether its just a little bit of syntax here or there, or a full blown DSL, and end up with something that is still naturally powershelly. Jaykul (Joel Bennet) has really used PowerShell in such a way. really making something that is pithy, follows a DRY philosophy, and is METAPROGRAMMING on two levels (the auto generation of the PowerShell functions and parameters, and of course the XAML). Its not only a beautiful example of PowerShell as a DSL, but also ultimately useful. I really think it has the potential to become the tcl/tk of PowerShell and the primary admin GUI scripting framework. I’m so impressed with it, we at ShellTools are definitely going to adjust our PowerShell WPF designer to support Boots. Boots is also now a codeplex project

Below is an example of the script, and a few screenshots and videos from Jaykul’s blog.

Boots {
   StackPanel -Margin 10 {
      TextBlock "The Question" -FontSize 42 -FontWeight Bold -Foreground "#FF0088"
      TextBlock -FontSize 24 {
         Hyperlink {
            Bold "Q. "
            "Can PowerBoots do async threads?"
         } -NavigateUri " " -On_RequestNavigate { $global:Answer[0].Visibility = "Visible" }
      }
      TextBlock -FontSize 16 {
         Span "A. " -FontSize 24 -FontWeight Bold
         "Oh yes we can!"
      } -OV global:Answer -Visibility Collapsed
   }
} 

.

PowerBoots11.png

.

Posted in powerboots, Powershell | 1 Comment »