<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>.NExT Generation</title><link>http://blogs.clearscreen.com/migs/category/14.aspx</link><description>everything about the next generation of tools and systems that are coming: longhorm, yukon, whidbey and so on</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>133</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>Using Expression Design and some .NET 3.0 training</title><link>http://blogs.clearscreen.com/migs/archive/2007/01/17/5976.aspx</link><pubDate>Wed, 17 Jan 2007 01:02:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2007/01/17/5976.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/5976.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2007/01/17/5976.aspx#Feedback</comments><slash:comments>1038</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/5976.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/5976.aspx</trackback:ping><description>&lt;p&gt;I've been up preparing &lt;a href="http://blogs.clearscreen.com/migs/files/Ilitia_Formacion_2007.pdf" target="_blank"&gt;the catalog of training courses for this year at Ilitia&lt;/a&gt;. I had to prepare a small A4 flyer to show up in events and clients, and I decided to give Microsoft Expression Design a try. Thus, I had to download and install it on my Vista laptop. Everything went fine.&lt;/p&gt; &lt;p&gt;The tool itself seems much better than previous beta's or ctp's and it ran flawlessly to create the sample flyer I needed. Anyway, I've seen some strange things that are more complicated or hidden than in other design suites (Freehand, Corel Draw, Illustrator or Fireworks):&lt;/p&gt; &lt;ul&gt; &lt;li&gt;It took me a lot of time to figure out how to create text inside a shape (rectangle in my case) because it's called Adapt Text To Path. To me that means to draw a path and put your text over it, adapting to the path. This was a bit hidden.  &lt;/li&gt;&lt;li&gt;Although it seems possible to export to EPS format, it's not available to import files in EPS format. This is a must!  &lt;/li&gt;&lt;li&gt;I had an strange error when using the drop tool to get a color from the screen. It completely crashed the application, but I was unable to repro it.  &lt;/li&gt;&lt;li&gt;Exporting your design as PDF has some errors... if you have some text layers over shape layers, it wouldn't raster your text into the PDF. To solve this I had to convert all the text to paths and then export to PDF.  &lt;/li&gt;&lt;li&gt;The fill tools are not intuitive. I need some time to figure how to create a gradient for a shape.  &lt;/li&gt;&lt;li&gt;The fill with texture tool is not really complete, there are not too much patterns to add as textures to shapes and I mean really used patterns like dots, lines, etc.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Anyway I think this tool would have a great potential, because it seems it's getting mature. Don't know when it's supposed to be released to market but I'll try to provide this feedback to Microsoft, so they can see if it's something they can improve. This is how it looked while designing the flyer I linked to before:&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.clearscreen.com/migs/files/Expression1.jpg" /&gt;&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/5976.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>I've been up preparing <a href="http://blogs.clearscreen.com/migs/files/Ilitia_Formacion_2007.pdf" target="_blank">the catalog of training courses for this year at Ilitia</a>. I had to prepare a small A4 flyer to show up in events and clients, and I decided to give Microsoft Expression Design a try. Thus, I had to download and install it on my Vista laptop. Everything went fine.</p> <p>The tool itself seems much better than previous beta's or ctp's and it ran flawlessly to create the sample flyer I needed. Anyway, I've seen some strange things that are more complicated or hidden than in other design suites (Freehand, Corel Draw, Illustrator or Fireworks):</p> <ul> <li>It took me a lot of time to figure out how to create text inside a shape (rectangle in my case) because it's called Adapt Text To Path. To me that means to draw a path and put your text over it, adapting to the path. This was a bit hidden.  </li><li>Although it seems possible to export to EPS format, it's not available to import files in EPS format. This is a must!  </li><li>I had an strange error when using the drop tool to get a color from the screen. It completely crashed the application, but I was unable to repro it.  </li><li>Exporting your design as PDF has some errors... if you have some text layers over shape layers, it wouldn't raster your text into the PDF. To solve this I had to convert all the text to paths and then export to PDF.  </li><li>The fill tools are not intuitive. I need some time to figure how to create a gradient for a shape.  </li><li>The fill with texture tool is not really complete, there are not too much patterns to add as textures to shapes and I mean really used patterns like dots, lines, etc.</li></ul> <p>Anyway I think this tool would have a great potential, because it seems it's getting mature. Don't know when it's supposed to be released to market but I'll try to provide this feedback to Microsoft, so they can see if it's something they can improve. This is how it looked while designing the flyer I linked to before:</p> <p><img src="http://blogs.clearscreen.com/migs/files/Expression1.jpg" /></p><img src ="http://blogs.clearscreen.com/migs/aggbug/5976.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>71</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>Water Inspector Gadget, a simple incursion into Sidebar Gadgets</title><link>http://blogs.clearscreen.com/migs/archive/2006/12/04/4930.aspx</link><pubDate>Mon, 04 Dec 2006 22:01:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/12/04/4930.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4930.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/12/04/4930.aspx#Feedback</comments><slash:comments>121</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4930.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4930.aspx</trackback:ping><description>&lt;p&gt;A lot of people asked me about the percentage in my messenger nickname. Some of them thought it was the actual completion state of any of the project I'm involved, and they were wondering how in hell was I able to measure it so precisely.&lt;/p&gt; &lt;p&gt;In fact, the percentage in my nickname (actually 63,78%) is not related to technology, but to nature. It's the level of the water reserve in Madrid. I've been monitoring it during the last 5 or 6 weeks. Daily. Going to the local water company and checking it manually. It actually surprised me how we moved from a poor 27% to the actual reserve in such a little time frame. Amazing. And obviously, it's pretty welcomed.&lt;/p&gt; &lt;p&gt;But this task it's boring. Really boring. I wanted that info directly on my desktop. So, this seemed like a perfect place for &lt;a href="http://en.wikipedia.org/wiki/Inspector_Gadget"&gt;Inspector Gadget&lt;/a&gt; to play with Vista!!!&lt;/p&gt; &lt;p&gt;We first need a simple Html page to host all the gadget code. It's simple javascript + html, also know as the pretty famous dhtml. We then need a simple icon to show in the Gadget Library and of course bunch of nice javascript intervals, json, webservices, xml and xsl parsers to get all the data.&lt;/p&gt; &lt;p&gt;So I managed to get access to a &lt;a href="http://www.cyii.es/www/servlet/EmbalseServlet" target="_blank"&gt;webservice providing the percentage of water reserve for Madrid&lt;/a&gt; and wrote the code to embed it into a Gadget, dragged it to my Sidebar and &lt;em&gt;et voilá!&lt;/em&gt; it's doing the hard work for me.&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.clearscreen.com/migs/files/Agua01VistaGadget.jpg" /&gt;&lt;/p&gt; &lt;p&gt;If you feel like curious about how it's done, download the actual Agua Gadget and inspect the code. It's pretty simple yet. I plan to upgrade it to support settings, nicer graphics and be able to monitor more areas of Spain (my current knowledge about water distribution is limited to Spain, but if you know any source of data to your region, don't hesitate to contact me and I would love to include it)&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.clearscreen.com/migs/files/Agua_01_VistaGadget.zip"&gt;Download Agua Gadget 0.1&lt;/a&gt; for Windows Vista. To install, simply unzip it and double click de .gadget file. Windows Vista would install it for you :)&lt;/p&gt; &lt;p&gt;You can find more info on how to create a basic &lt;a href="http://msdn2.microsoft.com/en-us/library/ms723694.aspx" target="_blank"&gt;Sidebar Gadget at this step by step tutorial&lt;/a&gt; and more info at the &lt;a href="http://msdn2.microsoft.com/en-us/library/aa965853.aspx"&gt;System.Gadget namespace reference&lt;/a&gt;.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4930.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>A lot of people asked me about the percentage in my messenger nickname. Some of them thought it was the actual completion state of any of the project I'm involved, and they were wondering how in hell was I able to measure it so precisely.</p> <p>In fact, the percentage in my nickname (actually 63,78%) is not related to technology, but to nature. It's the level of the water reserve in Madrid. I've been monitoring it during the last 5 or 6 weeks. Daily. Going to the local water company and checking it manually. It actually surprised me how we moved from a poor 27% to the actual reserve in such a little time frame. Amazing. And obviously, it's pretty welcomed.</p> <p>But this task it's boring. Really boring. I wanted that info directly on my desktop. So, this seemed like a perfect place for <a href="http://en.wikipedia.org/wiki/Inspector_Gadget">Inspector Gadget</a> to play with Vista!!!</p> <p>We first need a simple Html page to host all the gadget code. It's simple javascript + html, also know as the pretty famous dhtml. We then need a simple icon to show in the Gadget Library and of course bunch of nice javascript intervals, json, webservices, xml and xsl parsers to get all the data.</p> <p>So I managed to get access to a <a href="http://www.cyii.es/www/servlet/EmbalseServlet" target="_blank">webservice providing the percentage of water reserve for Madrid</a> and wrote the code to embed it into a Gadget, dragged it to my Sidebar and <em>et voilá!</em> it's doing the hard work for me.</p> <p><img src="http://blogs.clearscreen.com/migs/files/Agua01VistaGadget.jpg" /></p> <p>If you feel like curious about how it's done, download the actual Agua Gadget and inspect the code. It's pretty simple yet. I plan to upgrade it to support settings, nicer graphics and be able to monitor more areas of Spain (my current knowledge about water distribution is limited to Spain, but if you know any source of data to your region, don't hesitate to contact me and I would love to include it)</p> <p><a href="http://blogs.clearscreen.com/migs/files/Agua_01_VistaGadget.zip">Download Agua Gadget 0.1</a> for Windows Vista. To install, simply unzip it and double click de .gadget file. Windows Vista would install it for you :)</p> <p>You can find more info on how to create a basic <a href="http://msdn2.microsoft.com/en-us/library/ms723694.aspx" target="_blank">Sidebar Gadget at this step by step tutorial</a> and more info at the <a href="http://msdn2.microsoft.com/en-us/library/aa965853.aspx">System.Gadget namespace reference</a>.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/4930.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>298</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>No sync with Windows Mobile Device Center included in Vista RTM?</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/30/4769.aspx</link><pubDate>Thu, 30 Nov 2006 13:36:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/30/4769.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4769.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/30/4769.aspx#Feedback</comments><slash:comments>151</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4769.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4769.aspx</trackback:ping><description>&lt;p&gt;Well, it seemed that Windows Vista didn't shipped with a full version of the Windows Mobile Device Center. It shipped with an standard RNDIS driver to make simple connections to mobile devices, but it's not able to sync with my Outlook 2007.&lt;/p&gt; &lt;p&gt;So after some web crawling, it ended up at a Windows Mobile Team's page where you can &lt;a href="http://www.microsoft.com/windowsmobile/devicecenter.mspx" target="_blank"&gt;download Windows Mobile Device Center Beta 3&lt;/a&gt; for Windows Vista. So I did it, and installed it.&lt;/p&gt; &lt;p&gt;I tried to sync my device but it didn't worked out. Frustration. I crawled again and found that there is an incompatibility between Windows Live One Care 1.5 Beta and Windows Mobile Device Center Beta 3, because One Care Firewall won't detect the needed applications and ports.&lt;/p&gt; &lt;p&gt;Hence, you have two options:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Disable Live One Care Firewall each time you need to sync your device. ouuuch.  &lt;/li&gt;&lt;li&gt;Configure the needed ports and applications manually within the Live One Care Firewall:  &lt;ul&gt; &lt;li&gt;Ports:  &lt;ul&gt; &lt;li&gt;port990: open inbound TCP  &lt;/li&gt;&lt;li&gt;port999: open inbound TCP  &lt;/li&gt;&lt;li&gt;port5678: open inbound TCP  &lt;/li&gt;&lt;li&gt;port5679: open outbound UDP  &lt;/li&gt;&lt;li&gt;port5721: open inbound TCP  &lt;/li&gt;&lt;li&gt;port26675: open inbound TCP&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;Applications  &lt;ul&gt; &lt;li&gt;C:\Windows\WindowsMobile\wmdc.exe  &lt;/li&gt;&lt;li&gt;C:\Windows\WindowsMobile\wmdHost.exe  &lt;/li&gt;&lt;li&gt;C:\Windows\WindowsMobile\wmdsyncman.dll&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;And there we go. It's working perfectly now :)&lt;/p&gt; &lt;p&gt;&lt;img src="http://blogs.clearscreen.com/migs/files/wmdc.jpg" border="0" /&gt;&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4769.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>Well, it seemed that Windows Vista didn't shipped with a full version of the Windows Mobile Device Center. It shipped with an standard RNDIS driver to make simple connections to mobile devices, but it's not able to sync with my Outlook 2007.</p> <p>So after some web crawling, it ended up at a Windows Mobile Team's page where you can <a href="http://www.microsoft.com/windowsmobile/devicecenter.mspx" target="_blank">download Windows Mobile Device Center Beta 3</a> for Windows Vista. So I did it, and installed it.</p> <p>I tried to sync my device but it didn't worked out. Frustration. I crawled again and found that there is an incompatibility between Windows Live One Care 1.5 Beta and Windows Mobile Device Center Beta 3, because One Care Firewall won't detect the needed applications and ports.</p> <p>Hence, you have two options:</p> <ul> <li>Disable Live One Care Firewall each time you need to sync your device. ouuuch.  </li><li>Configure the needed ports and applications manually within the Live One Care Firewall:  <ul> <li>Ports:  <ul> <li>port990: open inbound TCP  </li><li>port999: open inbound TCP  </li><li>port5678: open inbound TCP  </li><li>port5679: open outbound UDP  </li><li>port5721: open inbound TCP  </li><li>port26675: open inbound TCP</li></ul> </li><li>Applications  <ul> <li>C:\Windows\WindowsMobile\wmdc.exe  </li><li>C:\Windows\WindowsMobile\wmdHost.exe  </li><li>C:\Windows\WindowsMobile\wmdsyncman.dll</li></ul></li></ul></li></ul> <p>And there we go. It's working perfectly now :)</p> <p><img src="http://blogs.clearscreen.com/migs/files/wmdc.jpg" border="0" /></p><img src ="http://blogs.clearscreen.com/migs/aggbug/4769.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>17</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>At last, an up-to-date version of Commerce Server</title><link>http://blogs.clearscreen.com/migs/archive/2006/11/07/4181.aspx</link><pubDate>Tue, 07 Nov 2006 14:09:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/11/07/4181.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4181.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/11/07/4181.aspx#Feedback</comments><slash:comments>25</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4181.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4181.aspx</trackback:ping><description>&lt;p&gt;It was time to get a Commerce Server version up to nowadays technologies. This was my first thought a while ago when listening to Ryan Donovan, Product Unit Manager for Commerce Server 2007.&lt;/p&gt;
&lt;p&gt;In the past I had the chance (or bad luck) to deal with Commerce Server, and I was missing a lot of features. In last version, the migrated most of the code and content to ASP.NET but it still required all the classic COM componentes used in previous versions. This has completely changed. Finally.&lt;/p&gt;
&lt;p&gt;The actual model is completely developed over ASP.NET 2.0 and on top of it you can find the object model (catalogs, orders, etc...) presented by Commerce Server... there is a new extensibility layer over all those components exposed with web services and a new .NET API that supports all the managing and updating content options.&lt;/p&gt;
&lt;p&gt;The most interesting part seems to be the integration of web controls inside ASP.NET that allow to develop e-commerce site dragging and dropping ASP.NET 2.0 templated controls. This was impossible until now. There are more new features like virtual catalogs, integration with Biztalk 2006, support for Membership, Themes and Masterpages, integration with Sharepoint 2007 and support for Active Directory Federation Services (more to come about this)&lt;/p&gt;
&lt;p&gt;The Agile note of this presentation was: “The included Starter Site includes a complete set of unit tests“ .. Than you. Really.&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4181.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p>It was time to get a Commerce Server version up to nowadays technologies. This was my first thought a while ago when listening to Ryan Donovan, Product Unit Manager for Commerce Server 2007.</p>
<p>In the past I had the chance (or bad luck) to deal with Commerce Server, and I was missing a lot of features. In last version, the migrated most of the code and content to ASP.NET but it still required all the classic COM componentes used in previous versions. This has completely changed. Finally.</p>
<p>The actual model is completely developed over ASP.NET 2.0 and on top of it you can find the object model (catalogs, orders, etc...) presented by Commerce Server... there is a new extensibility layer over all those components exposed with web services and a new .NET API that supports all the managing and updating content options.</p>
<p>The most interesting part seems to be the integration of web controls inside ASP.NET that allow to develop e-commerce site dragging and dropping ASP.NET 2.0 templated controls. This was impossible until now. There are more new features like virtual catalogs, integration with Biztalk 2006, support for Membership, Themes and Masterpages, integration with Sharepoint 2007 and support for Active Directory Federation Services (more to come about this)</p>
<p>The Agile note of this presentation was: “The included Starter Site includes a complete set of unit tests“ .. Than you. Really.</p><img src ="http://blogs.clearscreen.com/migs/aggbug/4181.aspx" width = "1" height = "1" /></body></item><item><dc:creator>Miguel Jiménez</dc:creator><title>TechEd Europe 2006, I'll be there</title><link>http://blogs.clearscreen.com/migs/archive/2006/10/31/4095.aspx</link><pubDate>Tue, 31 Oct 2006 13:32:00 GMT</pubDate><guid>http://blogs.clearscreen.com/migs/archive/2006/10/31/4095.aspx</guid><wfw:comment>http://blogs.clearscreen.com/migs/comments/4095.aspx</wfw:comment><comments>http://blogs.clearscreen.com/migs/archive/2006/10/31/4095.aspx#Feedback</comments><slash:comments>30</slash:comments><wfw:commentRss>http://blogs.clearscreen.com/migs/comments/commentRss/4095.aspx</wfw:commentRss><trackback:ping>http://blogs.clearscreen.com/migs/services/trackbacks/4095.aspx</trackback:ping><description>&lt;p&gt;&lt;img height="146" alt="" src="https://www.mseventseurope.com/TechEd/06/Pre/Images/Developers/header_left2.gif" width="179" /&gt;&lt;/p&gt; &lt;p&gt;Hi all, this is just a quick note to say that I'll be in TechEd Europe 2006 (Barcelona) during the next week. If you may have any interest in contacting me or just hang around to have some beers, just drop me a note or look for me in the Ask The Experts section.&lt;/p&gt; &lt;p&gt;Btw, the saturday after TechEd (11th) there'll be a The Killers concert in Bcn, I already have my ticket :)&lt;/p&gt;&lt;img src ="http://blogs.clearscreen.com/migs/aggbug/4095.aspx" width = "1" height = "1" /&gt;</description><body xmlns="http://www.w3.org/1999/xhtml"><p><img height="146" alt="" src="https://www.mseventseurope.com/TechEd/06/Pre/Images/Developers/header_left2.gif" width="179" /></p> <p>Hi all, this is just a quick note to say that I'll be in TechEd Europe 2006 (Barcelona) during the next week. If you may have any interest in contacting me or just hang around to have some beers, just drop me a note or look for me in the Ask The Experts section.</p> <p>Btw, the saturday after TechEd (11th) there'll be a The Killers concert in Bcn, I already have my ticket :)</p><img src ="http://blogs.clearscreen.com/migs/aggbug/4095.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>24</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>