<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>.NET: General</title><link>http://blogs.clearscreen.com/migs/category/7.aspx</link><description>tips and tricks, bugs, how to's and every bit of knowledge I can expose about the .NET Framework, IDE, Add-ins, etc.</description><managingEditor>Miguel Jiménez</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Miguel Jiménez</dc:creator><title>Gadget Contest and some ideas to develop more gadgets</title><link>http://blogs.clearscreen.com/migs/archive/2007/03/09/6199.aspx</link><pubDate>Fri, 09 Mar 2007 13:19:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2007/03/09/6199.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/6199.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2007/03/09/6199.aspx#Feedback</comments><slash:comments>41</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/6199.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/6199.aspx</trackback:ping><description>&lt;p&gt;We still running the first gadget contest held in Spain, organized by the Madrid .NET User Group with the support of lot of companies and people. If you haven't checked it out yet go to &lt;a href="http://gadgetizate.madriddotnet.com"&gt;http://gadgetizate.madriddotnet.com&lt;/a&gt; &lt;/p&gt; &lt;p&gt;So, I think now it's the time to tell people about some of the ideas I have to develop some gadgets. This ideas were private and I planned to develop them by my own, but you know, I'm so busy I don't even have time to write them. So here they go, feel free to develop any of them and get a chance to visit Las Vegas:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;A download manager, integrated within Internet Explorer, that makes use of the BITS API integrated in XP and Windows Vista&lt;/li&gt; &lt;li&gt;A snow report gadget that informs you about the state of the slopes in your favourites ski resorts&lt;/li&gt; &lt;li&gt;A gadget that keeps a list of cool taglines that can be used in the MSN Messenger personal message. The gadget can include a set of mood states and change automatically the message depending on the mood you choose&lt;/li&gt; &lt;li&gt;A technorati monitor that keeps track of when your blog or blogs are linked in other places&lt;/li&gt; &lt;li&gt;A gadget that monitor you websites and tells you when any of your sites is down&lt;/li&gt; &lt;li&gt;A gadget that aggregates statistics from Alexa or your personal sites stats (via IIS logs, awstats, or any stats software) and keep a cool graph of how your sites behave&lt;/li&gt; &lt;li&gt;A Google AdSense monitor that keeps track of you earnings with google advertisment&lt;/li&gt; &lt;li&gt;A YouTube/SoapBox viewer, where you can put the code of the video and play it directly on a flyout window&lt;/li&gt; &lt;li&gt;A Last.fm Groups of the Week gadget that recomends you songs to listen and your personal TopList of bands.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;I have a couple more of them, but I keep them private :)&lt;/p&gt; &lt;p&gt;Hope you like this list and feel free to create any of them... just drop me a line in the readme or help of the gadget jiji&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/6199.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>We still running the first gadget contest held in Spain, organized by the Madrid .NET User Group with the support of lot of companies and people. If you haven't checked it out yet go to <a href="http://gadgetizate.madriddotnet.com">http://gadgetizate.madriddotnet.com</a> </p> <p>So, I think now it's the time to tell people about some of the ideas I have to develop some gadgets. This ideas were private and I planned to develop them by my own, but you know, I'm so busy I don't even have time to write them. So here they go, feel free to develop any of them and get a chance to visit Las Vegas:</p> <ul> <li>A download manager, integrated within Internet Explorer, that makes use of the BITS API integrated in XP and Windows Vista</li> <li>A snow report gadget that informs you about the state of the slopes in your favourites ski resorts</li> <li>A gadget that keeps a list of cool taglines that can be used in the MSN Messenger personal message. The gadget can include a set of mood states and change automatically the message depending on the mood you choose</li> <li>A technorati monitor that keeps track of when your blog or blogs are linked in other places</li> <li>A gadget that monitor you websites and tells you when any of your sites is down</li> <li>A gadget that aggregates statistics from Alexa or your personal sites stats (via IIS logs, awstats, or any stats software) and keep a cool graph of how your sites behave</li> <li>A Google AdSense monitor that keeps track of you earnings with google advertisment</li> <li>A YouTube/SoapBox viewer, where you can put the code of the video and play it directly on a flyout window</li> <li>A Last.fm Groups of the Week gadget that recomends you songs to listen and your personal TopList of bands.</li></ul> <p>I have a couple more of them, but I keep them private :)</p> <p>Hope you like this list and feel free to create any of them... just drop me a line in the readme or help of the gadget jiji</p><img src ="http://blogs.clearscreen.com/migs/aggbug/6199.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Gadgetizate! Travel with your Gadget to Las Vegas</title><link>http://blogs.clearscreen.com/migs/archive/2007/02/16/6075.aspx</link><pubDate>Fri, 16 Feb 2007 13:00:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2007/02/16/6075.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/6075.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2007/02/16/6075.aspx#Feedback</comments><slash:comments>60</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/6075.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/6075.aspx</trackback:ping><description>&lt;p&gt;We are actually holding a contest in the context of Madrid .NET User Group that can take you to Las Vegas with your Gadget for Windows Vista.&lt;/p&gt;
&lt;p&gt;The rules are easy. Build a gadget for Windows Vista Sidebar and submit it to the contest. Participation is open from 16th of February to 29th of March. And winners will be announced at Developer Days 2007 the 29th of March in Madrid, Spain. You can submit as many gadgets as you want to, but the only requisite is that you have to be living in Spain.&lt;/p&gt;
&lt;p&gt;We have a big first prize that consists of a travel to Las Vegas to attend Mix'07 and spend 5 days there with all the guys and influencers from EMEA. There will be a special flight from Microsoft departing from London, we'll take you there and you could spend 5 days with lot of the most interesting and smart guys over the world. This prize includes flight, lodging and event expenses; and I think there's is also included an helicopter trip over the Grand Canyon :-)&lt;/p&gt;
&lt;p&gt;The rest of the prizes are an Xbox 360, a smartphone, 30 development books in Spanish, 3 subscription to DotNetMania magazine and software licenses by JetBrains, RedGate and ComponentOne.&lt;/p&gt;
&lt;p&gt;To give the same chances to all of you (because the winners will be decided by the site visitors; they'll vote the best gadgets) the web is published with a big banner telling about the contest, and &lt;strong&gt;gadget submission and gallery will open next Monday&lt;/strong&gt;. So you have all the weekend to prepare your first gadget.&lt;/p&gt;
&lt;p&gt;Check it out at &lt;a href="http://gadgetizate.madriddotnet.com"&gt;http://gadgetizate.madriddotnet.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can redistribute this and the images as far as you want to. Spread the word.&lt;/p&gt;
&lt;p&gt;I would like to thank all the people that made this possible, people that provided the money and prizes we needed to run this contest: Scott Guthrie and Ray Winninger from &lt;strong&gt;MIX'07&lt;/strong&gt;; David Stennett from &lt;strong&gt;JetBrains&lt;/strong&gt;; Rachel Hawley from &lt;strong&gt;RedGate&lt;/strong&gt;; Catherine Geiger from &lt;strong&gt;ComponentOne&lt;/strong&gt;; Susana Krahe and Juan Miguel Asensio from &lt;strong&gt;Anaya Multimedia&lt;/strong&gt;; Paco Marín from &lt;strong&gt;DotNetMania&lt;/strong&gt;; Chema Alonso from &lt;strong&gt;Informática 64&lt;/strong&gt;; Agustín Rodriguez from &lt;strong&gt;&lt;a title="ilitia technologies" href="http://www.ilitia.com" target="_blank"&gt;ilitia technologies&lt;/a&gt;&lt;/strong&gt;; and Alfonso Rodriguez and David Carmona from &lt;strong&gt;MSDN Spain&lt;/strong&gt;. And of course, all the coordinators of Madrid .NET User Group for collaborating creating this: David Herraiz, Daniel de Andres and Jesús Jiménez. Thank you all, you made this possible: &lt;strong&gt;around 12.000 EUR in prizes!!!!!!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;img src="http://gadgetizate.madriddotnet.com/intro.jpg" /&gt;&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/6075.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>We are actually holding a contest in the context of Madrid .NET User Group that can take you to Las Vegas with your Gadget for Windows Vista.</p>
<p>The rules are easy. Build a gadget for Windows Vista Sidebar and submit it to the contest. Participation is open from 16th of February to 29th of March. And winners will be announced at Developer Days 2007 the 29th of March in Madrid, Spain. You can submit as many gadgets as you want to, but the only requisite is that you have to be living in Spain.</p>
<p>We have a big first prize that consists of a travel to Las Vegas to attend Mix'07 and spend 5 days there with all the guys and influencers from EMEA. There will be a special flight from Microsoft departing from London, we'll take you there and you could spend 5 days with lot of the most interesting and smart guys over the world. This prize includes flight, lodging and event expenses; and I think there's is also included an helicopter trip over the Grand Canyon :-)</p>
<p>The rest of the prizes are an Xbox 360, a smartphone, 30 development books in Spanish, 3 subscription to DotNetMania magazine and software licenses by JetBrains, RedGate and ComponentOne.</p>
<p>To give the same chances to all of you (because the winners will be decided by the site visitors; they'll vote the best gadgets) the web is published with a big banner telling about the contest, and <strong>gadget submission and gallery will open next Monday</strong>. So you have all the weekend to prepare your first gadget.</p>
<p>Check it out at <a href="http://gadgetizate.madriddotnet.com">http://gadgetizate.madriddotnet.com</a></p>
<p>You can redistribute this and the images as far as you want to. Spread the word.</p>
<p>I would like to thank all the people that made this possible, people that provided the money and prizes we needed to run this contest: Scott Guthrie and Ray Winninger from <strong>MIX'07</strong>; David Stennett from <strong>JetBrains</strong>; Rachel Hawley from <strong>RedGate</strong>; Catherine Geiger from <strong>ComponentOne</strong>; Susana Krahe and Juan Miguel Asensio from <strong>Anaya Multimedia</strong>; Paco Marín from <strong>DotNetMania</strong>; Chema Alonso from <strong>Informática 64</strong>; Agustín Rodriguez from <strong><a title="ilitia technologies" href="http://www.ilitia.com" target="_blank">ilitia technologies</a></strong>; and Alfonso Rodriguez and David Carmona from <strong>MSDN Spain</strong>. And of course, all the coordinators of Madrid .NET User Group for collaborating creating this: David Herraiz, Daniel de Andres and Jesús Jiménez. Thank you all, you made this possible: <strong>around 12.000 EUR in prizes!!!!!!</strong></p>
<p> </p>
<p><img src="http://gadgetizate.madriddotnet.com/intro.jpg" /></p><img src ="http://blogs.clearscreen.com/migs/aggbug/6075.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Speaking engagements for January 2007</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/28/5740.aspx</link><pubDate>Thu, 28 Dec 2006 14:30:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/28/5740.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5740.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/28/5740.aspx#Feedback</comments><slash:comments>29</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5740.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5740.aspx</trackback:ping><description>&lt;p&gt;Next year it's starting with a busy busy month. This is the list of the engagements I already have, if you are nearby any of the cities I'll be visiting don't hesitate and we can have some beers ;) I'm also interested in meeting people in Tenerife that are willing to join INETA and create a .NET User Group over there...&lt;/p&gt; &lt;p&gt;So actually this are the planned speaks:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;C# 3.0 Language Features // &lt;/strong&gt;&lt;strong&gt;Madrid .NET User Group, January, 18th 2007&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;Introducing Extension Methods, Query Languages, Lambda Expressions and all the upcoming C# 3.0 language features. Further details and registration at &lt;a href="http://www.madriddotnet.com"&gt;http://www.madriddotnet.com&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;C# 3.0 Language Features // .NET User Group Galicia, Coruña, January, 19th 2007&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;First meeting of .NET User Group Galicia, and I'll be there presenting Extension Methods, Query Languages, Lambda Expressions and all the upcoming C# 3.0 language features. Further details and registration at &lt;a href="http://www.nugg.es"&gt;http://www.nugg.es&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;LOVE Tour: Windows Workflow and Windows Communication Foundation // Tenerife, January, 23rd 2007&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;I keep collaborating with MSDN presenting .NET Framework 3.0 over major cities in Spain. This time I'll be in Tenerife (Canary Islands) presenting Windows Workflow and Windows Communication Foundation. Further details and registration at &lt;a title="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312578&amp;amp;Culture=es-ES" href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312578&amp;amp;Culture=es-ES"&gt;http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312578&amp;amp;Culture=es-ES&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;LOVE Tour: Windows Presentation Foundation // Málaga, January, 25th 2007&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;I keep collaborating with MSDN presenting .NET Framework 3.0 over major cities in Spain. This time I'll be in Málaga, directly from Tenerife, presenting user interface improvements with Windows Presentation Foundation. Further details and registration at &lt;a title="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312580&amp;amp;Culture=es-ES" href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312580&amp;amp;Culture=es-ES"&gt;http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312580&amp;amp;Culture=es-ES&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt; More to come for February.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5740.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>Next year it's starting with a busy busy month. This is the list of the engagements I already have, if you are nearby any of the cities I'll be visiting don't hesitate and we can have some beers ;) I'm also interested in meeting people in Tenerife that are willing to join INETA and create a .NET User Group over there...</p> <p>So actually this are the planned speaks:</p> <ul> <li><strong>C# 3.0 Language Features // </strong><strong>Madrid .NET User Group, January, 18th 2007</strong></li></ul> <blockquote> <p>Introducing Extension Methods, Query Languages, Lambda Expressions and all the upcoming C# 3.0 language features. Further details and registration at <a href="http://www.madriddotnet.com">http://www.madriddotnet.com</a> </p></blockquote> <ul> <li><strong>C# 3.0 Language Features // .NET User Group Galicia, Coruña, January, 19th 2007</strong></li></ul> <blockquote> <p><strong></strong>First meeting of .NET User Group Galicia, and I'll be there presenting Extension Methods, Query Languages, Lambda Expressions and all the upcoming C# 3.0 language features. Further details and registration at <a href="http://www.nugg.es">http://www.nugg.es</a> </p></blockquote> <ul> <li><strong>LOVE Tour: Windows Workflow and Windows Communication Foundation // Tenerife, January, 23rd 2007</strong></li></ul> <blockquote> <p>I keep collaborating with MSDN presenting .NET Framework 3.0 over major cities in Spain. This time I'll be in Tenerife (Canary Islands) presenting Windows Workflow and Windows Communication Foundation. Further details and registration at <a title="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312578&amp;Culture=es-ES" href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312578&amp;Culture=es-ES">http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312578&amp;Culture=es-ES</a></p></blockquote> <ul> <li><strong>LOVE Tour: Windows Presentation Foundation // Málaga, January, 25th 2007</strong></li></ul> <blockquote> <p><strong></strong>I keep collaborating with MSDN presenting .NET Framework 3.0 over major cities in Spain. This time I'll be in Málaga, directly from Tenerife, presenting user interface improvements with Windows Presentation Foundation. Further details and registration at <a title="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312580&amp;Culture=es-ES" href="http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312580&amp;Culture=es-ES">http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032312580&amp;Culture=es-ES</a></p></blockquote> <p> More to come for February.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/5740.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Visual Studio 2005 SP1 Update for Windows Vista</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/21/5616.aspx</link><pubDate>Thu, 21 Dec 2006 13:27:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/21/5616.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5616.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/21/5616.aspx#Feedback</comments><slash:comments>33</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5616.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5616.aspx</trackback:ping><description>&lt;p&gt;It's been finally released. Yesterday. So if you installed Visual Studio 2005 Service Pack 1 over your Windows Vista SO you can now get rid of that annoying popup that knocks every time the IDE is started. This patch tries to address some of the issues related to the use of Visual Studio 2005 in Windows Vista.&lt;/p&gt; &lt;p&gt;Go and download from &lt;a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=fb6bb56a-10b7-4c05-b81c-5863284503cf&amp;amp;DisplayLang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fb6bb56a-10b7-4c05-b81c-5863284503cf&amp;amp;DisplayLang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=fb6bb56a-10b7-4c05-b81c-5863284503cf&amp;amp;DisplayLang=en&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I've already downloaded and installed it. And to be honest, I'm pretty nervous to see what improvements and features had been included in Visual Studio 2005 and, most important, in Team Explorer, Team System and Team Foundation Server (all of them also touched by this service pack)&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5616.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>It's been finally released. Yesterday. So if you installed Visual Studio 2005 Service Pack 1 over your Windows Vista SO you can now get rid of that annoying popup that knocks every time the IDE is started. This patch tries to address some of the issues related to the use of Visual Studio 2005 in Windows Vista.</p> <p>Go and download from <a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=fb6bb56a-10b7-4c05-b81c-5863284503cf&amp;DisplayLang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=fb6bb56a-10b7-4c05-b81c-5863284503cf&amp;DisplayLang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=fb6bb56a-10b7-4c05-b81c-5863284503cf&amp;DisplayLang=en</a> </p> <p>I've already downloaded and installed it. And to be honest, I'm pretty nervous to see what improvements and features had been included in Visual Studio 2005 and, most important, in Team Explorer, Team System and Team Foundation Server (all of them also touched by this service pack)</p><img src ="http://blogs.clearscreen.com/migs/aggbug/5616.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Provider Pattern: A practical guide to decoupling .NET 2.0 applications</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/01/4781.aspx</link><pubDate>Fri, 01 Dec 2006 07:19:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/01/4781.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4781.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/01/4781.aspx#Feedback</comments><slash:comments>105</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4781.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4781.aspx</trackback:ping><description>&lt;p&gt;During the following post I'm going to explain a design pattern widely used during software development processes and how it fits into the .NET ecosystem. This pattern would probably fits into the structural patterns group and it's mainly used to decouple components, so abstractions and concrete implementations can vary independently.&lt;/p&gt;
&lt;p&gt;Using the provider pattern in .NET (and most object oriented languages) is pretty easy. We need the following artifacts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A provider definition, used as a contract that specifies what it should do 
&lt;/li&gt;&lt;li&gt;One or multiple provider implementations of the declared contract 
&lt;/li&gt;&lt;li&gt;A consumer willing to make use of the provider and it's implementations&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Imaging the following real life scenario: There is a basic definition of what a car should do (provider definition) and what is considered a car: it must have 4 wheels, an engine, steering wheel, etc.. in the market you are able to find lot of implementations following the actual definition of a car (implementations of the provider), and we, as consumers, can make use of the knowledge and methods defined in the provider contract to change the implementation we use without affecting our behavior (we are able to switch cars and use the common definition of it, as a car, to drive any of the implementations).&lt;/p&gt;
&lt;p&gt;So know, imagine it in the context of software development. We have an interface that defines a set of properties and methods that our provider must implement; we then have one or multiple implementations of that interface available; and of course, any consuming application can use the interface to switch between implementations without being affected. Have a look to the following diagram:&lt;/p&gt;
&lt;p&gt;&lt;img src="/migs/files/ProviderModel1.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;This is pretty awesome and practical when we are willing to create componentized and decoupled applications. We just use interfaces. This pattern has been widely used in the new ASP.NET 2.0 to create the application services provider infrastructure. For example, the MembershipProvider can be defined either as SqlMembershipProvider or as a custom OracleMembershipProvider; they both provide the same functionality but with different behavior (one uses SQL Server as repository while the other is using Oracle databases)&lt;/p&gt;
&lt;p&gt;This pattern itself, IMHO, can dramatically increase the quality of your architecture because of the modularity and simplicity it provides.&lt;/p&gt;
&lt;p&gt;One of the hidden treasures of .NET is the existence of a Provider Model Framework that allows you to create custom Providers for anything (not only extensions of ASP.NET Providers, but any kind of .NET application or service) &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using .NET Framework 2.0 Provider Model&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So let's start writting some code. To create a provider we first have to create a public abstract class that defines our contract. This class must implement the System.Configuration.ProviderBase abstract class and it should contain the definition of methods and properties used as the "contract" of our provider.&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:52fb5bef-1140-40d8-a455-411caba9dd11" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"&gt;&lt;div&gt;&lt;!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--&gt;&lt;span style="COLOR: #008080"&gt;1&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;abstract&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ImageProvider : ProviderBase
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;2&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;3&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;   &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;abstract&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; CanSaveImages { &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;get&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;; }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;4&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;   &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;abstract&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; Image GetImage(&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; id);
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;5&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;   &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;abstract&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; SaveImage(Image image);
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;6&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We then need to add the actual implementations of the provider. In this case, we are going to add an image provider for the file system and an extra one for SQL Server.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:9e9f7924-5c36-48fd-9d00-44a140fd29c8" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white"&gt;&lt;div&gt;&lt;!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--&gt;&lt;span style="COLOR: #008080"&gt; 1&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; FileSystemImageProvider : ImageProvider
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 2&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 3&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; CanSaveImages
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 4&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 5&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;get&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 6&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 7&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;            &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;; &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; As we allow to save images&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 8&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;        }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 9&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;10&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;11&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; Image GetImage(&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; id)
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;12&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;13&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; Some witty code to get the image from a folder in the FileSystem&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;14&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;15&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;16&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;17&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; SaveImage(System.Drawing.Image image)
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;18&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;19&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; Some witty code to save the image to a folder in the FileSystem&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;20&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;21&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;}
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;22&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;23&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;24&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; SqlImageProvider : ImageProvider
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;25&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;26&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; CanSaveImages
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;27&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;28&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;get&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;29&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;30&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;            &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;true&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;; &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; As we allow to save images&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;31&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;        }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;32&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;33&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;34&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; Image GetImage(&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; id)
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;35&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;36&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; Some witty code to get the image from a folder in the FileSystem&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;37&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;null&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;; ;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;38&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;39&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;40&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; SaveImage(System.Drawing.Image image)
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;41&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;42&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; Some witty code to save the image to a folder in the FileSystem&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;43&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;44&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And finally, we need to create the service that will use the ImageProvider. It's is coupled to the contract definition of our provider and not to it's implementations, so it knows what to ask for but no actually how or where will it be done. The service just initializes the provider using the LoadProvider() method (it should read the provider from the config file; have in mind that here it's hardcoded for instructional purposes and you only need to change the LoadProvider method to achieve that goal)&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:3a204809-402d-4298-b5b3-d3a1e6b395e0" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"&gt;&lt;div&gt;&lt;!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--&gt;&lt;span style="COLOR: #008080"&gt; 1&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ImageService
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 2&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 3&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;private&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ImageProvider _provider;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 4&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 5&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ImageProvider Provider
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 6&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 7&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;get&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 8&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 9&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;            &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; _provider;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;10&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;11&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;12&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;13&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ImageService()
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;14&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;15&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        LoadProvider();
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;16&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;17&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;18&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; LoadProvider()
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;19&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;20&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        ProviderSettings ps &lt;/span&gt;&lt;span style="COLOR: #000000"&gt;=&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;new&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ProviderSettings(&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;"&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;FileSystemImageProvider&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;"&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;, &lt;/span&gt;&lt;span style="COLOR: #000000"&gt;"&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;FileSystemImageProvider_Type_Assembly&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;"&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;);
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;21&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        _provider &lt;/span&gt;&lt;span style="COLOR: #000000"&gt;=&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ProvidersHelper.InstantiateProvider(ps, &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;(FileSystemImageProvider)) &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; ImageProvider;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;22&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;23&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;24&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; Image GetImage(&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; id)
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;25&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;26&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; _provider.GetImage(id);
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;27&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;28&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;29&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; SaveImage(Image image)
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;30&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    {
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;31&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;        _provider.SaveImage(image);
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;32&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;33&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The main caveat of using the .NET Provider Model is that you must reference the System.Web assembly in, probably, non-web projects. This is needed in order to access the ProvidersHelper class used to instantiate the provider collection. And it also forces the application to use the System.Configuration namespace and classes to read the provider configuration located in the web.config or app.config files. &lt;/p&gt;
&lt;p&gt;You'll have to deal with the types and assembly names where those types are defined to create the ProviderSettings instance needed by the ProvidersHelper.InstantiateProvider method. It's maybe not recommended to use all this "web" references in a desktop or service context; so there's a clean and elegant alternative for the OO purists :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The pure OO implementation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So, we need to get rid of the System.Web reference and make the provider pattern work without using the .NET Framework 2.0 model. The first thing we need to do is to refactor provider's abstract class to an interface (or leave it as a class, it's up to you, but remove the ProviderBase inheritance and any reference to the System.Configuration namespace) and change the concrete providers implementations to make them use the newly created interface. The class diagram should look similar to:&lt;/p&gt;
&lt;p&gt;&lt;img src="/migs/files/ProviderModel2.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;First, we should create the following code for the provider contract:&lt;/p&gt;
&lt;p&gt;&lt;font color="#ff0000"&gt;&lt;/font&gt;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:60686d22-92ef-4cc1-bd6f-e5a73d070dc8" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"&gt;&lt;div&gt;&lt;!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--&gt;&lt;span style="COLOR: #008080"&gt;1&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;interface&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; IImageProvider
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;2&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;3&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;bool&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; CanSaveImages { &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;get&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;; }
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;4&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    Image GetImage(&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;int&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; id);
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;5&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; SaveImage(Image image);
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;6&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And of course change the signature of the concrete provider implementations for FileSystemImageProvider and SqlImageProvider so they use the new contract:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:c3466cc5-db96-42b4-8b02-d86036b937e4" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"&gt;&lt;div&gt;&lt;!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--&gt;&lt;span style="COLOR: #008080"&gt; 1&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; FileSystemImageProvider : IImageProvider
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 2&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 3&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;   &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; Implementation of the provider code, only signature of the class changed&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 4&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;}
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 5&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 6&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 7&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; SqlSystemImageProvider : IImageProvider
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 8&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt; 9&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;   &lt;/span&gt;&lt;span style="COLOR: #008000"&gt;//&lt;/span&gt;&lt;span style="COLOR: #008000"&gt; Implementation of the provider code, only signature of the class changed&lt;/span&gt;&lt;span style="COLOR: #008000"&gt;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;10&lt;/span&gt; &lt;span style="COLOR: #008000"&gt;&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The ImageService still almost the same, we only need to change LoadProvider's code so it creates an instance of the desired concrete implementation without using the ProvidersHelper class. Something like this may work perfectly:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:d44ec1d0-586e-40e4-b657-bfd5caba0113" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;&lt;pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"&gt;&lt;div&gt;&lt;!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--&gt;&lt;span style="COLOR: #008080"&gt;1&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;void&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; LoadProvider()
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;2&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;{
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;3&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;    _provider &lt;/span&gt;&lt;span style="COLOR: #000000"&gt;=&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; Activator.CreateInstance(&lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;typeof&lt;/span&gt;&lt;span style="COLOR: #000000"&gt;(FileSystemImageProvider)) &lt;/span&gt;&lt;span style="COLOR: #0000ff"&gt;as&lt;/span&gt;&lt;span style="COLOR: #000000"&gt; IImageProvider;
&lt;/span&gt;&lt;span style="COLOR: #008080"&gt;4&lt;/span&gt; &lt;span style="COLOR: #000000"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Any conclusion?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the approach it's quite similar for both methods and it's really simple to introduce it in most of actual software projects and architectures. It provides ease of installation, highly decoupled systems and modularity both in development and deployment.&lt;/p&gt;
&lt;p&gt;There's no excuse to avoid this pattern, as far as it's possible and pragmatic to use it in the context of your architecture :) &lt;/p&gt;
&lt;p&gt;Hope this helps anyone.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4781.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>During the following post I'm going to explain a design pattern widely used during software development processes and how it fits into the .NET ecosystem. This pattern would probably fits into the structural patterns group and it's mainly used to decouple components, so abstractions and concrete implementations can vary independently.</p>
<p>Using the provider pattern in .NET (and most object oriented languages) is pretty easy. We need the following artifacts:</p>
<ul>
<li>A provider definition, used as a contract that specifies what it should do 
</li><li>One or multiple provider implementations of the declared contract 
</li><li>A consumer willing to make use of the provider and it's implementations</li></ul>
<p>Imaging the following real life scenario: There is a basic definition of what a car should do (provider definition) and what is considered a car: it must have 4 wheels, an engine, steering wheel, etc.. in the market you are able to find lot of implementations following the actual definition of a car (implementations of the provider), and we, as consumers, can make use of the knowledge and methods defined in the provider contract to change the implementation we use without affecting our behavior (we are able to switch cars and use the common definition of it, as a car, to drive any of the implementations).</p>
<p>So know, imagine it in the context of software development. We have an interface that defines a set of properties and methods that our provider must implement; we then have one or multiple implementations of that interface available; and of course, any consuming application can use the interface to switch between implementations without being affected. Have a look to the following diagram:</p>
<p><img src="/migs/files/ProviderModel1.jpg" /></p>
<p>This is pretty awesome and practical when we are willing to create componentized and decoupled applications. We just use interfaces. This pattern has been widely used in the new ASP.NET 2.0 to create the application services provider infrastructure. For example, the MembershipProvider can be defined either as SqlMembershipProvider or as a custom OracleMembershipProvider; they both provide the same functionality but with different behavior (one uses SQL Server as repository while the other is using Oracle databases)</p>
<p>This pattern itself, IMHO, can dramatically increase the quality of your architecture because of the modularity and simplicity it provides.</p>
<p>One of the hidden treasures of .NET is the existence of a Provider Model Framework that allows you to create custom Providers for anything (not only extensions of ASP.NET Providers, but any kind of .NET application or service) </p>
<p><strong></strong> </p>
<p><strong>Using .NET Framework 2.0 Provider Model</strong></p>
<p>So let's start writting some code. To create a provider we first have to create a public abstract class that defines our contract. This class must implement the System.Configuration.ProviderBase abstract class and it should contain the definition of methods and properties used as the "contract" of our provider.</p>
<div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:52fb5bef-1140-40d8-a455-411caba9dd11" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"><pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"><div><!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><span style="COLOR: #008080">1</span> <span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">abstract</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> ImageProvider : ProviderBase
</span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000">   </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">abstract</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000"> CanSaveImages { </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">; }
</span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">   </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">abstract</span><span style="COLOR: #000000"> Image GetImage(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id);
</span><span style="COLOR: #008080">5</span> <span style="COLOR: #000000">   </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">abstract</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> SaveImage(Image image);
</span><span style="COLOR: #008080">6</span> <span style="COLOR: #000000">}</span></div></pre></div>
<p>We then need to add the actual implementations of the provider. In this case, we are going to add an image provider for the file system and an extra one for SQL Server.</p>
<p></p>
<div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:9e9f7924-5c36-48fd-9d00-44a140fd29c8" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"><pre style="BACKGROUND-COLOR: white"><div><!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><span style="COLOR: #008080"> 1</span> <span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> FileSystemImageProvider : ImageProvider
</span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">override</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000"> CanSaveImages
</span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000">        </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">
</span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000">        {
</span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000">            </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">; </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> As we allow to save images</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">        }
</span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">override</span><span style="COLOR: #000000"> Image GetImage(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id)
</span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000">        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Some witty code to get the image from a folder in the FileSystem</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080">14</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">null</span><span style="COLOR: #000000">;
</span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">override</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> SaveImage(System.Drawing.Image image)
</span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000">        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Some witty code to save the image to a folder in the FileSystem</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080">20</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">21</span> <span style="COLOR: #000000">}
</span><span style="COLOR: #008080">22</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">23</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">24</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> SqlImageProvider : ImageProvider
</span><span style="COLOR: #008080">25</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080">26</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">override</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000"> CanSaveImages
</span><span style="COLOR: #008080">27</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">28</span> <span style="COLOR: #000000">        </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">
</span><span style="COLOR: #008080">29</span> <span style="COLOR: #000000">        {
</span><span style="COLOR: #008080">30</span> <span style="COLOR: #000000">            </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">; </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> As we allow to save images</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080">31</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">        }
</span><span style="COLOR: #008080">32</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">33</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">34</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">override</span><span style="COLOR: #000000"> Image GetImage(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id)
</span><span style="COLOR: #008080">35</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">36</span> <span style="COLOR: #000000">        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Some witty code to get the image from a folder in the FileSystem</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080">37</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">null</span><span style="COLOR: #000000">; ;
</span><span style="COLOR: #008080">38</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">39</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">40</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">override</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> SaveImage(System.Drawing.Image image)
</span><span style="COLOR: #008080">41</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">42</span> <span style="COLOR: #000000">        </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Some witty code to save the image to a folder in the FileSystem</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080">43</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">44</span> <span style="COLOR: #000000">}</span></div></pre></div>
<p></p>
<p>And finally, we need to create the service that will use the ImageProvider. It's is coupled to the contract definition of our provider and not to it's implementations, so it knows what to ask for but no actually how or where will it be done. The service just initializes the provider using the LoadProvider() method (it should read the provider from the config file; have in mind that here it's hardcoded for instructional purposes and you only need to change the LoadProvider method to achieve that goal)</p>
<div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:3a204809-402d-4298-b5b3-d3a1e6b395e0" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"><pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"><div><!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><span style="COLOR: #008080"> 1</span> <span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> ImageService
</span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000"> ImageProvider _provider;
</span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> ImageProvider Provider
</span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000">        </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">
</span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">        {
</span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000">            </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> _provider;
</span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000">        }
</span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> ImageService()
</span><span style="COLOR: #008080">14</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000">        LoadProvider();
</span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> LoadProvider()
</span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">20</span> <span style="COLOR: #000000">        ProviderSettings ps </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000"> ProviderSettings(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">FileSystemImageProvider</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">FileSystemImageProvider_Type_Assembly</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);
</span><span style="COLOR: #008080">21</span> <span style="COLOR: #000000">        _provider </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> ProvidersHelper.InstantiateProvider(ps, </span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(FileSystemImageProvider)) </span><span style="COLOR: #0000ff">as</span><span style="COLOR: #000000"> ImageProvider;
</span><span style="COLOR: #008080">22</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">23</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">24</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> Image GetImage(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id)
</span><span style="COLOR: #008080">25</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">26</span> <span style="COLOR: #000000">        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> _provider.GetImage(id);
</span><span style="COLOR: #008080">27</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">28</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080">29</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> SaveImage(Image image)
</span><span style="COLOR: #008080">30</span> <span style="COLOR: #000000">    {
</span><span style="COLOR: #008080">31</span> <span style="COLOR: #000000">        _provider.SaveImage(image);
</span><span style="COLOR: #008080">32</span> <span style="COLOR: #000000">    }
</span><span style="COLOR: #008080">33</span> <span style="COLOR: #000000">}</span></div></pre></div>
<p>The main caveat of using the .NET Provider Model is that you must reference the System.Web assembly in, probably, non-web projects. This is needed in order to access the ProvidersHelper class used to instantiate the provider collection. And it also forces the application to use the System.Configuration namespace and classes to read the provider configuration located in the web.config or app.config files. </p>
<p>You'll have to deal with the types and assembly names where those types are defined to create the ProviderSettings instance needed by the ProvidersHelper.InstantiateProvider method. It's maybe not recommended to use all this "web" references in a desktop or service context; so there's a clean and elegant alternative for the OO purists :)</p>
<p><strong></strong> </p>
<p><strong>The pure OO implementation</strong></p>
<p>So, we need to get rid of the System.Web reference and make the provider pattern work without using the .NET Framework 2.0 model. The first thing we need to do is to refactor provider's abstract class to an interface (or leave it as a class, it's up to you, but remove the ProviderBase inheritance and any reference to the System.Configuration namespace) and change the concrete providers implementations to make them use the newly created interface. The class diagram should look similar to:</p>
<p><img src="/migs/files/ProviderModel2.jpg" /></p>
<p>First, we should create the following code for the provider contract:</p>
<p><font color="#ff0000"></font></p>
<div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:60686d22-92ef-4cc1-bd6f-e5a73d070dc8" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"><pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"><div><!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><span style="COLOR: #008080">1</span> <span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">interface</span><span style="COLOR: #000000"> IImageProvider
</span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">bool</span><span style="COLOR: #000000"> CanSaveImages { </span><span style="COLOR: #0000ff">get</span><span style="COLOR: #000000">; }
</span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">    Image GetImage(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> id);
</span><span style="COLOR: #008080">5</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> SaveImage(Image image);
</span><span style="COLOR: #008080">6</span> <span style="COLOR: #000000">}</span></div></pre></div>
<p>And of course change the signature of the concrete provider implementations for FileSystemImageProvider and SqlImageProvider so they use the new contract:</p>
<p></p>
<div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:c3466cc5-db96-42b4-8b02-d86036b937e4" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"><pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"><div><!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><span style="COLOR: #008080"> 1</span> <span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> FileSystemImageProvider : IImageProvider
</span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000">   </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Implementation of the provider code, only signature of the class changed</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">}
</span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000">
</span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> SqlSystemImageProvider : IImageProvider
</span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000">   </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> Implementation of the provider code, only signature of the class changed</span><span style="COLOR: #008000">
</span><span style="COLOR: #008080">10</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">}</span></div></pre></div>
<p></p>
<p>The ImageService still almost the same, we only need to change LoadProvider's code so it creates an instance of the desired concrete implementation without using the ProvidersHelper class. Something like this may work perfectly:</p>
<p></p>
<div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:d44ec1d0-586e-40e4-b657-bfd5caba0113" contenteditable="false" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"><pre style="BACKGROUND-COLOR: white; WORD-WRAP: break-word"><div><!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><span style="COLOR: #008080">1</span> <span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">void</span><span style="COLOR: #000000"> LoadProvider()
</span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000">{
</span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000">    _provider </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> Activator.CreateInstance(</span><span style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(FileSystemImageProvider)) </span><span style="COLOR: #0000ff">as</span><span style="COLOR: #000000"> IImageProvider;
</span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">}</span></div></pre></div>
<p></p>
<p><strong>Any conclusion?</strong></p>
<p>As you can see, the approach it's quite similar for both methods and it's really simple to introduce it in most of actual software projects and architectures. It provides ease of installation, highly decoupled systems and modularity both in development and deployment.</p>
<p>There's no excuse to avoid this pattern, as far as it's possible and pragmatic to use it in the context of your architecture :) </p>
<p>Hope this helps anyone.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/4781.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>IDE Day: Common Editing Shortcuts</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/22/4365.aspx</link><pubDate>Wed, 22 Nov 2006 20:17:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/22/4365.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4365.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/22/4365.aspx#Feedback</comments><slash:comments>19</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4365.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4365.aspx</trackback:ping><description>&lt;p&gt;Some times, while coding in front of people the get amazed of the IDE shortcuts I use while write code. I also learn new shortcuts from people, so I'll try to compile some of them during the next weeks and write some post.&lt;/p&gt; &lt;p&gt;The first post of the series is about common shortcuts during code edition. If you are aware of any other shortcut during code editing, don't hesitate to comment it.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Comment Selected Code&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Ctrl + K, C&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Uncomment Selected Code&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Ctrl + K, U&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Format Document&lt;/strong&gt;, according to the settings specified in the formatting settings for C#&lt;/p&gt; &lt;p&gt;Ctrl + K, D&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Format Selected Code&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Ctrl + K, F&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Collapse to Definitions&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Ctrl + M, O&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Toggle All Outlining&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Ctrl + M, L&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Toggle Outlining Expansion&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Ctrl + M, M&lt;/p&gt;&lt;/blockquote&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4365.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>Some times, while coding in front of people the get amazed of the IDE shortcuts I use while write code. I also learn new shortcuts from people, so I'll try to compile some of them during the next weeks and write some post.</p> <p>The first post of the series is about common shortcuts during code edition. If you are aware of any other shortcut during code editing, don't hesitate to comment it.</p> <blockquote> <p><strong>Comment Selected Code</strong></p> <p>Ctrl + K, C</p> <p><strong>Uncomment Selected Code</strong></p> <p>Ctrl + K, U</p> <p><strong>Format Document</strong>, according to the settings specified in the formatting settings for C#</p> <p>Ctrl + K, D</p> <p><strong>Format Selected Code</strong></p> <p>Ctrl + K, F</p> <p><strong>Collapse to Definitions</strong></p> <p>Ctrl + M, O</p> <p><strong>Toggle All Outlining</strong></p> <p>Ctrl + M, L</p> <p><strong>Toggle Outlining Expansion</strong></p> <p>Ctrl + M, M</p></blockquote><img src ="http://blogs.clearscreen.com/migs/aggbug/4365.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>What am I reading...</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/21/4358.aspx</link><pubDate>Tue, 21 Nov 2006 19:37:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/21/4358.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4358.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/21/4358.aspx#Feedback</comments><slash:comments>23</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4358.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4358.aspx</trackback:ping><description>&lt;p&gt;In a recent conversation with &lt;a href="http://geeks.ms/blogs/rcorral" target="_blank"&gt;Rodrigo Corral&lt;/a&gt;, he asked me to publish what books am I reading now, because he is running out of book titles to read and this way we can use what others are reading as an inspirational light to choose new books.&lt;/p&gt;
&lt;p&gt;Firstly I want to state that I use a quite strange technique to read books where I have 3 active books in the pool and iterate them in terms of chapters. I explain this a bit: I read one chapter in book1 and then I switch to book2 to read a new complete chapter to continue a complete chapter in book3. This way, books are more readable to me, and make it more funny so I assimilate the new information better.&lt;/p&gt;
&lt;p&gt;Said this, this are the current books in my actual iteration:&lt;/p&gt;
&lt;div style="HEIGHT: 140px"&gt;
&lt;div style="PADDING-RIGHT: 16px; FLOAT: left"&gt;&lt;a href="http://www.amazon.com/gp/product/0596101325?ie=UTF8&amp;amp;tag=migueljimenez-20&amp;amp;link_code=as3&amp;amp;camp=211189&amp;amp;creative=373489&amp;amp;creativeASIN=0596101325" target="_new"&gt;&lt;img height="140" src="http://images.amazon.com/images/P/0596101325.01._AA_SCMZZZZZZZ_V36350536_.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 16px; FLOAT: left"&gt;&lt;a href="http://www.amazon.com/gp/product/0735621632?ie=UTF8&amp;amp;tag=migueljimenez-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0735621632"&gt;&lt;img height="140" src="http://images.amazon.com/images/P/0735621632.01._AA_SCMZZZZZZZ_.jpg" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="PADDING-RIGHT: 16px; FLOAT: left"&gt;&lt;a href="http://www.amazon.com/gp/product/0764556177?ie=UTF8&amp;amp;tag=migueljimenez-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0764556177"&gt;&lt;img height="140" src="http://images.amazon.com/images/P/0764556177.01._AA_SCMZZZZZZZ_.jpg" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4358.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>In a recent conversation with <a href="http://geeks.ms/blogs/rcorral" target="_blank">Rodrigo Corral</a>, he asked me to publish what books am I reading now, because he is running out of book titles to read and this way we can use what others are reading as an inspirational light to choose new books.</p>
<p>Firstly I want to state that I use a quite strange technique to read books where I have 3 active books in the pool and iterate them in terms of chapters. I explain this a bit: I read one chapter in book1 and then I switch to book2 to read a new complete chapter to continue a complete chapter in book3. This way, books are more readable to me, and make it more funny so I assimilate the new information better.</p>
<p>Said this, this are the current books in my actual iteration:</p>
<div style="HEIGHT: 140px">
<div style="PADDING-RIGHT: 16px; FLOAT: left"><a href="http://www.amazon.com/gp/product/0596101325?ie=UTF8&amp;tag=migueljimenez-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0596101325" target="_new"><img height="140" src="http://images.amazon.com/images/P/0596101325.01._AA_SCMZZZZZZZ_V36350536_.jpg" border="0" /></a></div>
<div style="PADDING-RIGHT: 16px; FLOAT: left"><a href="http://www.amazon.com/gp/product/0735621632?ie=UTF8&amp;tag=migueljimenez-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0735621632"><img height="140" src="http://images.amazon.com/images/P/0735621632.01._AA_SCMZZZZZZZ_.jpg" border="0" /></a></div>
<div style="PADDING-RIGHT: 16px; FLOAT: left"><a href="http://www.amazon.com/gp/product/0764556177?ie=UTF8&amp;tag=migueljimenez-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0764556177"><img height="140" src="http://images.amazon.com/images/P/0764556177.01._AA_SCMZZZZZZZ_.jpg" border="0" /></a> </div></div><img src ="http://blogs.clearscreen.com/migs/aggbug/4358.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Developers with Windows Vista</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/21/4339.aspx</link><pubDate>Tue, 21 Nov 2006 00:41:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/21/4339.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4339.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/21/4339.aspx#Feedback</comments><slash:comments>14</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4339.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4339.aspx</trackback:ping><description>&lt;p&gt;It's everywhere. Everybody with the RTM. Ones since last Friday and the others since a bit less, but everyone is talking about Vista, blah blah blah. With the addition of the new UAC features there are some things that are not working the right way for most of us, so there's a list with all the Know Issues of executing Visual Studio 2005 under Windows Vista:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div class="posthead"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa972193.aspx" target="_blank"&gt;Known Issues running Visual Studio 2005 with normal privileges under Vista&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/vstudio/aa964140.aspx" target="_blank"&gt;Known Issues running Visual Studio 2005 with elevated privileges under Vista&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;The most interesting thing about this lists is that there are workarounds for some of the items that can make out life a bit easier until we have a Service Pack to solve this "issues"&lt;/p&gt;
&lt;p&gt;The Microsoft advice, by now, execute Visual Studio 2005 with elevated Administrator privileges :-)&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4339.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>It's everywhere. Everybody with the RTM. Ones since last Friday and the others since a bit less, but everyone is talking about Vista, blah blah blah. With the addition of the new UAC features there are some things that are not working the right way for most of us, so there's a list with all the Know Issues of executing Visual Studio 2005 under Windows Vista:</p>
<ul>
<li>
<div class="posthead"><a href="http://msdn2.microsoft.com/en-us/vstudio/aa972193.aspx" target="_blank">Known Issues running Visual Studio 2005 with normal privileges under Vista</a> </div>
</li><li><a href="http://msdn2.microsoft.com/en-us/vstudio/aa964140.aspx" target="_blank">Known Issues running Visual Studio 2005 with elevated privileges under Vista</a></li></ul>
<p>The most interesting thing about this lists is that there are workarounds for some of the items that can make out life a bit easier until we have a Service Pack to solve this "issues"</p>
<p>The Microsoft advice, by now, execute Visual Studio 2005 with elevated Administrator privileges :-)</p><img src ="http://blogs.clearscreen.com/migs/aggbug/4339.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>Unit testing, adopting a practice by Roy Osherove</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/07/4170.aspx</link><pubDate>Tue, 07 Nov 2006 11:23:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/07/4170.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4170.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/07/4170.aspx#Feedback</comments><slash:comments>25</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4170.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4170.aspx</trackback:ping><description>&lt;p&gt;Yesterday I spent all the day in the preconference sessions at TechEd Developers 2006. I was going to attend Software Architecture sessions by Scott Hanselman, by I ended up at Agile Team System sessions by Roy Osherove.&lt;/p&gt;
&lt;p&gt;It's really interesting to see Royt explain Agile and Team System concepts, althought the were not very deep if you are experienced with agile methods and practices. We saw Agile concepts, TDD and Continuous Integrantion practices and finally how to apply Scrum with Team System.&lt;/p&gt;
&lt;p&gt;The most productive part to me was the Scrum session, and I got a really nice piece of intelligence from the Test Driven Development session. The name of test methods is really important because it's used directly as documentation, as a permanent sample of your code represented by unit tests. I already knew this, but the naming rules I used made me create names like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;public void CreateUserWithNullUserName&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And there's nothing wrong with that name, it's almost perfect from my point of view, because it states clearly what the unit test is testing. But Roy presented a naming rule based in three parts that results in a much much better name:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font face="courier new,courier"&gt;public void CreateUser_WhenUsernameIsNull_ThrowsInvalidOperationException&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Indredible!!! Much more pragmatic. Much more readable. Much simpler to see the behaviour of that unit test with the pattern MethodName_Behaviour_ExpectedResult.&lt;/p&gt;
&lt;p&gt;This has become an adopted practice. Inmediatly. During the next days I'll keep posting my thoughts about TechEd and sessions here.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4170.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>Yesterday I spent all the day in the preconference sessions at TechEd Developers 2006. I was going to attend Software Architecture sessions by Scott Hanselman, by I ended up at Agile Team System sessions by Roy Osherove.</p>
<p>It's really interesting to see Royt explain Agile and Team System concepts, althought the were not very deep if you are experienced with agile methods and practices. We saw Agile concepts, TDD and Continuous Integrantion practices and finally how to apply Scrum with Team System.</p>
<p>The most productive part to me was the Scrum session, and I got a really nice piece of intelligence from the Test Driven Development session. The name of test methods is really important because it's used directly as documentation, as a permanent sample of your code represented by unit tests. I already knew this, but the naming rules I used made me create names like this:</p>
<blockquote>
<p><font face="courier new,courier">public void CreateUserWithNullUserName</font></p></blockquote>
<p>And there's nothing wrong with that name, it's almost perfect from my point of view, because it states clearly what the unit test is testing. But Roy presented a naming rule based in three parts that results in a much much better name:</p>
<blockquote>
<p><font face="courier new,courier">public void CreateUser_WhenUsernameIsNull_ThrowsInvalidOperationException</font></p></blockquote>
<p>Indredible!!! Much more pragmatic. Much more readable. Much simpler to see the behaviour of that unit test with the pattern MethodName_Behaviour_ExpectedResult.</p>
<p>This has become an adopted practice. Inmediatly. During the next days I'll keep posting my thoughts about TechEd and sessions here.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/4170.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>What you always wanted to know...</title><link>http://blogs.clearscreen.com/migs/archive/2006/10/10/3798.aspx</link><pubDate>Tue, 10 Oct 2006 16:38:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/10/10/3798.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/3798.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/10/10/3798.aspx#Feedback</comments><slash:comments>21</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/3798.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/3798.aspx</trackback:ping><description>&lt;p&gt;&lt;/p&gt; &lt;p&gt;… about Madrid's CodeCamp, off course. Well, it's already more than official. It's so official that there are no more free room through the MSDN registration page. But there are many things that nobody asked yet, or maybe yes. In relation to more available seats, i will publish the reserved places for &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;langpair=es%7Cen&amp;amp;u=http://www.madriddotnet.com/"&gt;Mad.NUG&lt;/a&gt; during the next days in the group's website. &lt;/p&gt;&lt;p&gt;It seems that my session it's going to be the first one (so it doesn't happens like last year's when i finished around 2:00 a.m.) and I am going to speak about Microsoft Robotics Studio and &lt;a href="http://66.249.93.104/translate_c?hl=en&amp;amp;langpair=es%7Cen&amp;amp;u=http://mindstorms.lego.com/"&gt;Lego Mindstorms NXT&lt;/a&gt;. Everything seems normal, but… has anybody seen that there's a sub-session called &lt;strong&gt;Final Robots&lt;/strong&gt; as the last session of Sunday's track? &lt;/p&gt;&lt;p&gt;Well, it's pretty simple. Throughout the event we are going to hold a robotic war that it's going to be referred as Clone Wars. In order to be able to participate it is essential to take a laptop with a version of Visual Studio 2005 in order to compile the code of your robot. During my session I will provide an API to interact with a robot library I have created, and an interface that your robot must. Robots will be uploaded to an Intranet that we have prepared, and they will fight in all-against-all combat during the day. I don't know very clearly if I will provide a set of unit tests or a robot container to test your robot's code… Anyway, the development will be quite easy. The really funny thing will be the Sunday Finals. &lt;/p&gt;&lt;p&gt;Sunday, both finalists of the Clone Wars will fight, live in the stage, with two real robots and a really funny system to make it a bit more complex. The winner will go home with a wonderful Lego Mindstorms NXT kit (but it will be used because is the one used to create the robot for the final fight, but take I'm taking pretty care of it, really.. the second Lego kit used in the final fight is my very own one). &lt;/p&gt;&lt;p&gt;So if you wanna have a chance to participate in this war and win the prize, is much better if you bring something to compile your code and use a WiFi access point with you, we will only accept entries through the intranet interface. &lt;/p&gt;&lt;p&gt;If you have any questions, don't hesitate to comment this post. I hope you like the initiative.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/3798.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p></p> <p>… about Madrid's CodeCamp, off course. Well, it's already more than official. It's so official that there are no more free room through the MSDN registration page. But there are many things that nobody asked yet, or maybe yes. In relation to more available seats, i will publish the reserved places for <a href="http://66.249.93.104/translate_c?hl=en&amp;langpair=es%7Cen&amp;u=http://www.madriddotnet.com/">Mad.NUG</a> during the next days in the group's website. </p><p>It seems that my session it's going to be the first one (so it doesn't happens like last year's when i finished around 2:00 a.m.) and I am going to speak about Microsoft Robotics Studio and <a href="http://66.249.93.104/translate_c?hl=en&amp;langpair=es%7Cen&amp;u=http://mindstorms.lego.com/">Lego Mindstorms NXT</a>. Everything seems normal, but… has anybody seen that there's a sub-session called <strong>Final Robots</strong> as the last session of Sunday's track? </p><p>Well, it's pretty simple. Throughout the event we are going to hold a robotic war that it's going to be referred as Clone Wars. In order to be able to participate it is essential to take a laptop with a version of Visual Studio 2005 in order to compile the code of your robot. During my session I will provide an API to interact with a robot library I have created, and an interface that your robot must. Robots will be uploaded to an Intranet that we have prepared, and they will fight in all-against-all combat during the day. I don't know very clearly if I will provide a set of unit tests or a robot container to test your robot's code… Anyway, the development will be quite easy. The really funny thing will be the Sunday Finals. </p><p>Sunday, both finalists of the Clone Wars will fight, live in the stage, with two real robots and a really funny system to make it a bit more complex. The winner will go home with a wonderful Lego Mindstorms NXT kit (but it will be used because is the one used to create the robot for the final fight, but take I'm taking pretty care of it, really.. the second Lego kit used in the final fight is my very own one). </p><p>So if you wanna have a chance to participate in this war and win the prize, is much better if you bring something to compile your code and use a WiFi access point with you, we will only accept entries through the intranet interface. </p><p>If you have any questions, don't hesitate to comment this post. I hope you like the initiative.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/3798.aspx" width = "1" height = "1" /></body></item></channel></rss>