Abstraction: A Condom for Your Code

"Why should you put a 10 foot pole between yourself and technology?

Well, because Microsoft (or insert vendor of your choice here - they’re all equally guilty of this) tend to deprecate (as in kill) the technology they evangelised just last year/month/week.

Microsoft Sql Server Notification Services are the latest victim.

I hope you don’t have any application code tied to that technology." [1]

Here is yet another example of why you need proper abstraction. When designing your application's layers, expose as little of the implementation details as possible.

For example, if you are going to be using Windows Workflow Foundation to handle the workflows for a complicated system, that is fine... but try not to expose the workflow instance or activities directly to clients. If for some reason you need to ditch Workflow Foundation, you don't want to have to rewrite every component that utilizes workflow for it's operations. Instead of a method like this:

void ShipProduct(SequentialWorkflowActivity shipmentWorkflow);

Have a method like this:

void ShipProduct(IProductShipmentProvider shipmentProvider);

Behind the scenes, you might create a framework for handling these shipments using Windows Workflow Foundation, but keep the implementation details behind the scenes instead of exposing them to your callers. Then, not only are your clients protected, but your server code is protected as well. If at some point you decide that you really need to be using Biztalk for your workflow, you can start using Biztalk immediately for new implementations without rewriting all your current workflows first.

This also applies to communication with external systems. If you need to interact with an external system, provide a service that accepts data in a format that your system is familiar with, let the service implementation deal with mapping between your data structures and the external system's data structures. This way, you are free to roll out fixes to your communication or support for new systems without rolling out anything else.

[1] http://feeds.feedburner.com/UdiDahan-TheSoftwareSimplist

Published Wednesday, February 27, 2008 7:31 AM by Jesse Ezell

Comments

# re: Abstraction: A Condom for Your Code

Wednesday, February 27, 2008 7:19 PM by Bravo9

Agreed.  But, this really goes back to the standard principle of "coding to an abstraction, not an implementation".  I do like the colorful title though.

# re: Abstraction: A Condom for Your Code

Wednesday, February 27, 2008 8:19 PM by Joe Chung

This gives "leaky abstraction" a whole new meaning.

# Abstraction » Abstraction: A Condom for Your Code

Sunday, June 08, 2008 10:16 PM by Abstraction » Abstraction: A Condom for Your Code

Pingback from  Abstraction » Abstraction: A Condom for Your Code

# re: Abstraction: A Condom for Your Code

Wednesday, March 24, 2010 12:18 AM by wholesale Cell phone batteries

low priced mobile battery wholesale,Which do you like perfect? Mobile battery or mobile accessories?The wholesale selling price real very cheap!No Minimum quantity!Look here Earn High Profit Margin

<a href="www.kungfubattery.com/"> wholesale Mobile phone battery</a>

# TG Developer &raquo; .NET on the ???NET Feb 22-March 1: PreMIX Edition

Pingback from  TG Developer &raquo; .NET on the ???NET Feb 22-March 1: PreMIX Edition

# Promo 420sel 600sec, 420sel Headlight 1989 Mercedes Wiper Blade - 181.1fh.org

Pingback from  Promo 420sel 600sec, 420sel Headlight 1989 Mercedes Wiper Blade - 181.1fh.org

# Rx300 Floor Mat Lexus Lx470, 2000 Lexus Rx300 Repair Manual - 152.dlmreza.net

Pingback from  Rx300 Floor Mat Lexus Lx470, 2000 Lexus Rx300 Repair Manual - 152.dlmreza.net

# re: Abstraction: A Condom for Your Code

Monday, July 12, 2010 11:13 AM by high class escort service

It was certainly interesting for me to read that article. Thanx for it. I like such topics and anything connected to them. I would like to read a bit more on that site soon. By the way, rather good design you have here, but don’t you think it should be changed from time to time?

Kate Pingtown

# re: Abstraction: A Condom for Your Code

Thursday, July 22, 2010 2:54 PM by escort incall London

Truly nice blog to spend some time on reading it at least for me. By the way, why don't you send this article to social bookmarks? It may bring rather big traffic to this blog.

# re: Abstraction: A Condom for Your Code

Monday, July 26, 2010 6:23 PM by escorts latina

