GAT/GAX – Creating a guidance package

14 06 2008

In this post we will start of with our Domain Driven Design Software Factory, the first step is obviously creating the package itself. But before we commence, I need to give some credits to my former colleague Jelle Druyts as this post is blatant plagiarism of his blog post from back in the year 2006 … but at least the pictures of this post are based on the 2008 edition of the Guidance Automation Toolkit.

To start of creating your own package, you can make use of a guidance package specifically designed for creating other guidance packages. That’s what I call eating your own dog food. So let’s generate the source for our package in a solution called Factory, which can be obtained in its current form from our codeplex team project.

guidancepackagepackage.jpg

The second part of this wizard allows you to set some package options like the package name, the namespace and some other information. Make sure not to include spaces in the package name as that will give issues later on.

guidancepackage-options.jpg

register-guidancepackage.jpgThe wizard will create us a solution with sample code for most of the elements that you can find in a guidance package, like bound and unbound recipes, templates, snippets, wizard pages and more… Besides all the sample code, there is also an installer and a setup package generated so that you can immediatly start of testing the package.  But before we can do this we need to register the guidance package. This can be done by right clicking the guidance package project and selecting “Register Guidance Package”.

In order to test your guidance package, you need to open a new instance of visual studio and navigate to the Guidance Packages section of the New Project window. As you will notice, the Domain Driven Design Software Factory has been added as a guidance package.

Note that registering the guidance package does take some time as all elements need to be reconfigured inside the visual studio environment. If you don’t have any new recipes or templates that need to be registered or if you didn’t change any HostData sections that define the integration with Visual Studio, you can get away with the “Quick Register” option which is remarkably faster.

Now let’s open a new instance of Visual Studio and lets create a sample solution and fill out the wizard.

samplesolution.jpg

samplesolutioncreated.jpgAnd as a result of our guidance packages code generation, we end up with a solution that we can use to test the sample structure, templates, bound and unbound recipes.

I suggest you take a look around the generated solution if you’re not acquainted with the guidance automation packages, otherwise you can delete it again as it has obviously nothing to do with Domain Driven Design.

Next time we will start shaping our factory so that it will enforce the default Domain Driven Design layering, which has already been discussed in the Setting the scene column.

See you next time,
Yves Goeleven


Actions

Information

Leave a comment