PowerTools 2.2 Code Design and Organization

Eric and I made a number of significant design and organizational changes to PowerTools. This video briefly goes through the technical details of those changes. It will be most useful for people familiar with C# development. It also helps if you know something about cmdlet development in PowerShell, but should be useful for those who want to know how to incorporate the PowerTools functionality into their own C# programs without using PowerShell. In any case, I will be expanding on all of these ideas in future videos.

We have made a number of changes to PowerTools, but I think there are two that are most significant. First, we have completely separated the cmdlet code from the code that operates on documents. That means that if there is a cmdlet that does something that you want to incorporate into your own application, you can now lift that code out of the PowerTools and use it directly in your own project. Alternatively, you can take that code as a starting point for your own needs. In this new version, you will no longer need to modify the code to remove PowerShell/cmdlet code. Second, we have change the method for reading, writing and manipulating OpenXML documents. In version 1, we were using a variety of techniques to manage the opening and closing of document files through the Open XML SDK. The new version eliminates a lot of complexity by treating all documents as objects that are fully in memory, though they also carry a reference to the original file name. This has been encapsulated into a series of classes for each of the document types. I will be creating more videos that address these two topics in more depth, but for now, here is the overview.