I'm Keyvan Nayyeri, a 25 years old Ph.D. student at
the Computer Science department of
the University of Texas at San Antonio.
I'm also
a Software Architect and Developer and previously held a B.Sc.
degree in Applied Mathematics.
This is my blog where I publish content about various topics specifically Programming Languages and Compilers, Software
Engineering and Programming.
Recently I started a new blog post series on Visual Studio Extensibility and two major options available in this technology known as add-in and Visual Studio integration package. So far I’ve written four parts covering the following topics:
Here in the fifth part I want to discuss one of the ultimate goals of my post series about choosing between add-in and integration package based on requirements.
One of the main things that I want to help you learn is choosing between add-ins and VSPackages when appropriate.
This, of course, requires you to have experience and knowledge. These are two extensibility points that help you a lot. More experience with add-ins and VSPackages and seeing more implementations and their applications as well as having a deeper knowledge in these two extensibility options can help you choose between them.
But there are some theoretical points that I can share with you to give you a good understanding and start point.
I first outline four questions that you can ask yourself before choosing between these options:
Good and clear answers to these questions can help you so much. Let’s dive deeper into these questions.
Which features do I need to implement for the project?
There are obviously some features that you want to include in your project. These features lead you to some requirements such the necessity of some APIs that will be covered in the next sections.
But first you need to have a complete list of features to include in your project. Sometimes you may require some features that can be implemented as a VSPackage only, and sometimes you may have features that can be implemented with add-ins and VSPackages both.
What are the APIs that I need to implement for this project?
Based on the first question, you can decide on which APIs do you need to implement for the project?
Some features can be implemented both with add-ins and VSPackages while some features can be implemented only with VSPackages. For instance, having the capability of copying the source code of a file from the IDE to clipboard with code highlighting can be achieved with add-ins and VSPackages (of course, add-ins are the best option in this case) because all you need is accessing to DTE APIs that are available in add-ins and VSPackages.
But in the opposite direction you may need to implement a custom designer for yourself like a designer to build user interfaces with SVG (Scalable Vector Graphic). In this case, add-ins can’t help you and you can only work with VSPackages.
Here there would be a question in your mind: what are the API limitations of add-ins and VSPackages? The answer is wider than something that can be covered in documents and relies on experience and knowledge. But in general, add-ins are heavily relied on some APIs that may not allow you to do much things in some circumstances. Of course, VSPackages have limitations, too, but limitations of VSPackages are really ignorable and we can say that there is almost no limitation for VSPackage. If there is any limitation for VSPackages then somehow you can ignore your project because there wouldn’t be any other way to achieve it. However, there is an online list of features available in Visual Studio integrated package that you can read to decide.
At this point you may find your answer because if you can’t implement your project as an add-in then you have no choice but VSPackage whether you can put this effort and time for the project or not!
How much of effort can I put into this project?
If you’re here then it means that you’re able to implement your project both as an add-in and as a VSPackage so decision has become a little harder. This rarely happens because 80% of times there is a clear difference based on your requirements that give you the answer in first two steps, but here you can ask yourself about the effort that you can put into the project.
VSPackages are harder to design, develop, deploy and maintain and you have to keep this in mind.
An add-in implementation costs less and takes less effort while a VSPackage implementation costs more and takes more effort. You have some limitations here so can prefer add-ins.
What’s my expectation of the depth of integration for this project?
And the last question: the level of integration! You may have passed all above questions to reach here. Here you can decide based on your expectation of the depth of integration. If you want a completely integrated extension, then Visual Studio integration package is much better than add-in.
Dew Drop – September 14, 2009 | Alvin Ashcraft's Morning Dew
Sep 14, 2009 9:00 AM
#
Pingback from Dew Drop – September 14, 2009 | Alvin Ashcraft's Morning Dew
David Thomas Garcia
Sep 14, 2009 1:05 PM
#
Your RSS feed is broken, goes to a DNS error. Also, the contact form said that "something went wrong" hence the comment to inform you.
Keyvan Nayyeri
Sep 14, 2009 1:22 PM
#
@David
Thank you very much for informing me. I checked the RSS feed and there wasn't any issue. I had a minor change in DNS settings, so it may take you a short while to update your local cache database.
As of the contact form. I'm working on it.
Visual Studio Add-In vs. Integration Package - Part 5 - Keyvan Nayyeri
Sep 14, 2009 5:50 PM
#
Thank you for submitting this cool story - Trackback from DotNetShoutout
rebwar
Sep 19, 2009 6:06 AM
#
Hey Keyvan,
Nice Series.
Mostafa Moghaddam
Sep 19, 2009 8:13 AM
#
I love your slogan keyvan!
Simplicity :)
Keyvan Nayyeri
Oct 09, 2009 11:51 AM
#
Leave a Comment