Command-line vs. UI

So I am told I was a bit hard on the command-line in my previous post. I feel like this is a good reason to explain my attitude in a greater detail.

The truth is that I don’t see any real contradiction between the two and I think they actually need to be both present to make a good manageability experience.

UI is good. It is intuitive (well, should be) and interactive. It makes learning curve smaller and provides you with a better picture of what is going on and what your options are.

However,  once you decide to automate the stuff a bit, or start going into fancy stuff, or want to know “what’s really going on here” – the chances are you are going to start a command-line prompt or your favorite script editor.

Bottom-line is: you need both. Good systems provide you both of them and make the transitions from one to the other easy and intuitive.

Let me give you a few examples to show what I mean:

Microsoft Frontpage  (and actually most other HTML editors) let you easily switch between the visual (WYSIWYG) editing and the underlying code by just clicking a tab at the bottom of the page:Code editing in Frontpage

And have you ever tried recording a macro in Microsoft Office Word or Excel? It is fantastic. I’ve used this functionality each time I could not find something I needed in the systems (e.g. reformatting  selected text to remove line breaks). You just click Tools/Macro/Record new macro and do the basic actions, then stop recording, make a few edits of the macro code, and add it as a new toolbar button in the UI. What a great and easy transition from UI to code and back!

PowerGUI is actually doing the same in the PowerShell world. And it shamelessly borrows the code tab concept which Frontpage uses so well:

PowerGUI tabs

Let’s have a quick  look at how it works. Suppose we want to see the permissions set on mailboxes of a certain group and we want to easily see which of them are inherited.

Sure enough we start by clicking the DLs node in the left-hand tree and click the distribution list we need:

Select the distribution list

Then click the Members link in the right-hand Actions pane to get the DL members:

Click the Members link

Now you see the list of members and you click the Permissions link:

Permissions for group members

Now we get the list of permissions and click the IsInherited column header to get them sorted by inheritance. Job done:

Permission list

Want to see what was actually going on behind the scene? Just click the PoweShell code tab:

The code behind the actions

Nice? Now  you can take the snippets and just use them to learn the PowerShell syntax, schedule their execution, or bring them back into the UI elements. The latter however would be a topic of another post.

0 Responses to “Command-line vs. UI”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




My Recent Tweets

Legal

The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

March 2007
M T W T F S S
    Apr »
 1234
567891011
12131415161718
19202122232425
262728293031  

%d bloggers like this: