Sunday, January 03, 2010

Powershell 2.0 is considered to be part of the "Windows Manangement Framework" and has a download page. Powershell 2.0, WinRM(remoting service), and BITS 4(Background Intelligent Transfer Service) makeup this management framework. Powershell 2.0 was shipped with Windows 7 and Server 2008 R2, and was made available for Windows XP SP3 and Vista SP1. Version 2 is completely compatible with version 1 - so any scripts written with version 1 will work in version 2.

On Dec 22, 2009 a new Powershell 2.0 SDK was put out for dowload by Microsoft.

There are two videos from the Micrsoft PDC2009 - SVR12 and SVR13 that show writing a simple GUI using the powershell API. During these videos it is mentioned that the powershell ISE (Integrated Scripting Environment) was developed with this same API.

There are Microsoft examples on how to host powershell within an application- which is what a developer would do to utilize powershell within their own application. This is the direction that Microsoft has started with their enterprise level tools. Now developers can embed powershell so that you can develop functionality as a cmdlet/script and the exercise that functionality from the GUI (Silverlight,Web,Windforms, or WPF).

The first hurdle in hosting powershell is getting a reference to it. System.Management.Automation does not show up in the .Net list of items. Browse to
C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\
and there you find the System.Management.Automation.dll. Verify that your reference works. If you can enter the code line below in the project and Intellisense works (the create method is visible) - you have the right version of the DLL in place.

PowerShell ps = PowerShell.Create();
(Note the example line of code is from a Microsoft example.)

The Microsoft links on how to host powershell have a good number of starting projects to show the usage of some parts of the API. The examples there are only Console examples. The Code posted on the Powershell blog for the SVR12/13 did use GUI's, however I did not appreciate these exampels as much - as it added a few users onto my machine for showing the security aspects that they used in the demo. The examples are a start, however it will take more for work to get a command of using the full power of the Powershell 2.0 SDK.

Powershell SDK can also execute powershell commands on remote machines using the WinRM functionality - if the remote machine allows the execution and the credentials of the user attempting are authorized. This remote execution allows for collecting information from remote machines back to one location for reporting/processing.

The Microsoft PDC 2009 presentations were targeting development using powershell API toward the Admin community, and controlling what access a given a user - programatically controlling this based on security roles.

With functionality being stored completely in PowerShell cmdlets/scripts, the practice forces a complete seperation of Logic and Presentation - which simplifies testing. Reworking the presentation layer is also greatly simplified. The PDC2009 videos described how the Exchange 2007 team wrote their first GUI in 10 months,as they developed their powershell cmdlets- when they were asked to reskin their GUI; it took only two weeks - the Exchange team was euphoric with that result. They did not have to put everything in the GUI, as the more advanced, or special case scenarios, could be handled by a powershell cmdlet only - thereby reducing clutter in the GUI and overall simplified maintenance.

Sunday, January 03, 2010 11:04:36 AM (Eastern Standard Time, UTC-05:00)
 Thursday, September 10, 2009

I have been wanting to research the idea of using those multiple processors that are now appearing on laptops and desktops. Today I stumbled upon a channel 9 show with Joe Duffy and Eric Meijer. The ease with which these two covered the topic and with such clarity was awesome. If you have an hour to dig into the complexity of concurrency and Software Transactional Memory, and roots of Haskel injecting its principals into to these ideas - give this a try.

Thursday, September 10, 2009 9:24:37 PM (Eastern Standard Time, UTC-05:00)
 Sunday, June 28, 2009

Codestock 2009 wrapped up last night.The event was oversold by 1 - 376 attendees. I enjoyed the selection of talks that were available, and the sessions I attended were good. Of course I had a favorite.

My Favorite session was delivered Rik Robinson of Wintellect. His talk was on PRISM, from the Microsoft Patterns and Practice group (PNP), this is a Guidance that can be used in WPF and Silverlight - and incorporates the Unity IOC framework (but that can be swapped out if you prefer). He kept it simple, he introduced one thing built on another, and he got the main concepts of how PRISM can be used to develop applications that decouple View and ViewModel in a very clean fasion. The session was very interactive and it must have been a bit of pressure to have the Wintellect CEO sitting in the session.

Through another acquaintance I got to have dinner with Rik that night(day of his presentation), and hooked up with him for yet another dinner after the last Codestock session before driving back (we did not attend the giveaways).

