Visual Studio add-in/extension that generates code based on OO design patterns
This is a Visual Studio add-in for VS 2008,2010, 2012 & 2013 and a VS extension for VS 2012,2013,2015 and 2017
that indexes some commonly known OO patterns,
presents them in easy to search user interface and inserts the code into your working project.
It provides you with parameters to further customize the patterns and
It works for languages supported by Visual Studio like C#, VB.net, C++ flavors, F# etc.
For the add-ins and extensions required by the VS versions prior to 2015 2017 you can download them from codeplex, but for VS 2012, 2013, 2015 and 2017 just hit the above Download button.
Project Description
This extension/add-in/extension has a specific version for each version of Visual Studio starting with 2008 and
it requires Net 3.5 Service Pack1 or higher to run.
The express versions of Visual Studio are unable to use this add in, but the premium or community editions could.
Quick guide about how to use this add-in
For VS 2012,2013,2015 and 2017 go to the "Tools\Extensions and Updates.." menu, click on the "Online" tab and serach marketplace for 'design patterns'. Click 'the 'Download' button on the extension in the serach results box.
For Visual studio 2008-2010, download the zipped installation, unzip it, run the install.bat and select the version that matches your targeted version of Visual Studio.
It's best to close Visual Studio before the installation.
You can install multiple versions if you have multiple versions of the IDE. An unistall link for its
respective version should show up under the
Start\DesignPattern\Uninstall Design Patterns for 20XX Windows windows startup menu.
I have testested it only on Windows XP 32 bit and Windows 7 64 bit so far.
Usage
Open an existing project in Visual Studio.
Right click on the working project and select Add DesignPatterns...
You can narrow down to the pattern you need by filtering the patterns using the combo boxes
on the top right of the form. You can also reorder by clicking on the column headers of the grid
on the bottom.
Select one pattern and click Next.
On this screen you can change the values of some parameters should you needed it (defaults are
valid, you can always refactor them later in the IDE).
Select Next again and you have a chance to see how the code will look like.
You can go back by clicking on the Previous button, or select Generate to insert the code files
into the current Visual Studio project.
Beside the context menu, this add-in can be invoked from other places in Visual Studio
You can choose where to access it from by invoking the Configuration form:
If the bottom grid was too clutered, you can also hide the columns you are not interested
in from the same form.
If some languages are of no interest to you, you can remove their respective provider by unchecking it from the configuration tab.
Starting with version 1.94, an extra assembly is included on trial basis for the rest of the gang of four design patterns. Its premium providers can be excluded at installation time or in the runtime configuration.
An online tutorial is available on youtube.
The configuration also allows for customizing the Online Search Menus in the checkboxes grid:
The online search menu will show up as a Right-click in the relevant windows.
Or click here to launch youtube in this window.
Developer Notes
So far the source code and the build scripts are provided for Visual Studio 2008, 2010, 2012, 2013 2015 and 2017).
You can build all the versions by starting buildAll.bat from the Misc folder.
The templates for patterns are available in the TemplateLibrary.zip from any of the
C:\Program Files (x86)\Software Fantasies\DesignPatterns for VS 200XX folders after installation.
You should unzip it in the ..\DesignPatterns\Misc folder if you want to work on the templates.
Should you want to get involved with this project, (code or templates for other patterns or languages)
don't hesitate to contact me on the current Discussion page.
More information about extending the add-in can be found on codeproject.
If you like it, you can help this project by by purchasing a license when the trial expires.