Blog

Using Third-Party Controls

Posted by:

Using Third-Party Controls

Third-party controls have their advantages and disadvantages.  They allow you to develop applications quickly because you can add functionality and save on development time, but they have their limitations.  Its these limitations that get people into trouble, because once you integrate a third-party control in your application, there always seems to be a point where you need to go beyond the functionality of the control and as a result, replace it.

When considering a third-party control, an open source control (or a control that you can purchase with the source code) is always better than a closed-source control.  I have had horrible experiences attempting to extend closed-source controls.  If you have the source code, you can always modify it to do what you want to do – if not, you’ll have to replace that control with another control, and that might not be an easy task.

While I think that creating the control yourself, if you have the time, is a much better solution, sometimes there are controls out there that are very feature rich and would take way to long to implement yourself.  In these scenarios, open-source or purchased-source options are a good way to go.

The one thing you must consider when integrating third-party controls into your application (whether they be open or closed source) is that you want to isolate that control so it can be easily replaced, if necessary.  For example, you could create a control library that wraps the third-party control.  I recommend wrapping the control class instead of extending the control class, making the control completely transparent to your code base.  While this is a bit more work, it allows you to easily replace the control with any other control simply by changing the wrapper.  If you extend the control (or worse, use the control directly within your own code), then you are creating a nightmare for yourself if you ever choose to replace that control with something else.

My advice: only use open-source controls or controls that you can purchase the source code for, and only if they are too diffcult or too time consuming for you to replace yourself.  And if you decide to use a third-party control, always wrap it with another control class so you can easily replace this control with another control in the future, should your needs change.

0


About the Author

If music be the food of love, play on. I'm passionate about technology, music, food and family. Technology, because it's a part of everything; music, because there is nothing like a perfect harmony; food, because I love to eat (and sip wine); and family, because life has no meaning without it. I'm a software and technology geek who works with an amazing group of people, plays the piano, loves to cook, and has an amazing wife and daughter with a son on the way.

Add a Comment