Understanding Adapter Pattern Using .NET
page 9 of 15
by David Simmonds
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 53907/ 83

Namespace/Scope/Accessor issues

The adaptee should have a private relationship to the adapter, whether it is inherited or contained.  This is because we do not want a client reaching into the internals of the adapter and getting access to the raw, unconverted, untranslated, unadapted state.  Remember that before adaptation, the adaptee’s state is not fit for consumption.  Naturally, since the target’s interface is the interface which is acceptable to the client, then it is the one that is exposed and public.

This is similar to the behavior of a major corporation or political party’s P.R. department or spin-machine.  Things happen day by day in major organizations and it is preferable that the spin-doctors have a go at the material before releasing it to the press or general public.  The “unadorned truth” reflects the adaptee’s interface while the “palatable statements,” which can be released to the press, fits the target interface.  When everything is scoped up properly, the client becomes like the public which reads the press-release in the paper.  When we get the scoping wrong, however, the client becomes like the investigative reporter who has inside contacts and is able to dig mercilessly into the guts of the story and expose all the unpleasant stuff.


View Entire Article

User Comments

Title: its great explaination in detail about Adapter Pattern   
Name: Elan Emerging Technologies Pvt. Ltd
Date: 2010-01-18 7:05:35 AM
Comment:
its great explaination in detail about Adapter Pattern


Thanks,
Elan Emerging Technologies (EETPL)
http://www.elantechnologies.com
Title: Thanks   
Name: Rakesh
Date: 2008-12-08 2:59:28 PM
Comment:
Looking forward to read this article
Title: Very Understandable   
Name: Srilakshmi15
Date: 2008-05-11 7:19:36 AM
Comment:
Hi Simmonds
It's really good to understand without getting any confusion.
Thanks a lot.
Title: Not able to Download the Codes   
Name: Ritesh
Date: 2007-08-07 4:19:25 AM
Comment:
I am not able to download the codes of the above sample
Title: Great! Resouces.   
Name: .Net Developer
Date: 2007-05-14 1:56:04 AM
Comment:
It's Great Resouces for abt adapter pattern. I hope you will writing usefull .net articles in future.

Jim
http://www.tatvasoft.com
Title: its great explaination in detail abt adapter pattern   
Name: vamshi
Date: 2006-11-14 5:27:20 AM
Comment:
its great explaination in detail abt adapter pattern with a clear explanation -not found any where else. hope i will get other pattern too
Title: Adapter Explanation with real Time   
Name: Ranjith M
Date: 2006-11-03 4:03:56 AM
Comment:
Its realy cool.I went through lot of links i dont understand the pattern.The real time explanation is realy good one.Thanks a Lot.:)

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-29 2:10:40 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search