TechBookReport logo



Keywords: MSH, scripting, system admin, .NET 2.0

Title: Monad

Author: Andy Oakley

Publisher: O'Reilly

ISBN: 0596100094

Media: Book

Level: Introductory

Verdict: A great introduction

 

Monad is the new object oriented scripting language for Microsoft's MSH shell. Developed as part of Vista and now available as a separate download, Monad/MSH utilises the .NET 2.0 framework on Windows XP or later. Given the historical lack of a decent shell or a scripting language on the Windows platform, Monad is something of a pleasant surprise. It's powerful, flexible and easy to learn. And, for those eager to dive in and get started this little book from O'Reilly is an excellent tutorial and introduction.

The opening chapter of the book sets the scene in describing both the functionality of the new shell/scripting language and how it differs from the old DOS command shell (and the later cmd.exe command processor). It also places it firmly in the system admin context normally occupied by Perl and the like, but with the important proviso that Monad is built on top of the .NET 2.0 framework. Key Monad concepts such as the verb noun syntax and the idea of pipelining are also introduced early on. There's good use of examples to make things clear, along with details of how to download and install the software.

The use of short but informative examples carries on throughout the rest of the book. Chapter two digs deeper, showing how to work with script files, create aliases for common commands, how to generate formatted results and more. Again one is struck by the power and elegance of Monad, though there's precious little coverage of non-Windows shell scripting for those who want to compare Monad to Perl or shell scripting in Linux.

The rest of the book proceeds to go further into Monad, covering functions, variables, scoping rules, working with structured data (CSV and XML), building on .NET class libraries and more. The final chapter pulls all of the previous material together and looks at putting it all to work to solve common real-world tasks, such as interrogating the file system, automating tasks, carrying out multiple change and replace operations on sets of files etc.

Of course those who've been dissatisfied with cmd.exe and tortuous batch files have always had (and continue to have) the option of using Perl, Python and other languages to perform admin tasks on Windows systems. However, Monad represents a powerful new option. The clean syntax built on top of .NET makes this an exciting technology for Windows-based developers and administrators, and this book does a great job of introducing it.


Hit the 'back' key in your browser to return to subject index page

Return to home page

Contents © TechBookReport 2006. Published February 23 2006