I would like to read more soon. By the way, rather good design you have at that site, but how about changing it every few months?

Adora Funweather

# re: Abstraction: A Condom for Your Code

Monday, August 02, 2010 6:53 PM by Jeff Stone

It is certainly interesting for me to read this post. Thanks for it. I like such themes and everything that is connected to this matter. I definitely want to read a bit more soon. By the way, rather nice design you have at this blog, but how about changing it from time to time?

Jeff Stone

<a href="http://www.baccaratgirls.com">girls London escort</a>

# re: Abstraction: A Condom for Your Code

Wednesday, September 01, 2010 12:13 PM by escort girl lugano

Don't stop posting such themes. I love to read blogs like that. By the way add more pics :)

# re: Abstraction: A Condom for Your Code

Tuesday, November 16, 2010 4:18 PM by Ride Snowboards

"Hrmm that was weird, my remark acquired eaten. Anyway I needed to say that it is awesome to find out that another particular person furthermore talked about this as I had bother discovering the identical information elsewhere. This was the first place that instructed me the reply. Many thanks."

--------------------------------------------

my website is  

http://kidsshirt.net

Also welcome you!

# re: Abstraction: A Condom for Your Code

Monday, December 20, 2010 6:51 AM by ipad accessories sale

Doubt is the key to knowledge.

-----------------------------------

# re: Abstraction: A Condom for Your Code

Monday, January 03, 2011 2:08 PM by ipad stand

-----------------------------------------------------------

My English communication isn't so super butI believe I realize every thing. Give thanks to u so a lot for that great weblog article. I genuinely enjoy reading it. I consider you  are a absolute writer. At this moment extra ur web page to my favorites and can come once more to yor world wide web sheet. Maintain up that wonder do the job. Hope to view  far more soon.

# re: Abstraction: A Condom for Your Code

Wednesday, February 23, 2011 5:31 PM by Sara Trider

It is certainly interesting for me to read this article. Thanks for it. I like such themes and anything connected to this matter. I would like to read more on that site soon.    

Sara  Trider    

<a href="www.latinescortlondon.com/">London spanish escort</a>

# re: Abstraction: A Condom for Your Code

Tuesday, March 08, 2011 2:21 AM by Bella Swenson

Pretty interesting blog you've got here. Thanx for it. I like such themes and everything connected to this matter. I would like to read a bit more on that blog soon.

Bella Swenson    

<a href="milanescorts.com/">independent escort milan</a>

# re: Abstraction: A Condom for Your Code

Tuesday, March 15, 2011 6:44 PM by Natasha Kripke

It was certainly interesting for me to read this article. Thanx for it. I like such themes and everything that is connected to them. I would like to read a bit more soon.        

Natasha  Kripke      

<a href="rome-escort.info/">100 euro escorts in rome</a>

# re: Abstraction: A Condom for Your Code

Wednesday, March 23, 2011 2:09 AM by Natasha Flouee

It was certainly interesting for me to read that article. Thanx for it. I like such topics and everything connected to this matter. I definitely want to read a bit more on that site soon.        

Natasha  Flouee        

<a href="www.phone-blocker.com/">disable cell phone</a>

# re: Abstraction: A Condom for Your Code

Thursday, April 14, 2011 5:08 PM by Brandy Stepman

It is certainly interesting for me to read this blog. Thanks for it. I like such themes and anything connected to them. I definitely want to read a bit more on this site soon.            

Brandy  Stepman          

<a href="www.baccaratgirls.com/">escorts woman</a>

# re: Abstraction: A Condom for Your Code

Sunday, April 24, 2011 3:51 AM by Jenny Watcerson

It was rather interesting for me to read the post. Thank author for it. I like such themes and anything connected to them. I definitely want to read a bit more soon.            

Jenny  Watcerson            

<a href="monacoescort.com/">escorts a monaco</a>

# re: Abstraction: A Condom for Your Code

Tuesday, July 05, 2011 8:26 PM by Sid Dehl

My brother suggested I could possibly like this internet site. He was entirely correct. This post truly produced my day. You are able to not imagine just just how much time I had spent for this info! Thanks!

Leave a Comment

(required) 
(required) 
(optional)
(required)