Wintellect is local to Knoxville, and is one of the supporters of Codestock. They arranged to have to other presentations besides Rik Robinson's. John Robbins and Jeffrey Richter gave presentations via live meeting - and took questions via cell phone (which you would hear in the room as an echo - but it worked). I attended the John Robbins debugging presentation and it too was excellent (he can make technology humourous) - I picked another session instead of the Jeffrey Richter session - if they recorded it I am going to go watch it.

I feel a bit responsible for a comment from another attendee about one session I attended. The session just seemed like there were more examples that were ready - but not shown - and the session ended earlier than the time slot. I overheard someone else make that comment about it - and it seemed to fit. I had been fine with how it was -and only when I heard the comment did it occur to me that not all of the examples had been touched on. I had sat down to lunch with this speaker before his presentation. It occurred to me that I may have impacted his preparation, and even the thought that I did impact his presentation makes me feel sorry for having disturbed his preparation. I felt it was still a good presentation. I heard how much Rik Robinson prepared and saw the result - it is a lot of work - and it makes me wonder if my trying to be social - was just at the wrong time (My apologies to the speaker)

There were several topic areas of interest for me during codestock. WPF,PRISM, MEF, Debugging, WCF, ORM usage, and TDD. There were sessions that touched on, or spoke to these - and much more.

Another acquaintance suggested I attend Kevin Hazzard's session on "How I learned to love Metaprogramming" - which was a very good look into the way that the compiler creates a dynamic data type in .Net 4.0. The data type of dynamic - is static. That statement seems at first to be an oxymoron - but the element is treated as static and how it resolves at runtime is dynamic. The presentation showed how C# and Python could interact - and gave some examples of dynamically wrapping elements of XML using C# using the Dynamic elements. His XML Example reminded me of something that Powershell can do today - and Kevin said that the powershell team did not go down the Dynamic Language path - which he was not pleased with. Kevin Hazzard is a very good speaker and he gets into the topic very deeply - and explains it well. I would like to hear more about his perceptions on Powershell, and how he thinks it might have been done.

There was one connection that I did not expect to occur. At the CodeStock social event, I was sitting at a table, and a fellow walked over and looked at me and said - I think I know you. After a moment or two - I recogognized him from a twitter photo. When I went to Devlink 2008 - I was trying to use Twitter to find out where people were meeting up, and I had been on twitter for maybe a month at that time. This fellow was not able to attend the DevLink event - but was trying to follow what was going on - and he responded to help me figure out where people would be. Between this fellow and "TheCodeCampJunkie" - I was able to hook up with people at DevLink. So here was my first time meeting a person face to face - based on using twitter. We talked about .Net and his getting certified and how it was not helping him get work.

The main focus of these event is the dissemenation of knowledge of what is new and how to use the technology we deal with. The other part of this is that you are meeting and speaking with other developers, whom you may have not ever met otherwise.

Several people have posted pictures from CodeStock - Alan Barber got one picture of me at the Dinner on the night before the event.

Sunday, June 28, 2009 7:37:48 AM (Eastern Standard Time, UTC-05:00)
 Sunday, June 21, 2009

On Channel 9 Hansleman interviews Jeremy Miller

Sunday, June 21, 2009 8:35:06 PM (Eastern Standard Time, UTC-05:00)
 Sunday, April 19, 2009

In the DotNetRocks podcast with Aslan Kahn, I figured I should go look at the mans blog. On there I found mention of a tool, that I had not heard of - Cucumber. The next week, I attended a meeting of the Atlanta ALT.NET group and the presentation on FluentNhibernate - also showed an example of Cucubmer. A very english looking business description to write out test cases.

Aslan Kahn gave a presentation at the SPIN meeting in South Africa and he mentioned that the Cucubmer site starting get a whole lot of activity.

I went out and found where you can find Cucumber.

There is a book to be released this year "The RSpec Book: Behaviour Driven Development with RSpec, Cucumber, and Friends" - from Pragmatic Press (The Pragamatic Programmer is something you should read if you have not).

Cucumber has a Ruby background to it - check out the website to get more info.

I did find an article about Cucumber with a focus on how it can be used in the development process.

Sunday, April 19, 2009 9:08:53 PM (Eastern Standard Time, UTC-05:00)