Architecture http://blogs.ugidotnet.org/bmatte/category/Architecture.aspx Architecture it-IT Matteo Baglini Subtext Version 2.6.0.0 Expression Blend framework vs CompositeWPF framework http://blogs.ugidotnet.org/bmatte/archive/2008/10/20/expression-blend-framework-vs-compositewpf-framework.aspx <p>Un interessante confronto tra il framework di una WPF Composite Application (<a target="_blank" href="http://www.microsoft.com/expression/products/Overview.aspx?key=blend">Expression Blend</a>) e un framework per creare WPF Composite Application (<a target="_blank" href="http://www.codeplex.com/CompositeWPF">CompositeWPF</a>).</p> <p>Fonte: <a target="_blank" href="http://www.paulstovell.com/blog/expression-framework-versus-composite-wpf">Expression Framework versus Composite WPF</a></p> <div style="margin: 0px; padding: 0px; display: inline; float: none;" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:114d5c6c-4de7-4ce9-8df9-6ae7b3f4b9e6" class="wlWriterEditableSmartContent">Technorati Tag: <a rel="tag" href="http://technorati.com/tags/ExpressionBlend">ExpressionBlend</a>,<a rel="tag" href="http://technorati.com/tags/CompositeWPF">CompositeWPF</a>,<a rel="tag" href="http://technorati.com/tags/WPF">WPF</a>,<a rel="tag" href="http://technorati.com/tags/Windows+Presentation+Foundation">Windows Presentation Foundation</a></div><img src="http://blogs.ugidotnet.org/bmatte/aggbug/94833.aspx" width="1" height="1" /> Matteo Baglini http://blogs.ugidotnet.org/bmatte/archive/2008/10/20/expression-blend-framework-vs-compositewpf-framework.aspx Mon, 20 Oct 2008 21:51:00 GMT http://blogs.ugidotnet.org/bmatte/archive/2008/10/20/expression-blend-framework-vs-compositewpf-framework.aspx#feedback 1 http://blogs.ugidotnet.org/bmatte/comments/commentRss/94833.aspx http://blogs.ugidotnet.org/bmatte/services/trackbacks/94833.aspx Mixin, POCO e INotifyPropertyChanged mito o realt&agrave;? http://blogs.ugidotnet.org/bmatte/archive/2008/08/07/mixin-poco-e-inotifypropertychanged-mito-o-realtagrave.aspx <p>Dopo aver chiesto ad i <a href="http://www.communitydays.it/events/communitydays2008milano.aspx">CDays2008</a> a <a href="http://blogs.ugidotnet.org/topics/Default.aspx">Mauro</a> cosa pensava dei mixin, dopo aver letto i vari post di <a href="http://blogs.ugidotnet.org/pape/archive/2008/07/29/beyond-persistence-ignorance-real-poco.aspx">Andrea</a>, <a href="http://blogs.ugidotnet.org/raffaele/archive/2008/07/29/93561.aspx">Raffaele</a> e <a href="http://blogs.ugidotnet.org/rgm/archive/2008/07/31/93587.aspx">Gian Maria</a> che parlano di POCO e dopo aver letto i due post (<a href="http://www.nablasoft.com/alkampfer/index.php/2008/08/04/implement-inotifypropertychanged-with-dynamic-code-generation/">qui</a> e <a href="http://www.nablasoft.com/alkampfer/index.php/2008/08/04/implement-inotifypropertychanged-with-castledynamicproxy/">qui</a>) nel <a href="http://www.nablasoft.com/alkampfer/">blog inglese</a> di Gian Maria ho deciso di spiegare meglio cosa intendevo con il <a href="http://blogs.ugidotnet.org/pape/archive/2008/07/29/beyond-persistence-ignorance-real-poco.aspx#1384111">mio commento</a> al post di Andrea.</p> <p>Gian Maria mostra due modi diversi per rivolvere il "problema" dell'interfaccia <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx">INotifyPropertyChanged</a> creando proxy a run-time, io avevo risolto il solito problema usando <a href="http://blogs.ugidotnet.org/bmatte/archive/2008/04/16/spring.net-31-spring.aop-aspect-oriented-programming-framework-overview.aspx">Spring.NET AOP</a>. Questo dimostra che come al solito ci sono svariati modi per ottenere il solito risultato.</p> <p>Finita questa piccola anticipazione arrivo al nocciolo del discorso e sparo la mia sentenza...nessuna di queste implementazioni è usabile!! Vi chiederete perchè ed io sono qui per dimostrarvelo. Piccola demo, provate a creare una semplice BindingList&lt;Customer&gt;, aggiungete ad essa un numero imprecisato di Customer-proxaty, agganciate l'evento ListChanged ed in fine provate a modificare la proprietà di un Customer della BindingList...et vualà l'evento non viene scatenato, cosa che dovrebbe accadere se Customer implementasse normalmente INotifyPropertyChanged. </p> <p><a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/bmatte/WindowsLiveWriter/MixinPOCOeINotifyPropertyChanged_14128/init_4.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="127" alt="init" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/bmatte/WindowsLiveWriter/MixinPOCOeINotifyPropertyChanged_14128/init_thumb_1.png" width="244" align="right" border="0" /></a> </p> <p>Quando per la prima volta mi sono trovato davanti a questo problema armato di Reflector sono andato a sbirciare il codice della classe BindingList&lt;T&gt; ed ho trovato l'inghippo. Guardando il codice mostrato nell'immagine vediamo che la seconda linea di codice verifica se il tipo INotifyPropertyChanged è assegnabile dal tipo Customer, questa verifica nel caso di Customer in versione POCO è assolutamente falsa dato che il tipo Customer non sa niente di INotifyPropertyChanged. Per confermare questa teoria mi sono creato un po di test unitari che riproducono il problema, vediamoli. In entrambi i casi di test la creazione del Customer è stata "nascosta" dentro dei metodi Factory dato che non mi interessa mostrarne l'implementazione in questo post. Per prima cosa ho creato due classi Customer la prima implementa INotifyPropertyChanged e la seconda no, però ha le properties marcate come virtual per permettere la creazione del proxy a run-time.  </p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; height: 127px; background-color: #f4f4f4"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> Customer : INotifyPropertyChanged</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 2:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 3:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">event</span> PropertyChangedEventHandler PropertyChanged;</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 4:</span> <span style="color: #0000ff">private</span> Guid id = Guid.NewGuid();</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 5:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">string</span> name;</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 6:</span>  </pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 7:</span> <span style="color: #0000ff">public</span> Guid Id {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 8:</span> get { <span style="color: #0000ff">return</span> id; }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 9:</span> }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 10:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Name {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 11:</span> get { <span style="color: #0000ff">return</span> name; }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 12:</span> set {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 13:</span> <span style="color: #0000ff">if</span> (name != <span style="color: #0000ff">value</span>) {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 14:</span> name = <span style="color: #0000ff">value</span>;</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 15:</span> RaisePropertyChanged(<span style="color: #006080">"Name"</span>);}</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 16:</span> }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 17:</span> }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 18:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> RaisePropertyChanged(<span style="color: #0000ff">string</span> propertyName)</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 19:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 20:</span> <span style="color: #0000ff">if</span> (PropertyChanged != <span style="color: #0000ff">null</span>)</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 21:</span> PropertyChanged(<span style="color: #0000ff">this</span>, <span style="color: #0000ff">new</span> PropertyChangedEventArgs(propertyName));</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 22:</span> }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 23:</span> }</pre> </div> </div> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; height: 119px; background-color: #f4f4f4"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> CustomerPoco</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 2:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 3:</span> <span style="color: #0000ff">private</span> Guid id = Guid.NewGuid();</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 4:</span>  </pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 5:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">virtual</span> Guid Id {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 6:</span> get { <span style="color: #0000ff">return</span> id; }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 7:</span> }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 8:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">virtual</span> <span style="color: #0000ff">string</span> Name { get; set; }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 9:</span> }</pre> </div> </div> <p>Dopodiché ho creato due metodi di test, uno verifica se il Customer è castabile a INotifyPropertyChanged mentre l'altro verifica se è assegnabile. </p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 1:</span> [Fact]</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 2:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> ShouldBeCompatibleWithTypeINotifyPropertyChanged()</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 3:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 4:</span> Customer customer = CustomerFactory.CreateCustomer();</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 5:</span> (customer <span style="color: #0000ff">is</span> INotifyPropertyChanged).ShouldBeTrue(<span style="color: #006080">"Is not INotifyPropertyChanged"</span>);</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 6:</span> }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 7:</span> [Fact]</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 8:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> ShouldBeAssignableToTypeINotifyPropertyChanged()</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 9:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 10:</span> <span style="color: #0000ff">typeof</span>(INotifyPropertyChanged).IsAssignableFrom(<span style="color: #0000ff">typeof</span>(Customer))</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 11:</span> .ShouldBeTrue(<span style="color: #006080">"INotifyPropertyChanged is not assignable from Customer"</span>);</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 12:</span> }</pre> </div> </div> <p>In questo caso entrabi i test passano perfettamente, proseguiamo eseguendo i soliti test su CustomerPoco:</p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 1:</span> [Fact]</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 2:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> ShouldBeCompatibleWithTypeINotifyPropertyChanged()</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 3:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 4:</span> CustomerPoco customer = CustomerFactory.CreateCustomerPoco();</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 5:</span> (customer <span style="color: #0000ff">is</span> INotifyPropertyChanged).ShouldBeTrue(<span style="color: #006080">"Is not INotifyPropertyChanged"</span>);</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 6:</span> }</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 7:</span> [Fact]</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 8:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> ShouldBeAssignableToTypeINotifyPropertyChanged()</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 9:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 10:</span> <span style="color: #0000ff">typeof</span>(INotifyPropertyChanged).IsAssignableFrom(<span style="color: #0000ff">typeof</span>(CustomerPoco))</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 11:</span> .ShouldBeTrue(<span style="color: #006080">"INotifyPropertyChanged is not assignable from CustomerPoco"</span>);</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 12:</span> }</pre> </div> </div> <p>In quest'ultimo caso il primo test passa mentre il secondo no distruggendo i nostri sogni di sviluppatore lazy che non doveva più implementare INotifyPropertyChanged <img alt="smile_wink" src="http://spaces.live.com/rte/emoticons/smile_wink.gif" />. Ecco perchè nel mio commento al post di Andrea ho detto: "...perchè il framework di per se non conosce i mixin quindi è stato scritto "bloccandone" l'uso". Problemi simili sono risolvibili con diversi hack, basta barare con un po di reflection dopo aver istanziato la collection:</p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; height: 107px; background-color: #f4f4f4"> <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 1:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> EditRaiseItemChangedEvents(BindingList&lt;Customer&gt; list)</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 2:</span> {</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 3:</span> FieldInfo _fi = list.GetType().GetField(<span style="color: #006080">"raiseItemChangedEvents"</span>, BindingFlags.NonPublic | BindingFlags.Instance);</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 4:</span> <span style="color: #0000ff">bool</span> raiseItemChangedEvents = (<span style="color: #0000ff">bool</span>)_fi.GetValue(list);</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060"> 5:</span> <span style="color: #0000ff">if</span> (!raiseItemChangedEvents) _fi.SetValue(list, <span style="color: #0000ff">true</span>);</pre> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060"> 6:</span> }</pre> </div> </div> <p>ed il gioco è fatto ma in generale hanno un costo troppo alto, sia di implementazione che di manutenzione dato che il problema non si presenta solo per collection come la BindingList ma anche per controlli come il BindingSource delle WindowsForm.</p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c9fbb01c-61ed-423c-bc46-f470ded5533e" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tag: <a href="http://technorati.com/tags/Mixin" rel="tag">Mixin</a>,<a href="http://technorati.com/tags/AOP" rel="tag">AOP</a>,<a href="http://technorati.com/tags/INotifyPropertyChanged" rel="tag">INotifyPropertyChanged</a>,<a href="http://technorati.com/tags/POCO" rel="tag">POCO</a></div><img src="http://blogs.ugidotnet.org/bmatte/aggbug/93639.aspx" width="1" height="1" /> Matteo Baglini http://blogs.ugidotnet.org/bmatte/archive/2008/08/07/mixin-poco-e-inotifypropertychanged-mito-o-realtagrave.aspx Thu, 07 Aug 2008 00:54:54 GMT http://blogs.ugidotnet.org/bmatte/archive/2008/08/07/mixin-poco-e-inotifypropertychanged-mito-o-realtagrave.aspx#feedback 8 http://blogs.ugidotnet.org/bmatte/comments/commentRss/93639.aspx http://blogs.ugidotnet.org/bmatte/services/trackbacks/93639.aspx Object Oriented Design Principles e Refactoring http://blogs.ugidotnet.org/bmatte/archive/2008/07/11/object-oriented-design-principles-e-refactoring.aspx <p>Nella sessione <a href="http://www.communitydays.it/events/communitydays2008milano/tut301.aspx">Realizzare applicazioni estendibili e configurabili</a> di <a href="http://blogs.ugidotnet.org/topics/Default.aspx">Mauro</a> si è parlato prima di tutto dei principi di design che permettono di rendere una applicazione estendibile e come migliorare tale design grazie al refatoring. A sessione finita mi sono soffermato fuori dalla sala con Mauro a discutere di come queste pratiche siano fondamentali per non rendere la nostra applicazione un monolite e come il TDD può aiutare a disegnare il proprio software rispettando i principi di design. Quindi mi sono deciso a scrivere questo post per fornite un po di risorse utili sull'argomento. Naturalmente questa lista pretende solo di far venire l'acquolina in bocca al lettore e non di essere totalmente completa. Per finire ci tengo a ricordare a tutti che prima di farsi idee positive o negative su qualsiasi argomento bisogna mettere mano al codice e provare, provare, provare!!!</p> <h3>Object Oriented Design Principles</h3> <p>Webcast di Riccardo Golia della serie Aspire Architect (<a href="http://msdn.microsoft.com/it-it/cc296071.aspx">prima</a> e <a href="http://msdn.microsoft.com/it-it/cc296074.aspx">seconda</a>): <a href="http://blogs.aspitalia.com/rickyvr/post1953/Webcast-Design-Principles.aspx">Post (blog di Riccardo Golia)</a>, <a href="http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?culture=it-IT&amp;EventID=1032325344&amp;CountryCode=IT">WebCast su MSDN</a>, <a href="http://www.guisa.org/files/folders/aspire_architect_2006/entry672.aspx">Slide (su Guisa)</a>, <a href="http://www.guisa.org/files/folders/aspire_architect_2006/entry671.aspx">Codice di esempio (su Guisa)</a> . </p> <p>Articoli di Jeremy D. Miller : <a href="http://msdn.microsoft.com/en-us/magazine/cc546578.aspx">Patterns in Practice - The Open Closed Principle (su MSDN Magazine)</a>, <a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/09/28/just-some-little-fundamental-things-to-help-you-codebetter.aspx">Just some little things to help you CodeBetter</a>, <a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/01/08/Orthogonal-Code.aspx">Orthogonal Code</a>, <a href="http://codebetter.com/blogs/jeremy.miller/archive/2005/11/07/134359.aspx">Using the Chain of Responsibility Pattern</a>, <a href="http://codebetter.com/blogs/jeremy.miller/archive/2006/12/06/On-Writing-Maintainable-Code.aspx">On Writing Maintainable Code</a>, <a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/10/31/be-not-afraid-of-the-visitor-the-big-bad-composite-or-their-little-friend-double-dispatch.aspx">Be not afraid of the Visitor Pattern, the big, bad Composite Pattern, or their little friend Double Dispatch</a> . </p> <p>Articoli (in formato PDF) sul sito Object Mentor : <a href="http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf">Principles and Patterns</a>, <a href="http://www.objectmentor.com/resources/articles/srp.pdf">The Single Responsibility Principle</a>, <a href="http://www.objectmentor.com/resources/articles/ocp.pdf">The Open Closed Principle</a>, <a href="http://www.objectmentor.com/resources/articles/lsp.pdf">The Liskov Substitution Principle</a>, <a href="http://www.objectmentor.com/resources/articles/isp.pdf">The Interface Segregation Principle</a>, <a href="http://www.objectmentor.com/resources/articles/dip.pdf">The Dependency Inversion Principle</a> .</p> <p>Articoli sul sito OODesign.com : <a href="http://www.oodesign.com/design-principles.html">Design Principles</a></p> <p>Articolo di Ayende (Oren Eini): <a href="http://msdn.microsoft.com/en-us/library/aa973811.aspx">Inversion of Control and Dependency Injection: Working with Windsor Container</a></p> <h3>Refactoring</h3> <p>Articoli e Screencasr di Jimmy Bogard : <a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/17/separation-of-concerns-how-not-to-do-it.aspx">Separation of Concerns - how not to do it</a>, <a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/19/separation-of-concerns-by-example-part-1.aspx">Part 1</a>, <a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/24/separation-of-concerns-by-example-part-2.aspx">Part 2</a>, <a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/06/26/separation-of-concerns-by-example-part-3.aspx">Part 3</a>, <a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/07/10/separation-of-concerns-by-example-part-4.aspx">Part 4</a>, <a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2008/05/06/pablotv-eliminating-static-dependencies-screencast.aspx">PabloTV: Eliminating static dependencies screencast</a></p> <p>Articoli su Wikipedia e WikiUGIdotNET: <a href="http://en.wikipedia.org/wiki/Refactoring">Code <em>refactoring</em></a>, <a href="http://wiki.ugidotnet.org/default.aspx/UGIdotNETWiki/Refactoring.html"><em>Refactoring</em></a></p> <p>Catalogo delle operazioni di refactorign: <a href="http://www.refactoring.com/catalog/index.html">Refactorings in Alphabetical Order</a></p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5b597a0a-dd24-4e1e-981f-e19aec15ba45" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tag: <a href="http://technorati.com/tags/OOP" rel="tag">OOP</a>,<a href="http://technorati.com/tags/OOD" rel="tag">OOD</a>,<a href="http://technorati.com/tags/Refactoring" rel="tag">Refactoring</a></div><img src="http://blogs.ugidotnet.org/bmatte/aggbug/93360.aspx" width="1" height="1" /> Matteo Baglini http://blogs.ugidotnet.org/bmatte/archive/2008/07/11/object-oriented-design-principles-e-refactoring.aspx Fri, 11 Jul 2008 13:35:50 GMT http://blogs.ugidotnet.org/bmatte/archive/2008/07/11/object-oriented-design-principles-e-refactoring.aspx#feedback 2 http://blogs.ugidotnet.org/bmatte/comments/commentRss/93360.aspx http://blogs.ugidotnet.org/bmatte/services/trackbacks/93360.aspx YouTube Architecture http://blogs.ugidotnet.org/bmatte/archive/2007/08/24/youtube-architecture.aspx <p>All'edizione 2007 della <em><a href="http://www.google.com/events/scalability_seattle/" target="_blank">Seattle Conference on Scalability</a></em> è stata presentata l'architettura di YouTube. Su <a href="http://video.google.com/" target="_blank">Google Video</a> (strano vero?? <img alt="smile_wink" src="http://spaces.live.com/rte/emoticons/smile_wink.gif" />) è stata pubblicata la <a href="http://video.google.com/videoplay?docid=-6304964351441328559" target="_blank">registrazione della presentazione</a>, mentre su <a href="http://highscalability.com/youtube-architecture" target="_blank">highscalability.com</a> è possibile leggere un articolo riassuntivo.</p><img src="http://blogs.ugidotnet.org/bmatte/aggbug/87925.aspx" width="1" height="1" /> Matteo Baglini http://blogs.ugidotnet.org/bmatte/archive/2007/08/24/youtube-architecture.aspx Fri, 24 Aug 2007 13:13:33 GMT http://blogs.ugidotnet.org/bmatte/archive/2007/08/24/youtube-architecture.aspx#feedback 1 http://blogs.ugidotnet.org/bmatte/comments/commentRss/87925.aspx http://blogs.ugidotnet.org/bmatte/services/trackbacks/87925.aspx Video Model View Presenter http://blogs.ugidotnet.org/bmatte/archive/2007/07/02/84322.aspx <p>Sono disponibili a <a target="_blank" href="http://polymorphicpodcast.com/shows/mv-patterns/">questa pagina</a> un insieme di screencast e podcast sul Pattern Model View Presenter.</p> Technorati tags: <a rel="tag" href="http://technorati.com/posts/tag/Model+View+Presenter">Model View Presenter</a>, <a rel="tag" href="http://technorati.com/tag/MVP">MVP</a><img src="http://blogs.ugidotnet.org/bmatte/aggbug/84322.aspx" width="1" height="1" /> Matteo Baglini http://blogs.ugidotnet.org/bmatte/archive/2007/07/02/84322.aspx Mon, 02 Jul 2007 20:29:00 GMT http://blogs.ugidotnet.org/bmatte/archive/2007/07/02/84322.aspx#feedback http://blogs.ugidotnet.org/bmatte/comments/commentRss/84322.aspx http://blogs.ugidotnet.org/bmatte/services/trackbacks/84322.aspx Video Presenter First http://blogs.ugidotnet.org/bmatte/archive/2007/06/30/84118.aspx <p>Su <a target="_blank" href="http://www.arcast.tv">ARCast.tv</a> sono stati pubblicati tre video, fatti dal team di <a href="http://atomicobject.com/">Atomic Object</a>, che parlano del Pattern <a href="http://atomicobject.com/pages/Presenter+First">Presenter First</a>, specializzazione del noto <a href="http://msdn.microsoft.com/msdnmag/issues/06/08/DesignPatterns/default.aspx">Model View Presenter (MVP)</a>.</p> <li><a href="http://channel9.msdn.com/ShowPost.aspx?PostID=312305">Presenter First Pattern (Part 1)</a> </li> <li><a href="http://channel9.msdn.com/ShowPost.aspx?PostID=313257">Presenter First Pattern (Part 2)</a> </li> <li><a href="http://channel9.msdn.com/ShowPost.aspx?PostID=317581">Presenter First Pattern (Part 3)</a> </li> <p>Technorati tags: <a rel="tag" href="http://technorati.com/posts/tag/Presenter+First">Presenter First</a>, <a rel="tag" href="http://technorati.com/tag/MVP">MVP</a></p><img src="http://blogs.ugidotnet.org/bmatte/aggbug/84118.aspx" width="1" height="1" /> Matteo Baglini http://blogs.ugidotnet.org/bmatte/archive/2007/06/30/84118.aspx Sat, 30 Jun 2007 09:59:00 GMT http://blogs.ugidotnet.org/bmatte/archive/2007/06/30/84118.aspx#feedback 4 http://blogs.ugidotnet.org/bmatte/comments/commentRss/84118.aspx http://blogs.ugidotnet.org/bmatte/services/trackbacks/84118.aspx Life between the Domain Model and the Service Layer (cit.) http://blogs.ugidotnet.org/bmatte/archive/2007/05/15/78257.aspx <p>Citanto il nome della sessione tenuta da <a target="_blank" href="http://blogs.ugidotnet.org/pape">Andrea</a> al <a target="_blank" href="http://www.ugidotnet.org/workshops/workshops_detail.aspx?ID=9ed3a5e7-a69c-4258-af7b-6ec3a8bcd025">Workshop "Architecture Days"</a> volevo consigliare la lettura di due post che trattano questo argomento:</p> <p><a target="_blank" href="http://www.ayende.com/Blog/archive/2007/02/27/Entities-Services-and-what-goes-between-them.aspx">Entities, Services and what goes between them...</a> </p> <p><a target="_blank" href="http://www.ayende.com/Blog/archive/2007/03/08/Aggregates-Services-and-Entities.aspx">Aggregates, Services and Entities</a></p> Technorati tags: <a rel="tag" href="http://technorati.com/posts/tag/Domain Model">Domain Model</a>, <a rel="tag" href="http://technorati.com/tag/Service Layer">Service Layer</a><img src="http://blogs.ugidotnet.org/bmatte/aggbug/78257.aspx" width="1" height="1" /> Matteo Baglini http://blogs.ugidotnet.org/bmatte/archive/2007/05/15/78257.aspx Tue, 15 May 2007 13:14:00 GMT http://blogs.ugidotnet.org/bmatte/archive/2007/05/15/78257.aspx#feedback http://blogs.ugidotnet.org/bmatte/comments/commentRss/78257.aspx http://blogs.ugidotnet.org/bmatte/services/trackbacks/78257.aspx