Don’t be a Fool Wrap Your Tool!

February 20, 2013 — 1 Comment

The Windows Azure APIs came a long way since they were originally released. On a few occasions, the new versions weren’t very backwards compatible. During those moments, people who use the APIs directly in their code had a tough decision to make.

Do we rewrite the code or stay with older APIs?

That’s a tough place to be! This is why my message is so important, don’t be a fool, wrap your tool!

Creating adapters or facades for external dependencies is practice that should be a natural reflex.

realworld

There are times when it can be difficult to fully isolate dependencies, because its not always as simple as it sounds. When this situation comes up, design patterns can be used to guide and inspire our work. Keeping the bits of code that you do not control isolated will save your company a lot of money. Every time a new update comes out, which by the way is almost every 3 to 4 months, your company is going to ask itself the same question.

Do we take the risk of updating?

Updating Windows Azure APIs shouldn’t produce these kinds of questions. In the end, updates should be beneficial. Because if they weren’t, there wouldn’t be much of reason for a newer version to exist in the first place.

Waiting for the next version, is essentially delaying the inevitable moment where APIs get deprecated. When a new updated version comes a long, the update process can be simplified by having to modify a wrapper instead of your entire codebase.

Another options is to create components hidden behind interfaces, which can be swapped out without affecting the interface consumers.

Component-based-Software-Engineering-example2

Working with Windows Azure Queue Storage Service can be repetitive, so I created the QueueWorker. This component can be hidden behind an interface. If the Windows Azure team breaks the API used to communicate with the Queue Storage Service, the modifications to my code will be concentrated within this component and not throughout my application.

Is your codebase safe from breaking changes from the Windows Azure APIs?

 

References

Trackbacks and Pingbacks:

  1. MSDN Blogs - March 12, 2013

    […] Don’t be a Fool Wrap Your Tool! by Alexandre Brisebois The Windows Azure APIs came a long way since they were originally released. On a few occasions, the new versions weren’t very backwards compatible. During those moments, people who use the APIs directly in their code had a tough decision to make. Do we rewrite the code or stay with older APIs? […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.