<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Fabrice&amp;#39;s weblog : Architecture</title><link>http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx</link><description>Tags: Architecture</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>New article: How to detect and avoid memory and resources leaks in .NET applications</title><link>http://weblogs.asp.net/fmarguerie/archive/2009/11/03/article-detect-avoid-memory-leaks.aspx</link><pubDate>Mon, 02 Nov 2009 23:32:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7213885</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=7213885</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2009/11/03/article-detect-avoid-memory-leaks.aspx#comments</comments><description>&lt;p&gt;My new article, which I've been preparing over the last few months, is now available. It's about &lt;b&gt;memory and resources leaks in .NET&lt;/b&gt;.&lt;br&gt;You'll find it &lt;a href="http://msdn.microsoft.com/en-us/library/ee658248.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee658248.aspx"&gt;in English on MSDN&lt;/a&gt; and &lt;a href="http://dotnetguru.org/modules.php?file=article&amp;amp;sid=1283" mce_href="http://dotnetguru.org/modules.php?file=article&amp;amp;sid=1283"&gt;in French on DotNetGuru.org&lt;/a&gt;. It's also available in PDF &lt;a href="http://madgeek.com/Articles/Leaks/Leaks.en.pdf" mce_href="http://madgeek.com/Articles/Leaks/Leaks.en.pdf"&gt;in English&lt;/a&gt; and &lt;a href="http://madgeek.com/Articles/Leaks/Leaks.fr.pdf" mce_href="http://madgeek.com/Articles/Leaks/Leaks.fr.pdf"&gt;in French&lt;/a&gt;.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Here is the table of content:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Introduction&lt;/li&gt;&lt;li&gt;Leaks? Resources? What do you mean?&lt;/li&gt;&lt;li&gt;How to detect leaks and find the leaking resources&lt;/li&gt;&lt;li&gt;Common memory leak causes&lt;/li&gt;&lt;li&gt;Common memory leaks causes demonstrated&lt;/li&gt;&lt;li&gt;How to avoid leaks&lt;/li&gt;&lt;li&gt;Tools&lt;/li&gt;&lt;li&gt;Conclusion&lt;/li&gt;&lt;li&gt;Resources&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.&lt;br&gt;I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.&lt;br&gt;It's important to understand leaks and how to avoid them, especially since they are not the kind of things that is easy to detect automatically. Unit tests won't help here. And when your application crashes in production, you'll be in a rush looking for solutions. So, relax and take the time to learn more about this subject before it's too late.&lt;/i&gt;&lt;br&gt;
&lt;hr width="40%"&gt;
&lt;p&gt;Mon nouvel article, que j'ai préparé durant ces derniers mois, est maintenant disponible. Il parle des &lt;b&gt;fuites de mémoire et de ressources en .NET&lt;/b&gt;.&lt;br&gt;Vous le trouverez &lt;a href="http://dotnetguru.org/modules.php?file=article&amp;amp;sid=1283" mce_href="http://dotnetguru.org/modules.php?file=article&amp;amp;sid=1283"&gt;en français sur DotNetGuru.org&lt;/a&gt; et &lt;a href="http://msdn.microsoft.com/en-us/library/ee658248.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee658248.aspx"&gt;en anglais sur MSDN&lt;/a&gt;. Il est également disponible en PDF &lt;a href="http://madgeek.com/Articles/Leaks/Leaks.fr.pdf" mce_href="http://madgeek.com/Articles/Leaks/Leaks.fr.pdf"&gt;en français&lt;/a&gt; et &lt;a href="http://madgeek.com/Articles/Leaks/Leaks.en.pdf" mce_href="http://madgeek.com/Articles/Leaks/Leaks.en.pdf"&gt;en anglais&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Voici la table des matières :&lt;/p&gt;
&lt;ul&gt;&lt;li&gt; Introduction&lt;/li&gt;&lt;li&gt;Fuites ? Ressources ? Qu'entendez-vous par là ?&lt;/li&gt;&lt;li&gt;Comment détecter des fuites et repérer les ressources qui fuient&lt;/li&gt;&lt;li&gt;Les causes habituelles de fuites de mémoire&lt;/li&gt;&lt;li&gt;Les causes habituelles de fuites en pratique&lt;/li&gt;&lt;li&gt;Comment éviter les fuites&lt;/li&gt;&lt;li&gt;Outils&lt;/li&gt;&lt;li&gt;Conclusion&lt;/li&gt;&lt;li&gt;Ressources&lt;/li&gt;&lt;/ul&gt;&lt;i&gt;En dépit de ce que beaucoup de personnes pensent, il est facile d'introduire des fuites de mémoire et de ressources dans les applications .NET. Le Garbage Collector, également appelé ramasse-miettes ou GC pour les intimes, n'est pas un magicien qui vous affranchirait totalement de vous soucier de la consommation de ressources et de mémoire.&lt;/i&gt;&lt;br&gt;&lt;i&gt;J'expliquerai dans cet article pourquoi les fuites de mémoire existent en .NET et comment les éviter. Ne vous en faites pas, je ne vais pas me focaliser ici sur le fonctionnement interne du garbage collector et autres caractéristiques avancées de la gestion de la mémoire et de ressources en .NET&lt;/i&gt;&lt;br&gt;&lt;i&gt;Il est important de comprendre les fuites et comment les éviter, particulièrement car elles n'entrent pas dans la catégorie des choses facilement détectables de manière automatisée. Les test unitaires ne vous aideront pas ici. Et quand votre application se plantera en production, vous serez à la recherche de solutions dans l'urgence. Alors, détendez-vous et prenez le temps dès maintenant d'en apprendre plus sur ce sujet avant qu'il ne soit trop tard.&lt;/i&gt;&lt;br&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7213885" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Source/default.aspx">Source</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tips/default.aspx">Tips</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category></item><item><title>UI design patterns libraries</title><link>http://weblogs.asp.net/fmarguerie/archive/2009/02/15/ui-design-patterns-libraries.aspx</link><pubDate>Sun, 15 Feb 2009 13:34:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6907950</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=6907950</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2009/02/15/ui-design-patterns-libraries.aspx#comments</comments><description>&lt;p&gt;Over the time, I've collected a set of UI design patterns libraries. Some of them present patterns with descriptions and advices, others collect screenshots of UI designs. With all the available sites, you have a lot of patterns to tap into for your sites and applications!&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.welie.com/patterns" mce_href="http://www.welie.com/patterns"&gt;http://www.welie.com/patterns&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ui-patterns.com" mce_href="http://ui-patterns.com"&gt;http://ui-patterns.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://designinginterfaces.com" mce_href="http://designinginterfaces.com"&gt;http://designinginterfaces.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://time-tripper.com/uipatterns" tooltip="linkalert-tip" mce_href="http://time-tripper.com/uipatterns"&gt;http://time-tripper.com/uipatterns&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://developer.yahoo.com/ypatterns" mce_href="http://developer.yahoo.com/ypatterns"&gt;http://developer.yahoo.com/ypatterns&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://patterns.littlespringsdesign.com" mce_href="http://patterns.littlespringsdesign.com"&gt;http://patterns.littlespringsdesign.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://groups.ischool.berkeley.edu/ui_designpatterns" tooltip="linkalert-tip" mce_href="http://groups.ischool.berkeley.edu/ui_designpatterns"&gt;http://groups.ischool.berkeley.edu/ui_designpatterns&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://patterntap.com" tooltip="linkalert-tip" mce_href="http://patterntap.com"&gt;http://patterntap.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cs.helsinki.fi/u/salaakso/patterns" tooltip="linkalert-tip" mce_href="http://www.cs.helsinki.fi/u/salaakso/patterns"&gt;http://www.cs.helsinki.fi/u/salaakso/patterns&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.webdesignpractices.com" tooltip="linkalert-tip" mce_href="http://www.webdesignpractices.com"&gt;http://www.webdesignpractices.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ecommr.com" tooltip="linkalert-tip" mce_href="http://www.ecommr.com"&gt;http://www.ecommr.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://quince.infragistics.com" tooltip="linkalert-tip" mce_href="http://quince.infragistics.com"&gt;http://quince.infragistics.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://theresaneil.wordpress.com/2009/02/04/30-essential-controls" tooltip="linkalert-tip" mce_href="http://theresaneil.wordpress.com/2009/02/04/30-essential-controls"&gt;http://theresaneil.wordpress.com/2009/02/04/30-essential-controls&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://konigi.com/interface/latest" tooltip="linkalert-tip" mce_href="http://konigi.com/interface/latest"&gt;http://konigi.com/interface/latest&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://uidesignpatterns.org" tooltip="linkalert-tip" mce_href="http://uidesignpatterns.org"&gt;http://uidesignpatterns.org&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://uipatternfactory.com" mce_href="http://uipatternfactory.com"&gt;http://uipatternfactory.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wearecolorblind.com" mce_href="http://wearecolorblind.com"&gt;http://wearecolorblind.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://patternbrowser.org" mce_href="http://patternbrowser.org"&gt;http://patternbrowser.org&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://interface.fh-potsdam.de/infodesignpatterns/patterns.php" mce_href="http://interface.fh-potsdam.de/infodesignpatterns/patterns.php"&gt;http://interface.fh-potsdam.de/infodesignpatterns/patterns.php&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://patterns.holehan.org" mce_href="http://patterns.holehan.org"&gt;http://patterns.holehan.org&lt;/a&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Feel free to suggest more UI patterns collections.&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6907950" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Sites/default.aspx">Sites</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tips/default.aspx">Tips</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/UI/default.aspx">UI</category></item><item><title>.NET sessions at the Université du SI and .NET 3.5+ expertise</title><link>http://weblogs.asp.net/fmarguerie/archive/2008/06/02/dotnet-sessions-at-the-universite-du-si-and-net-3.5-plus-expertise.aspx</link><pubDate>Mon, 02 Jun 2008 21:09:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6243095</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=6243095</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2008/06/02/dotnet-sessions-at-the-universite-du-si-and-net-3.5-plus-expertise.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://weblogs.asp.net/fmarguerie/archive/2008/04/10/universit-233-du-si-octo-technology.aspx" mce_href="http://weblogs.asp.net/fmarguerie/archive/2008/04/10/universit-233-du-si-octo-technology.aspx"&gt;I announced in April&lt;/a&gt; that I'll be part of the &lt;a href="http://www.universite-du-si.com/" mce_href="http://www.universite-du-si.com/"&gt;Université du Système d'Information&lt;/a&gt; event on July 2 and 3. With Frédéric Schäfer, we're actively preparing &lt;a href="http://weblogs.asp.net/fmarguerie/archive/2008/04/10/universit-233-du-si-octo-technology.aspx" mce_href="http://weblogs.asp.net/fmarguerie/archive/2008/04/10/universit-233-du-si-octo-technology.aspx"&gt;our session&lt;/a&gt;, which will allow you to discover in action no less than &lt;b&gt;.NET 3.5, Visual Studio 2008, ADO.NET Entity Framework, LINQ, WPF and Silverlight&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;On Octo's blog, Frédéric gives the &lt;a href="http://blog.octo.com/index.php/2008/06/02/121-net-a-l-universite-du-si" mce_href="http://blog.octo.com/index.php/2008/06/02/121-net-a-l-universite-du-si"&gt;complete list of sessions that will cover .NET&lt;/a&gt; (in French).&lt;/p&gt;
&lt;p&gt;I'd like to take this opportunity to announce that I'm available to give presentations and training about the above technologies and products. If you're getting started with VS 2008, C# 3.0, .NET 3.5 and the accompanying tools, feel free to contact me!&amp;nbsp;&lt;/p&gt;
&lt;hr width="40%"&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/fmarguerie/archive/2008/04/10/universit-233-du-si-octo-technology.aspx" mce_href="http://weblogs.asp.net/fmarguerie/archive/2008/04/10/universit-233-du-si-octo-technology.aspx"&gt;J'ai annoncé début avril&lt;/a&gt; ma participation à l'événement &lt;a href="http://www.universite-du-si.com/" mce_href="http://www.universite-du-si.com/"&gt;Université du Système d'Information&lt;/a&gt;, organisé par Octo. Avec Frédéric Schäfer, nous sommes actuellement en pleine préparation de &lt;a href="http://www.universite-du-si.com/Parcourslibre.aspx#experimenter-innovations-NET" mce_href="http://www.universite-du-si.com/Parcourslibre.aspx#experimenter-innovations-NET"&gt;notre session&lt;/a&gt;, qui vous permettra de découvrir en action pas moins que les technologies et outils &lt;b&gt;.NET 3.5, Visual Studio 2008, ADO.NET Entity Framework, LINQ, WPF et Silverlight&lt;/b&gt;. Notre session d'une heure et demie se présentera sous la forme du développement en direct d'une application d'exemple utilisant les technologies sus-citées.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;La session que nous allons présenter n'est pas la seule abordant .NET parmi la soixantaine que comprend l'événement. Frédéric reprend d'ailleurs &lt;a href="http://blog.octo.com/index.php/2008/06/02/121-net-a-l-universite-du-si" mce_href="http://blog.octo.com/index.php/2008/06/02/121-net-a-l-universite-du-si"&gt;la liste des sessions traitant de .NET sur le blog d'Octo&lt;/a&gt; :&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul type="disc"&gt;
&lt;li style="" class="MsoNormal"&gt;&lt;a href="http://www.universite-du-si.com/ParcoursLibre.aspx#building-webapp-volta" target="_blank"&gt;&lt;span style="" lang="EN-GB"&gt;Building      Web Applications Using Volta&lt;/span&gt;&lt;/a&gt;&lt;span style="" lang="EN-GB"&gt; par &lt;/span&gt;&lt;span style="color: windowtext; text-decoration: none;" lang="EN-GB"&gt;Erik Meijer (Microsoft&lt;/span&gt;&lt;span style="" lang="EN-GB"&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="" class="MsoNormal"&gt;&lt;a href="http://www.universite-du-si.com/ParcoursLibre.aspx#defis_utilisation_LINQ_SQL" target="_blank"&gt;Les défis de l'utilisation de LINQ to SQL&lt;/a&gt; par Guy      Barette (Indépendant)&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;
&lt;li style="" class="MsoNormal"&gt;&lt;a href="http://www.universite-du-si.com/ParcoursLibre.aspx#survol-nouv-tech-MS" target="_blank"&gt;Survol des nouvelles techniques d'accès aux données de      Microsoft&lt;/a&gt; par Guy Barette (Indépendant)&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;
&lt;li style="" class="MsoNormal"&gt;&lt;a href="http://www.universite-du-si.com/ParcoursLibre.aspx#separation-preoccupations" target="_blank"&gt;Séparation des préoccupations: Nouveautés pour diminuer le      couplage et augmenter la cohésion&lt;/a&gt; par Mario Cardinal (Indépendant)&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;
&lt;li style="" class="MsoNormal"&gt;&lt;a href="http://www.universite-du-si.com/ParcoursLibre.aspx#futur-java-csharp" target="_blank"&gt;Futur de Java et Csharp&lt;/a&gt; par Alexis Moussine-Pouchkine      (Sun) et Vincent Guigui (Octo)&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;
&lt;li style="" class="MsoNormal"&gt;&lt;a href="http://www.universite-du-si.com/ParcoursLibre.aspx#technos-vecto-GUI" target="_blank"&gt;L'avenir est aux technologies vectorielles !&lt;/a&gt; par      Christian Blavier (Octo) et Eric Groise (Octo)&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;
&lt;li style="" class="MsoNormal"&gt;&lt;a href="http://www.universite-du-si.com/ParcoursLibre.aspx#experimenter-innovations-NET" target="_blank"&gt;Venez expérimenter en direct les dernières innovations de      .NET&lt;/a&gt; par Fabrice Marguerie (Indépendant) et Frédéric Schäfer (Octo)&lt;/li&gt;
&lt;/ul&gt;&lt;/blockquote&gt;J'aimerais profiter de l'occasion pour annoncer que je suis disponible pour donner des présentations ou des formations sur les technologies couvertes durant notre session. Si vous démarrez avec VS 2008, C# 3.0, .NET 3.5 et les outils qui les accompagnent, n'hésitez-pas à me contacter !

&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6243095" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/News/default.aspx">News</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Acropolis is around the corner</title><link>http://weblogs.asp.net/fmarguerie/archive/2007/06/05/acropolis-is-around-the-corner.aspx</link><pubDate>Tue, 05 Jun 2007 10:34:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:2732348</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=2732348</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2007/06/05/acropolis-is-around-the-corner.aspx#comments</comments><description>&lt;p&gt;If you are working with the CAB (Composite UI Application Block) or the SCSF (Smart Client Software Factory), you should check out Acropolis. If you are not using CAB or SCSF but you need to develop Windows applications, you should take a look at Acropolis too!&lt;br&gt;&lt;/p&gt;&lt;p&gt;Acropolis has just been &lt;a href="http://blogs.msdn.com/brada/archive/2007/06/04/hello-acropolis.aspx" mce_href="http://blogs.msdn.com/brada/archive/2007/06/04/hello-acropolis.aspx"&gt;announced by Brad Abrams&lt;/a&gt; and others. It's supposed to be the integration of ideas and concepts from CAB and SCSF into Visual Studio.&lt;/p&gt;&lt;p style="margin-left: 40px;"&gt;&lt;i&gt;Acropolis is an initial “experiment” at up leveling the .NET Framework application model to enable more modular application that enables developers to focus on their business logic while reaping the benefits of Xaml and WPF and of course carrying forward all of your existing Windows Forms assets.&lt;/i&gt;&lt;/p&gt;&lt;p style="margin-left: 40px;"&gt;&lt;i&gt;Acropolis builds on the rich capabilities of Microsoft Windows and the .NET Framework, including Windows Presentation Foundation (WPF), by providing tools and pre-built components that help developers quickly assemble applications from loosely-coupled parts and services. With Acropolis you will be able to:&lt;br&gt;&lt;/i&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;Quickly create WPF enabled user experiences for your client applications.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Build client applications from reusable, connectable, modules that allow you to easily create complex, business-focused applications in less time.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Integrate and host your modules in applications such as Microsoft Office, or quickly build stand-alone client interfaces.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Change the look and feel of your application quickly using built-in themes, or custom designs using XAML.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Add features such as workflow navigation and user-specific views with minimal coding.&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Manage, update, and deploy your application modules quickly and easily.&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Acropolis requires &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=5d9c6b2d-439c-4ec2-8e24-b7d9ff6a2ab2&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=5d9c6b2d-439c-4ec2-8e24-b7d9ff6a2ab2&amp;amp;DisplayLang=en"&gt;Visual Studio 2008 (Orcas) Beta 1&lt;/a&gt;. The first preview can be downloaded &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=72386ce5-f206-4d5c-ab09-413b5f31f935&amp;amp;DisplayLang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=72386ce5-f206-4d5c-ab09-413b5f31f935&amp;amp;DisplayLang=en"&gt;here&lt;/a&gt;. Acropolis also has a &lt;a href="http://windowsclient.net/Acropolis/" mce_href="http://windowsclient.net/Acropolis/"&gt;home page&lt;/a&gt;, where you'll be able to find an &lt;a href="http://download.microsoft.com/download/9/8/4/984da9b4-b5ff-45ba-b673-03117c393238/Acropolis%20-%20Getting%20Started.wmv" mce_href="http://download.microsoft.com/download/9/8/4/984da9b4-b5ff-45ba-b673-03117c393238/Acropolis%20-%20Getting%20Started.wmv"&gt;introduction video&lt;/a&gt;.&lt;br&gt;If you are at Tech Ed in Orlando, you can also learn more about Acropolis. You can find the sessions by searching for the Acropolis keyword in &lt;a href="http://www.msteched.com/public/sessions.aspx" mce_href="http://www.msteched.com/public/sessions.aspx"&gt;the session catalog&lt;/a&gt;.&lt;br&gt;&lt;/p&gt;&lt;p&gt;At first sight, Acropolis looks very different from the CAB and SCSF. I'll be experimenting with it very soon because this is most likely the way to go for some of my clients.&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2732348" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Change tracking, the ADO.NET Entity Framework and DataSets</title><link>http://weblogs.asp.net/fmarguerie/archive/2007/03/31/change-tracking-the-ado-net-entity-framework-and-datasets.aspx</link><pubDate>Sat, 31 Mar 2007 11:58:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:2156258</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=2156258</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2007/03/31/change-tracking-the-ado-net-entity-framework-and-datasets.aspx#comments</comments><description>&lt;p&gt;Andres Aguiar started an &lt;a href="http://weblogs.asp.net/aaguiar/archive/2007/03/30/ado-net-orcas-entity-framework-and-disconnected-operation.aspx"&gt;interesting discussion about disconnected operation and change tracking in the ADO.NET Entity Framework&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Andres regrets that the Entity Framework doesn&amp;#39;t provide change tracking information:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This basically means that if you plan to build a multi-tier application with ADO.NET Orcas in the middle tier, you will need to hack your own change tracking mechanism in the client, send the whole changeset, and apply it in the middle tier. From this point of view, it&amp;#39;s a huge step backwards, as that&amp;#39;s something we already have with DataSets today.&amp;nbsp;&lt;/p&gt;&lt;p&gt;In a reply to Andres&amp;#39; post, &lt;a href="http://udidahan.weblogs.us/2007/03/30/entity-framework-disconnected-problems-solutions/"&gt;Udi Dahan&lt;/a&gt; states that an application should not rely on change tracking information.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I believe that there are several kinds of applications and I don&amp;#39;t think everybody must move to a unique kind of application.
Some application don&amp;#39;t require change tracking, others do. I&amp;#39;ve worked on applications that require it and &lt;a href="http://weblogs.asp.net/aaguiar/archive/2007/03/30/re-disconnected-problems-and-solutions.aspx"&gt;Andres describes very well how they work in a subsequent post&lt;/a&gt;. One additional advantage of having state information is that you can display a collection of items (often details in a master-details relationship) in a grid, with changed items in italic, new items in bold and deleted items with strike-through text.&lt;br /&gt;I don&amp;#39;t understand why an SOA architecture wouldn&amp;#39;t allow an UpdateOrder kind of command, but if it&amp;#39;s the case, then a lot of applications are not compatible with SOA.
If the ADO.NET Entity Framework or other mapping frameworks do not provide change information, then I&amp;#39;d say that DataSets are here to stay for a while...&lt;br /&gt;I don&amp;#39;t think there can be only one architecture for all applications. Both approaches described by Andres and Udi should coexist.  If the ADO.NET Entity Framework doesn&amp;#39;t provide support for change tracking, then another tool is need for some applications. If the the Entity Framework is open enough, then maybe extensions to it can add the support for change tracking?&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=2156258" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Opinions/default.aspx">Opinions</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category></item><item><title>CAB and SCSF resources</title><link>http://weblogs.asp.net/fmarguerie/archive/2006/08/08/cab-and-scsf-resources.aspx</link><pubDate>Mon, 07 Aug 2006 22:31:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:465069</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=465069</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2006/08/08/cab-and-scsf-resources.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve been extensively using the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/cab.asp"&gt;CAB (Composite UI Application Block)&lt;/a&gt; and the &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/scsflp.asp"&gt;SCSF (Smart Client Software Factory)&lt;/a&gt; lately. You should really dig them if you are creating Windows Forms applications. The CAB is a great tool to structure your developments and create reusable components. The SCSF is great for working with the CAB...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Eugenio Pace, product manager at Microsoft Patterns &amp;amp; Practices, has compiled a &lt;a href="http://blogs.msdn.com/eugeniop/archive/2006/08/07/691273.aspx"&gt;list of resources about the CAB and the SCSF&lt;/a&gt;. This can be really useful if you are using these technologies or want to know more.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=465069" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Sample uses of LINQ, DLINQ and XLINQ</title><link>http://weblogs.asp.net/fmarguerie/archive/2006/05/11/using-linq-dlinq-xlinq.aspx</link><pubDate>Wed, 10 May 2006 23:17:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:446015</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=446015</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2006/05/11/using-linq-dlinq-xlinq.aspx#comments</comments><description>&lt;p&gt;My article entitled &lt;a href="http://madgeek.com/Articles/Linq/EN/Linq.htm"&gt;&lt;em&gt;Sample uses of LINQ, DLINQ and XLINQ&lt;/em&gt;&lt;/a&gt; is now available in English.&lt;/p&gt;&lt;p&gt;&lt;i&gt;In this article, we will see how to put LINQ, DLINQ and XLINQ in action. The goal is just to show how to use these technologies, and not to provide a target architecture or demonstrate optimal uses. The goal is not either to explain how Linq works. The goal is instead to explore the possibilities that Linq and co will offer to us, as well as to highlight some best practices.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Warning: this article was written several months ago, is based on the first preview of Linq and on my knowledge at that time. Most of the content is still valid today though.&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt; &lt;hr width="40%" /&gt; &lt;p&gt;Cet article est aussi disponible en français: &lt;a href="http://www.dotnetguru.org/articles/articlets/linq/Linq.htm"&gt;Exemples de mise en oeuvre de Linq, DLinq et XLinq&lt;/a&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=446015" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Source/default.aspx">Source</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/LINQ/default.aspx">LINQ</category></item><item><title>Using LINQ, DLINQ and XLINQ</title><link>http://weblogs.asp.net/fmarguerie/archive/2005/12/06/432508.aspx</link><pubDate>Tue, 06 Dec 2005 22:35:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:432508</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=432508</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2005/12/06/432508.aspx#comments</comments><description>&lt;p&gt;My new article has been published: &lt;em&gt;Using LINQ, DLINQ and XLINQ for application development&lt;/em&gt;.&lt;br /&gt;&lt;strike&gt;It is currently available only in French, but translation is pending. In the meantime, you can use &lt;a href="http://www.google.com/language_tools?hl=en"&gt;your&lt;/a&gt; &lt;a href="http://www.systranbox.com/"&gt;favorite&lt;/a&gt; &lt;a href="http://babel.altavista.com/tr"&gt;fish&lt;/a&gt; &lt;a href="http://www.reverso.com/"&gt;for&lt;/a&gt; &lt;a href="http://www.worldlingo.com/products_services/worldlingo_translator.html"&gt;translation&lt;/a&gt;.&lt;br /&gt;Of course, I'll let you know when the English version is available.&lt;/strike&gt;&lt;/p&gt;&lt;p&gt;&lt;font color="#008000"&gt;Update:&lt;/font&gt; This article is &lt;a href="http://madgeek.com/Articles/Linq/EN/Linq.htm"&gt;now available in English as well&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt; &lt;hr width="40%" /&gt; &lt;p&gt;Mon nouvel article intitulé &lt;a href="http://www.dotnetguru.org/articles/articlets/linq/Linq.htm"&gt;Exemples de mise en oeuvre de LINQ, DLINQ et XLINQ&lt;/a&gt; a été publié sur DotNetGuru.&lt;br /&gt;Introduction : &lt;i&gt;Cet article met l'accent sur l'utilisation de LINQ, DLINQ et XLINQ pour le développement d'applications. Il s'agit uniquement d'un exemple de mise en oeuvre, et non d'une architecture de référence ou d'une utilisation optimale de ces technologies. Le but n'est pas d'expliquer comment fonctionne Linq mais plutôt d'explorer les multiples facettes de Linq au travers de bonnes pratiques.&lt;/i&gt;&lt;/p&gt; &lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=432508" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Source/default.aspx">Source</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>More mappings: Relational Model - Domain Model - Presentation Model</title><link>http://weblogs.asp.net/fmarguerie/archive/2005/01/18/355335.aspx</link><pubDate>Tue, 18 Jan 2005 18:55:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:355335</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=355335</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2005/01/18/355335.aspx#comments</comments><description>A new &lt;a href="http://en.wikipedia.org/wiki/Meme"&gt;meme&lt;/a&gt; is starting to make some buzzing noise.&lt;br /&gt; Paul Wilson started to talk about &lt;A href="http://weblogs.asp.net/pwilson/archive/2004/07/10/179588.aspx"&gt;UI Mapping&lt;/a&gt; in July, and lately more and more people are talking about this concept.&lt;br /&gt; Mats Helander has a complete series on various mappings (&lt;a href="http://www.matshelander.com/Weblog/DisplayLogEntry.aspx?LogEntryID=54"&gt;1&lt;/a&gt;, &lt;a href="http://www.matshelander.com/Weblog/DisplayLogEntry.aspx?LogEntryID=55"&gt;2&lt;/a&gt;, &lt;a href="http://www.matshelander.com/Weblog/DisplayLogEntry.aspx?LogEntryID=56"&gt;3&lt;/a&gt;, and up to 6). Roger Johansson is also talking about the concept and even has a prototype implementation (&lt;a href="http://blogs.wdevs.com/phirephly/archive/2005/01/14/1963.aspx"&gt;1&lt;/a&gt;, &lt;a href="http://blogs.wdevs.com/phirephly/archive/2005/01/15/1978.aspx"&gt;2&lt;/a&gt;, &lt;a href="http://blogs.wdevs.com/phirephly/archive/2005/01/16/1995.aspx"&gt;3&lt;/a&gt;).&lt;br /&gt; Roughly, the idea is to use more mappings than just object-relational mapping, which is used to map your domain objects to a relational database. The first new mapping is between your domain objects and the presentation layer. This means we would have Relational Model &amp;lt;-&amp;gt; Domain Model &amp;lt;-&amp;gt; Presentation Model.&lt;br /&gt; But I won't try to explain the concept, &lt;a href="http://blogs.wdevs.com/phirephly"&gt;Roger Johansson&lt;/a&gt; and &lt;a href="http://www.matshelander.com/Weblog/"&gt;Mats Helander&lt;/a&gt; do this very well on their weblogs.&lt;br /&gt; &lt;br /&gt; This goes towards a more declarative approach, and I think we need it because GUI code is the next pain in the neck after data access - a lot of code for nothing.&lt;br /&gt; No need to say I'll follow this closely and even use it if possible.&lt;br /&gt; &lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=355335" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>Choosing an object-relational mapping tool</title><link>http://weblogs.asp.net/fmarguerie/archive/2004/12/20/327394.aspx</link><pubDate>Mon, 20 Dec 2004 15:59:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:327394</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=327394</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2004/12/20/327394.aspx#comments</comments><description>&lt;p&gt;My new article is available online in French: &lt;a href="http://dotnetguru.org/article.php?sid=518"&gt;Choosing an object-relational mapping tool&lt;/a&gt;.&lt;br /&gt; There is no English version yet, but maybe I'll take the time to translate it. If someone feels like helping...&lt;br /&gt; &lt;font color="#008000"&gt;Update:&lt;/font&gt; this article is now available in &lt;A href="http://weblogs.asp.net/fmarguerie/archive/2005/02/21/377443.aspx"&gt;English&lt;/a&gt; as well.&lt;br /&gt; &lt;/p&gt;&lt;hr width="40%" /&gt;&lt;p&gt;Mon nouvel article est paru sur DotNetGuru : &lt;a href="http://dotnetguru.org/article.php?sid=518"&gt;Choisir un outil de mapping objet-relationnel&lt;/a&gt;.&lt;/p&gt; &lt;blockquote&gt;Difficile d'échapper à l'écriture de code d'accès et de manipulation de données quand on développe une application. Les outils de mapping objet-relationnel se proposent de vous aider. Encore faut-il faire le bon choix... Cet article vous présente les différents critères à étudier avant de faire l'acquisition d'un tel outil.&lt;/blockquote&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=327394" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Tools/default.aspx">Tools</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>How do you see data? table, entity or domain model?</title><link>http://weblogs.asp.net/fmarguerie/archive/2004/12/08/278294.aspx</link><pubDate>Wed, 08 Dec 2004 14:59:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:278294</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=278294</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2004/12/08/278294.aspx#comments</comments><description>Frans Bouma gives a clear presentation of three &lt;A href="http://weblogs.asp.net/fbouma/archive/2004/10/09/240225.aspx"&gt;different ways to see data from an application developer's&amp;nbsp; perspective&lt;/a&gt;. It helps to know where you are, and what the alternatives are.&lt;br /&gt; The three approaches are:&lt;br /&gt; &lt;ol&gt; &lt;li&gt;&lt;a href="../../fbouma/archive/2004/10/09/240225.aspx#tableapproach"&gt;&lt;b&gt;table&lt;/b&gt; approach&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../../fbouma/archive/2004/10/09/240225.aspx#entityapproach"&gt;&lt;b&gt;entity&lt;/b&gt; (Chen/Yourdon) approach&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="../../fbouma/archive/2004/10/09/240225.aspx#domainmodelapproach"&gt;&lt;b&gt;domain model&lt;/b&gt; (Fowler/Evans) approach&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt; I tend to use the entity approach (2), which is most of the time more SOA friendly.&lt;br /&gt; &lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=278294" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>Events, references, garbage collecting, memory leaks and weak delegates</title><link>http://weblogs.asp.net/fmarguerie/archive/2004/07/27/events-references-garbage-collecting-memory-leaks-and-weak-delegates.aspx</link><pubDate>Tue, 27 Jul 2004 15:11:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:198489</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=198489</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2004/07/27/events-references-garbage-collecting-memory-leaks-and-weak-delegates.aspx#comments</comments><description>&lt;p&gt;I was playing with services and containers, as part of my implementation of &lt;a href="http://weblogs.asp.net/fmarguerie/archive/2004/03/09/86536.aspx" mce_href="http://weblogs.asp.net/fmarguerie/archive/2004/03/09/86536.aspx"&gt;Inversion of Control&lt;/a&gt;. All was fine until events came into play.&lt;br&gt;I needed to connect two services through events. Oh, all was working fine:&amp;nbsp;there were no apparent troubles. But under the too calm surface&amp;nbsp;sneaked a dreadful memory leak. Events don't play well with a loosely coupled environment by default. Better be warned.&lt;/p&gt;
&lt;p&gt;This is related to the so-called &lt;a href="http://www.google.com/search?q=%22lapsed+listener%22" mce_href="http://www.google.com/search?q=%22lapsed+listener%22"&gt;"lapsed listener"&lt;/a&gt; problem.&lt;br&gt;Steve Maine has a &lt;a href="http://hyperthink.net/blog/CommentView,guid,0b59471c-c6fc-4ce0-87c1-5da77dc2c4ea.aspx" mce_href="http://hyperthink.net/blog/CommentView,guid,0b59471c-c6fc-4ce0-87c1-5da77dc2c4ea.aspx"&gt;good description of the problem&lt;/a&gt;. I'll copy-paste it here so I don't have to rephrase it:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px;"&gt;
&lt;p&gt;The “lapsed listener” problem occurs when objects subscribe to events and subsequently fall out of scope. The problem is that the event subscriber doesn’t get garbage collected because the event is still holding a reference to it inside of the event’s invocation list. The event subscriber is still considered reachable from the GC’s point of view. As such, it doesn’t get collected until the event goes out of scope (which is usually at application shutdown) which means that the event subscriber is effectively “leaked”. Moral of the story: when you implement an Observer pattern, it’s important to consider the relative lifetime of events and subscribers. If implemented naively, you’ll end up having objects that live a lot longer than you think they should. Unsubscribe() is your friend.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Here is a small schema representing this:&lt;/p&gt;
&lt;p align="center"&gt;&lt;img src="http://madgeek.com/dotnetweblogs/Images/ObserverReference.png" mce_src="http://madgeek.com/dotnetweblogs/Images/ObserverReference.png"&gt;&lt;/p&gt;
&lt;p&gt;In fact, .NET's delegates and events are implementations of the &lt;a href="http://www.dofactory.com/Patterns/PatternObserver.aspx" mce_href="http://www.dofactory.com/Patterns/PatternObserver.aspx"&gt;Observer Design Pattern&lt;/a&gt;. But the current problem is one more&amp;nbsp;reminder that &lt;a href="http://weblogs.asp.net/fmarguerie/archive/2004/06/10/152535.aspx" mce_href="http://weblogs.asp.net/fmarguerie/archive/2004/06/10/152535.aspx"&gt;Design Patterns&amp;nbsp;should not be applied blindly&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you write the following code, you'll see that the&amp;nbsp;object instance gets correctly released and collected:&lt;/p&gt;
&lt;div class="code"&gt;StoopidObject&amp;nbsp;object = new StoopidObject();&lt;br&gt;GC.Collect();&lt;br&gt;GC.WaitForPendingFinalizers();&lt;/div&gt;
&lt;p&gt;If you write the following code instead, although there is no apparent reference kept to the Observer, the Observer instance will not be released:&lt;/p&gt;
&lt;div class="code"&gt;Observer observer = new Observer();&lt;br&gt;Subject subject = new Subject();&lt;br&gt;subject.SomethingHappened += new EventHandler(observer.subject_SomethingHappened);&lt;br&gt;GC.Collect();&lt;br&gt;GC.WaitForPendingFinalizers();&lt;/div&gt;
&lt;p&gt;Guys from around the community came with various solutions. They call them &lt;i&gt;Weak Delegates&lt;/i&gt;. Follow the links to learn more:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strike&gt;&lt;a href="http://weblogs.asp.net/savanness/archive/2004/04/18/115685.aspx" mce_href="http://weblogs.asp.net/savanness/archive/2004/04/18/115685.aspx"&gt;Shawn A. Van Ness&lt;/a&gt;&lt;/strike&gt; 
&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/greg_schechter/archive/2004/05/27/143605.aspx" mce_href="http://blogs.msdn.com/greg_schechter/archive/2004/05/27/143605.aspx"&gt;Greg Schechter&lt;/a&gt;&amp;nbsp;(real case study; schemas will help you to understand the problem) 
&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.interact-sw.co.uk/iangblog/2004/06/06/weakeventhandler" mce_href="http://www.interact-sw.co.uk/iangblog/2004/06/06/weakeventhandler"&gt;Ian Griffiths&lt;/a&gt; and &lt;a href="http://www.seedindustries.com/blog/x/2004_06_01_archive.html#108656795427367272" mce_href="http://www.seedindustries.com/blog/x/2004_06_01_archive.html#108656795427367272"&gt;Xavier Musy&lt;/a&gt; (extensions and improvements)&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;I chose another way because the proposed solutions rely on weak references, and that is not satisfying in my case.&amp;nbsp;With "weak delegates", the observers continue to receive events while not garbage collected. You never know when garbage collecting happens. If you base your developments on weak references, you have to accept the fact that your objects do not disappear immediately.&lt;/p&gt;
&lt;p&gt;I want to prevent the notifications to be received by the observer as soon as it is meant to be disconnected. For that purpose, I ask the observer I'm going to remove to disconnect cleanly from its subjects. For simplicity, I use the Dispose method for this. This is because I know I'll call Dispose() each time I want to get rid of an object, this runs in a specific framework. Another method more explicit to the user could be used instead.&lt;/p&gt;
&lt;p&gt;You can take a look at&amp;nbsp;the &lt;a href="http://madgeek.com/Samples/WeakDelegates.040727.zip" tooltip="linkalert-tip" mce_href="http://madgeek.com/Samples/WeakDelegates.040727.zip"&gt;source code&amp;nbsp;I used for my tests&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;font color="#006600"&gt;Update:&lt;/font&gt; I show &lt;a href="http://weblogs.asp.net/fmarguerie/archive/2009/09/09/forcing-event-unsubscription.aspx" tooltip="linkalert-tip" mce_href="http://weblogs.asp.net/fmarguerie/archive/2009/09/09/forcing-event-unsubscription.aspx"&gt;how to force disconnection&lt;/a&gt; in another post.&lt;br&gt;&lt;font color="#006600"&gt;Update:&lt;/font&gt; I cover the same subject and much more in &lt;a href="http://weblogs.asp.net/fmarguerie/archive/2009/11/03/article-detect-avoid-memory-leaks.aspx" mce_href="http://weblogs.asp.net/fmarguerie/archive/2009/11/03/article-detect-avoid-memory-leaks.aspx"&gt;an article&lt;/a&gt;.&lt;br&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=198489" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Source/default.aspx">Source</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/.NET/default.aspx">.NET</category></item><item><title>Objects and Services</title><link>http://weblogs.asp.net/fmarguerie/archive/2004/07/20/188635.aspx</link><pubDate>Tue, 20 Jul 2004 12:02:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:188635</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=188635</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2004/07/20/188635.aspx#comments</comments><description>&lt;P&gt;Clemens Vasters' post "&lt;A href="http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=8a119c62-2fc1-4409-9ae4-0b250fdb785b"&gt;Rows and Columns + Elements and Attributes is all you need&lt;/A&gt;" initiated an interesting discussion about the place of objects in SOA.&lt;/P&gt;
&lt;P&gt;Does Object Oriented Programing fits with Service Orientation?&lt;BR&gt;Read comments from &lt;A href="http://udidahan.weblogs.us/archives/022415.html"&gt;Udi Dahan&lt;/A&gt;,&amp;nbsp;&lt;A href="http://dotnetjunkies.com/WebLog/seichert/archive/2004/07/08/18665.aspx"&gt;Steve Eichert&lt;/A&gt;, and Jimmy Nilsson(&lt;A href="http://www.jnsk.se/weblog/posts/toclemens.htm"&gt;1&lt;/A&gt; and &lt;A href="http://www.jnsk.se/weblog/posts/toclemens2.htm"&gt;2&lt;/A&gt;), for example.&lt;/P&gt;
&lt;P&gt;In my opinion, the way to work with Entities, Managers, Objects&amp;nbsp;and Services is still not clear. I haven't looked enough at architectures like ShadowFax or FABRIQ to know whether they&amp;nbsp;contain guidance&amp;nbsp;on this.&amp;nbsp;My guess is that we'll have to wait some more time before best practices become clearly defined. Maybe all this is already well settled in the J2EE world?&lt;/P&gt;
&lt;P&gt;I tend to do something similar to what Udi does. One of the open issues I see is "how to share business and validation rules between the Business layer and the Presentation layer?". If the rules are in the Managers, and not in the Entities, how do we use these rules in the Presentation layer?&lt;/P&gt;
&lt;P&gt;Anyway, "encore un pav&amp;#233; dans la mare des &lt;EM&gt;tout-objet&lt;/EM&gt;"...&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=188635" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>Inscriptions Symposium DotNetGuru</title><link>http://weblogs.asp.net/fmarguerie/archive/2004/07/08/177228.aspx</link><pubDate>Thu, 08 Jul 2004 12:47:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:177228</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=177228</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2004/07/08/177228.aspx#comments</comments><description>&lt;P&gt;Les inscriptions sont ouvertes, et le nombre de places et limit&amp;#233;. Qu'on se le dise...&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://www.dotnetguru.org/modules.php?op=modload&amp;amp;name=IncludePage&amp;amp;file=symposium2004"&gt;&lt;IMG src="http://www.dotnetguru.org/evenements/images/smallbannersympo.jpg" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Rendez-vous en octobre.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=177228" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/News/default.aspx">News</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category></item><item><title>Symposium DotNetGuru 2004</title><link>http://weblogs.asp.net/fmarguerie/archive/2004/06/28/167721.aspx</link><pubDate>Mon, 28 Jun 2004 11:59:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:167721</guid><dc:creator>Fabrice Marguerie</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/fmarguerie/rsscomments.aspx?PostID=167721</wfw:commentRss><comments>http://weblogs.asp.net/fmarguerie/archive/2004/06/28/167721.aspx#comments</comments><description>&lt;P&gt;R&amp;#233;servez d&amp;#232;s aujourd'hui votre journ&amp;#233;e du&amp;nbsp;8 octobre !&lt;/P&gt;
&lt;P align=center&gt;&lt;A href="http://www.dotnetguru.org/modules.php?op=modload&amp;amp;name=IncludePage&amp;amp;file=symposium2004"&gt;&lt;IMG src="http://www.dotnetguru.org/evenements/images/smallbannersympo.jpg" border=0&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Au plaisir de vous y retrouver.&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=167721" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/News/default.aspx">News</category><category domain="http://weblogs.asp.net/fmarguerie/archive/tags/Architecture/default.aspx">Architecture</category></item></channel></rss>