Skip to content

dmihailescu/designpatterns

Repository files navigation

<script type='text/javascript'> function _dmBootstrap(file) { var _dma = document.createElement('script'); _dma.type = 'text/javascript'; _dma.async = true; _dma.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + file; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(_dma); } function _dmFollowup(file) { if (typeof DMAds === 'undefined') _dmBootstrap('cdn2.DeveloperMedia.com/a.min.js'); } (function () { _dmBootstrap('cdn1.DeveloperMedia.com/a.min.js'); setTimeout(_dmFollowup, 2000); })(); </script>

Visual Studio add-in/extension that generates code based on OO design patterns

This is a Visual Studio add-in/extension (for VS 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.

Project Description
This add-in 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.

wizard


Quick guide about how to use this add-in

At a minimum, download the zipped version that matches your version of Visual Studio.
You can download multiple versions if you have multiple versions of the IDE.

It's best to close Visual Studio before the installation.
Download the archive, unzip it, and look for the the folder(s) corresponding to
the same Visual Studio version(s) you are using.

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 for add-ins.
For the extensions in VS 2015 or 2017 you can uninstall it by navigating to the 'Tools'\'Extensions and updates..' menu.

I have tested 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...

mnuContext

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:

config.png

If the bottom grid was too cluttered, 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.

LangProviders.png

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:

config

The online search menu will show up as a Right-click in the relevant windows.

context menu


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 and 2015).
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, or on the Visual Studio Gallery site.

More information about extending the add-in can be found on codeproject.

You can help this project by donating to the developer using PayPal,  indirectly by supporting
the advertisers on this page, or better yet, by purchasing a license when the trial expires.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published