<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1080242216982789373</id><updated>2024-08-29T21:05:38.993+02:00</updated><category term="Nhibernate"/><category term="Silverlight"/><category term="DDD"/><category term="Autofac"/><category term="DI"/><category term="IoC"/><category term="MVVM"/><category term="WCF"/><category term="XAML"/><category term="ASP.NET MVC"/><category term="Anemic Domain Model"/><category term="CQRS"/><category term="Castle Windsor"/><category term="CouchDB"/><category term="DDDD"/><category term="Entity"/><category term="EventListener"/><category term="JSON"/><category term="MVC"/><category term="MongoDB"/><category term="Multi-language"/><category term="MySQL"/><category term="Ninject"/><category term="NoSQL"/><category term="SoftDelete"/><category term="Spring.NET"/><category term="Stateless Session"/><category term="StructureMap"/><category term="Unity"/><category term="ValueObject"/><category term="WCF RIA Services"/><category term="WPF"/><category term="Web"/><category term="XML"/><category term="bulk data"/><category term="dynamic resource"/><category term="pattern"/><title type='text'>Software Development</title><subtitle type='html'>Experience sharing</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-2070659791160153613</id><published>2011-05-16T18:05:00.002+02:00</published><updated>2011-05-16T18:14:37.055+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="DDD"/><category scheme="http://www.blogger.com/atom/ns#" term="MVVM"/><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><category scheme="http://www.blogger.com/atom/ns#" term="WPF"/><category scheme="http://www.blogger.com/atom/ns#" term="XAML"/><title type='text'>Thinking DDD with Patterns - Part 2 -</title><content type='html'>&lt;span xmlns=&#39;&#39;&gt;&lt;p style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;In &lt;a href=&#39;http://mouforum.blogspot.com/2011/05/thinking-ddd-with-patterns-part-1.html&#39;&gt;previous post&lt;/a&gt;, I described the architecture diagram of our project. In this post I will describe the architecture layers. As shown in the &lt;a href=&#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnHBKPgvBMwdZ8lLZE1fSGaP6uSlP5EVrpuUlokaZ6B8ZMcXUMIQxFsbOEsXt6LyRjZ9DhMbmV0bLNthVgQollsHmrIA0e0Lx3Rb0fFK_Ciht8mMZmAmnAy_zIXKyoex1KD-EL-iH7Og/s1600/Architecture.PNG&#39; target=&quot;_blank&quot;&gt;architecture diagram&lt;/a&gt;, our layers are based on the approach DDD (UI, Application, Domain and Infrastructure).&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt;&#39;&gt;&lt;span style=&#39;text-decoration:underline&#39;&gt;&lt;strong&gt;User Interface (Presentation Layer):&lt;/strong&gt;&lt;/span&gt; Responsible for presenting information to the user and interpreting user commands. As shown in the &lt;a href=&#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnHBKPgvBMwdZ8lLZE1fSGaP6uSlP5EVrpuUlokaZ6B8ZMcXUMIQxFsbOEsXt6LyRjZ9DhMbmV0bLNthVgQollsHmrIA0e0Lx3Rb0fFK_Ciht8mMZmAmnAy_zIXKyoex1KD-EL-iH7Og/s1600/Architecture.PNG&#39; target=&quot;_blank&quot;&gt;diagram above&lt;/a&gt;, this layer can be represented by one of the following interfaces:&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;!--&lt;/ol&gt;
--&gt; &lt;ul style=&#39;margin-left: 12pt&#39;&gt;&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;&lt;span &gt;Silverlight or WPF&lt;/span&gt;: &lt;/strong&gt;In this part, you should use the pattern MVVM (Model-View-ViewModel). MVVM offers a flexible way to create applications Silverlight / WPF and allow to reusing of code, simplifying maintenance and testing. It is composed of :&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;&lt;em&gt;View&lt;/em&gt;&lt;/strong&gt;: XAML for WPF or silverlight screens&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;&lt;em&gt;ViewModel&lt;/em&gt;&lt;/strong&gt;: relation between the view and model&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;&lt;em&gt;Model&lt;/em&gt;&lt;/strong&gt;: represents the entities and the business code on the server side.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMeUgpMI9hTcmP9unC4Ud8Y6urR4FB9vyASNiVGUijF2K44V9bAQ7r4OeT_7O7CH1FG3uTKs9oXTR8h4XjTXW433qDmYs7XGTSX2MiIk0c9aA12wlyJ1wU_gH9e6sSJwGvwxJHsi-fw/s1600/mvvm.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; width=&quot;327&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMeUgpMI9hTcmP9unC4Ud8Y6urR4FB9vyASNiVGUijF2K44V9bAQ7r4OeT_7O7CH1FG3uTKs9oXTR8h4XjTXW433qDmYs7XGTSX2MiIk0c9aA12wlyJ1wU_gH9e6sSJwGvwxJHsi-fw/s400/mvvm.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;/p&gt;&lt;ul style=&#39;margin-left: 12pt&#39;&gt;&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;span &gt;&lt;strong&gt;ASP.NET MVC&lt;/strong&gt;&lt;/span&gt;: As its name implies, the pattern used here is the MVC (Model-View-Controller).&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;&lt;em&gt;Controller&lt;/em&gt;&lt;/strong&gt;: Allows you to manage user interaction, working with the model and, finally, select the view that will allow rendering the user interface.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;&lt;em&gt;View&lt;/em&gt;&lt;/strong&gt;: display made ​​in ASP engine or Razor&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;&lt;em&gt;Model&lt;/em&gt;&lt;/strong&gt;: represents the entities and the business code on the server side.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM7i2TVcxMWCYe0AgbB9mj2g-QcjiOQRSER6UwbS8Jm3Ac9Ons55wpXtZ7kpwkc2kmPF4mdoWKQqsa2M0519vpLnAHqg7JUiJ-yz8ti3fec8cRLxbDkoNRC4pWT5_gHkgu84-wg9PEew/s1600/mvc.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;216&quot; width=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM7i2TVcxMWCYe0AgbB9mj2g-QcjiOQRSER6UwbS8Jm3Ac9Ons55wpXtZ7kpwkc2kmPF4mdoWKQqsa2M0519vpLnAHqg7JUiJ-yz8ti3fec8cRLxbDkoNRC4pWT5_gHkgu84-wg9PEew/s400/mvc.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt; &lt;/p&gt;&lt;ul style=&#39;margin-left: 12pt&#39;&gt;&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;span &gt;&lt;strong&gt;ASP.NET Webform&lt;/strong&gt;&lt;/span&gt;: It doesn&#39;t follow any pattern. It is the strong coupling between the view and the code behind. Additional work is needed from the entire team to reduce the maximum possible code behind.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;p style=&#39;text-align: justify&#39;&gt;&lt;br /&gt;
 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;!--&lt;ol&gt;--&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;span style=&#39;text-decoration:underline&#39;&gt;&lt;strong&gt;Application layer&lt;/strong&gt;:&lt;/span&gt; This is a thin layer which coordinates the application activity. It doesn&#39;t contain business logic. It doesn&#39;t hold  the  state  of  the  business  objects,  but  it  can  hold the state of an application task progress..&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt;&#39;&gt;&lt;span style=&#39;text-decoration:underline&#39;&gt;&lt;strong&gt;Domain layer&lt;/strong&gt;:&lt;/span&gt; This layer contains the information about the domain. This is the heart of business software. The state of business objects is held here. Persistence of business objects and possibly their state is delegated to the infrastructure layer.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt; &#39;&gt;&lt;span style=&#39;text-decoration:underline&#39;&gt;&lt;strong&gt;Infrastructure Layer&lt;/strong&gt;:&lt;/span&gt; This layer acts as a supporting library for all the other layers. It provides communication between layers, implements the persistence of business objects contains supporting libraries for UI layer.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;p style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;color:black; font-family:Consolas; font-size:10pt&#39;&gt;Other than main layers, I added two needed libraries:&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;WCF service&lt;/strong&gt;: exposes the necessary contracts for the UI layer.&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div style=&#39;text-align: justify&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;strong&gt;UTILS&lt;/strong&gt;: It is a utility containing common code for any generic solution&lt;strong&gt;.&lt;br /&gt;
&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p style=&#39;text-align: justify; background: white&#39;&gt;&lt;span style=&#39;color:#222222&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;In next post, I will describe components used and how to create our project with VS 2010…&lt;/span&gt;&lt;span style=&#39;font-family:Verdana; font-size:9pt&#39;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/2070659791160153613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/05/thinking-ddd-with-patterns-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2070659791160153613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2070659791160153613'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/05/thinking-ddd-with-patterns-part-2.html' title='Thinking DDD with Patterns - Part 2 -'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQMeUgpMI9hTcmP9unC4Ud8Y6urR4FB9vyASNiVGUijF2K44V9bAQ7r4OeT_7O7CH1FG3uTKs9oXTR8h4XjTXW433qDmYs7XGTSX2MiIk0c9aA12wlyJ1wU_gH9e6sSJwGvwxJHsi-fw/s72-c/mvvm.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-7844602481434392779</id><published>2011-05-11T18:57:00.005+02:00</published><updated>2011-05-16T18:12:35.922+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CQRS"/><category scheme="http://www.blogger.com/atom/ns#" term="DDD"/><category scheme="http://www.blogger.com/atom/ns#" term="DDDD"/><category scheme="http://www.blogger.com/atom/ns#" term="IoC"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC"/><category scheme="http://www.blogger.com/atom/ns#" term="MVVM"/><category scheme="http://www.blogger.com/atom/ns#" term="NoSQL"/><title type='text'>Thinking DDD with Patterns - Part 1 -</title><content type='html'>&lt;span xmlns=&#39;&#39;&gt;&lt;p style=&#39;text-align: justify; margin-left: 36pt&#39;&gt;&lt;span style=&#39;color:black; font-family:Consolas; font-size:10pt&#39;&gt;In this post, I will describe how to create a project using DDD approach and few patterns such as MVVM, MVC and IoC. In future posts, I will describe how create other projects using CQRS (DDDD) architecture.&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;p style=&#39;text-align: justify; margin-left: 36pt&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;span style=&#39;color:black&#39;&gt;Our project is a simply scrum tool. For those who are new to Scrum, &lt;a href=&#39;http://www.infoq.com/news/2006/11/scrum-in-five-minutes&#39; target=&quot;_blank&quot; &gt;&quot;Scrum in FiveMinutes - Executive Summary&quot;&lt;/a&gt;&lt;/span&gt;&lt;span style=&#39;color:black&#39;&gt; serves as a canon useful introduction. The project is to manage Scrum Task Board. To understand the needs of the project, I invite you to take a look at this &lt;a href=&#39;http://www.mountaingoatsoftware.com/scrum/task-boards&#39; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&lt;/span&gt;&lt;span style=&#39;color:black&#39;&gt;. The project objective is not to replace cork board hung on the wall. It is rather to keep a copy of the daily scrum progress. &lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&#39;text-align: justify; margin-left: 36pt&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;Starting by describe global architecture project :&lt;strong&gt;&lt;br /&gt;
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnHBKPgvBMwdZ8lLZE1fSGaP6uSlP5EVrpuUlokaZ6B8ZMcXUMIQxFsbOEsXt6LyRjZ9DhMbmV0bLNthVgQollsHmrIA0e0Lx3Rb0fFK_Ciht8mMZmAmnAy_zIXKyoex1KD-EL-iH7Og/s1600/Architecture.PNG&quot; target=&quot;_blank&quot; imageanchor=&quot;1&quot; style=&quot;margin-left:1em; margin-right:1em&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; width=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnHBKPgvBMwdZ8lLZE1fSGaP6uSlP5EVrpuUlokaZ6B8ZMcXUMIQxFsbOEsXt6LyRjZ9DhMbmV0bLNthVgQollsHmrIA0e0Lx3Rb0fFK_Ciht8mMZmAmnAy_zIXKyoex1KD-EL-iH7Og/s400/Architecture.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p style=&#39;text-align: justify; margin-left: 36pt&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;&lt;span style=&#39;color:black&#39;&gt;Our architecture &lt;/span&gt;is based on the &lt;a href=&#39;http://domaindrivendesign.org&#39; target=&quot;_blank&quot;&gt;Domain Driven Design&lt;/a&gt; approach. DDD is an approach to software development for complex needs. Firstly, DDD does not a new concept: it is neither a method nor a technology. The Domain Driven Design is &quot;thinking&quot;. It is a set of &quot;best practices&quot; to reconcile art and technology in the software design. &lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;p style=&#39;text-align: justify; margin-left: 36pt&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;Indeed, in the DDD, the business (Domain) that will not drive but inspire development. The main concept of DDD is that, whatever the implementation, it must reflect the business (Customer Requirements). &lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;p style=&#39;text-align: justify; margin-left: 36pt&#39;&gt;&lt;span lang=EN-US style=&#39;font-size:10.0pt;font-family:Wingdings;
mso-ascii-font-family:Consolas;mso-hansi-font-family:Consolas;mso-bidi-font-family:
Consolas;mso-ansi-language:EN-US;mso-char-type:symbol;mso-symbol-font-family:
Wingdings&#39;&gt;&lt;span style=&#39;mso-char-type:symbol;mso-symbol-font-family:Wingdings&#39;&gt;è&lt;/span&gt;&lt;/span&gt;&lt;span style=&#39;font-family:Consolas&#39;&gt;&lt;strong&gt;&quot;It should be possible to read the code, understand the business&quot;.&lt;br /&gt;
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&#39;text-align: justify; margin-left: 36pt&#39;&gt;&lt;span style=&#39;font-family:Consolas; font-size:10pt&#39;&gt;In &lt;a href=&#39;http://mouforum.blogspot.com/2011/05/thinking-ddd-with-patterns-part-2.html&#39;&gt;next post&lt;/a&gt;, I will describe the architecture layers…&lt;br /&gt;
&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/7844602481434392779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/05/thinking-ddd-with-patterns-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/7844602481434392779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/7844602481434392779'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/05/thinking-ddd-with-patterns-part-1.html' title='Thinking DDD with Patterns - Part 1 -'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnHBKPgvBMwdZ8lLZE1fSGaP6uSlP5EVrpuUlokaZ6B8ZMcXUMIQxFsbOEsXt6LyRjZ9DhMbmV0bLNthVgQollsHmrIA0e0Lx3Rb0fFK_Ciht8mMZmAmnAy_zIXKyoex1KD-EL-iH7Og/s72-c/Architecture.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-2111184673492769676</id><published>2011-05-11T11:23:00.002+02:00</published><updated>2011-05-11T14:21:59.830+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CouchDB"/><category scheme="http://www.blogger.com/atom/ns#" term="MongoDB"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><title type='text'>MongoDB vs CouchDB vs MySQL</title><content type='html'>Here is a simple comparison between NoSQL ( MongoDB, CouchDB) and RDBMS (MySQL) :&lt;br /&gt;
&lt;span xmlns=&#39;&#39;&gt;&lt;div&gt;&lt;table border=&#39;0&#39; style=&#39;border-collapse:collapse&#39;&gt;&lt;colgroup&gt;&lt;col style=&#39;width:173px&#39;/&gt;&lt;col style=&#39;width:134px&#39;/&gt;&lt;col style=&#39;width:132px&#39;/&gt;&lt;col style=&#39;width:132px&#39;/&gt;&lt;/colgroup&gt;&lt;tbody valign=&#39;top&#39;&gt;
&lt;tr style=&#39;background: #f0f0f0&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  solid #cccccc 0.75pt; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:#003366; font-size:10pt&#39;&gt;&lt;strong&gt; &lt;/strong&gt;&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  solid #cccccc 0.75pt; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:#003366; font-size:10pt&#39;&gt;&lt;strong&gt;MongoDB&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  solid #cccccc 0.75pt; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:#003366; font-size:10pt&#39;&gt;&lt;strong&gt;CouchDB&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  solid #cccccc 0.75pt; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:#003366; font-size:10pt&#39;&gt;&lt;strong&gt;MySQL&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Data Model &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Document-Oriented&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Document-Oriented&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Relational&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Licence&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;AGPL&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Apache&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;GPL&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Large Objects (Files) &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;&lt;span style=&#39;color:black&#39;&gt;Yes (&lt;/span&gt;GridFS&lt;span style=&#39;color:black&#39;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes (attachments)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;blobs&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Replication &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Master-slave&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Master-master&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Master-slave&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Object(row) Storage &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Collection based&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;One large repository&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Table based&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Query Language &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Dynamic; object-based&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;http&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Dynamic; SQL&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Full Text Search&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;No&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;No&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt; background-color:lime&#39;&gt;Yes&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Unicode&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Map and Reduce&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Secondary Indexes &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Atomicity&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Single document&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Single document&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes - advanced&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Interface &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;Native drivers ; REST add-on&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;REST&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Native drivers&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Written in &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;C++&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Erlang&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;C++&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Concurrency Control&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Update in Place&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;MVCC&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Geospatial Indexes &lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;GeoCouch&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;?&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;Transactions&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt; background-color:red&#39;&gt;No&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;Referential integrity&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;No&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;No&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt; background-color:lime&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;Distributed Consistency Model&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Strong consistency.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Eventually consistent&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Strong consistency.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39; vAlign=&#39;middle&#39;&gt;&lt;p&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;Sharding&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt; background-color:lime&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;No&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;No&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&#39;background: white&#39;&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  solid #cccccc 0.75pt; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39; vAlign=&#39;middle&#39;&gt;&lt;p&gt;&lt;span style=&#39;font-size:10pt&#39;&gt;Horizontal scalable&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt&#39;&gt;Yes&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&#39;padding-top: 5px; padding-left: 5px; padding-bottom: 5px; padding-right: 5px; border-top:  none; border-left:  none; border-bottom:  solid #cccccc 0.75pt; border-right:  solid #cccccc 0.75pt&#39;&gt;&lt;p style=&#39;text-align: center&#39;&gt;&lt;span style=&#39;color:black; font-size:10pt; background-color:red&#39;&gt;No&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/2111184673492769676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/05/mongodb-vs-couchdb-vs-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2111184673492769676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2111184673492769676'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/05/mongodb-vs-couchdb-vs-mysql.html' title='MongoDB vs CouchDB vs MySQL'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-7506393903198988295</id><published>2011-05-03T14:49:00.000+02:00</published><updated>2011-05-03T14:49:26.432+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight"/><title type='text'>Debugging and Making a Service Available Across Domain Boundaries in Silverlight Application</title><content type='html'>If you encounter this kind of an error message:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;“An error occurred while trying to make a request to URI ‘http://localhost...’. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place,    or a policy that is unsuitable for SOAP services.  You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. Please see the inner exception for more details“&lt;/blockquote&gt;&lt;br /&gt;
You need to check for Cross-Domain Issues as follows :&lt;br /&gt;
&lt;br /&gt;
If the domain of the application URL is different from the domain of the service URL, you have a cross-domain situation. Access of a service across domains requires that the service have a cross-domain policy file. There are two kinds of cross-domain policy files: Clientaccesspolicy.xml and Crossdomain.xml. &lt;br /&gt;
&lt;br /&gt;
1. &lt;b&gt;ClientAccessPolicy.xml&lt;/b&gt; file: This file is defined by Silverlight. It can be used only granting access to Silverlight applications, however this file provides more granular control over allowed domains.  .  If you want to use this file you should create a clientaccesspolicy.xml file that allows access to the service and save it to the root of the domain where the service is hosted. The following configuration allows access from any other domain to all resources on the current domain.&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;access-policy&gt;
  &lt;cross-domain-access&gt;
    &lt;policy&gt;
      &lt;allow-from http-request-headers=&quot;SOAPAction&quot;&gt;
        &lt;domain uri=&quot;*&quot;/&gt;
      &lt;/allow-from&gt;
      &lt;grant-to&gt;
        &lt;resource path=&quot;/&quot; include-subpaths=&quot;true&quot;/&gt;
      &lt;/grant-to&gt;
    &lt;/policy&gt;
  &lt;/cross-domain-access&gt;
&lt;/access-policy&gt;

&lt;/pre&gt;&lt;br /&gt;
2. &lt;b&gt;Crossdomain.xml&lt;/b&gt; File: This file is defined by Adobe Flash. It can be used if you want your service to grant access to both Adobe and Silverlight application.  If you want to use this file you should create a crossdomain.xml file that contains the following configuration and save it to the root of the domain where the service is hosted. The file must be configured to allow access to the service from any other domain, or it is not recognized by Silverlight 4.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!DOCTYPE cross-domain-policy SYSTEM &quot;http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd&quot;&gt;
&lt;cross-domain-policy&gt;
  &lt;allow-http-request-headers-from domain=&quot;*&quot; headers=&quot;SOAPAction,Content-Type&quot;/&gt;
&lt;/cross-domain-policy&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/7506393903198988295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/05/debugging-and-making-service-available.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/7506393903198988295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/7506393903198988295'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/05/debugging-and-making-service-available.html' title='Debugging and Making a Service Available Across Domain Boundaries in Silverlight Application'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-8239140188724317759</id><published>2011-05-02T12:40:00.002+02:00</published><updated>2011-05-03T14:14:54.501+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight"/><category scheme="http://www.blogger.com/atom/ns#" term="XAML"/><title type='text'>How to get a MouseLeftButtonDown or MouseLeftButtonUp Event from TextBox in Silverlight ?</title><content type='html'>In Silverlight, the event leftclickbutton for textbox control does not work. to solve this problem, simply create the following class:&lt;br /&gt;
&lt;pre class=&quot;brush:csharp&quot;&gt;namespace Utils
{
    public class TextBoxClickable : TextBox
    {
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonDown(e);
            e.Handled = !base.Focus();
        }
        protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonUp(e);
            e.Handled = !base.Focus();
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
Your XAML should define your namespace:&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&lt;usercontrol xmlns:clickable=”clr-namespace:Utils“&gt;
&lt;/pre&gt;And you can use your new clickable TextBox like this:&lt;br /&gt;
&lt;pre class=&quot;brush:xml&quot;&gt;&lt;clickable:TextBoxClickable  x:Name=&quot;txtBox&quot; MouseLeftButtonDown=”txtBox_MouseLeftButtonDown” /&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/8239140188724317759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/05/how-to-get-mouseleftbuttondown-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/8239140188724317759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/8239140188724317759'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/05/how-to-get-mouseleftbuttondown-or.html' title='How to get a MouseLeftButtonDown or MouseLeftButtonUp Event from TextBox in Silverlight ?'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-6079968399349349933</id><published>2011-03-10T11:51:00.000+01:00</published><updated>2011-03-10T12:00:13.016+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Autofac"/><category scheme="http://www.blogger.com/atom/ns#" term="DI"/><category scheme="http://www.blogger.com/atom/ns#" term="Nhibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF"/><category scheme="http://www.blogger.com/atom/ns#" term="Web"/><title type='text'>How to Dependency Injection with NHibernate and Autofac in domain layer ?</title><content type='html'>There are two ways to DI with nhibernate and Autofac in domain layer (Entities) :&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.&lt;/span&gt; You can use directly autofacContainerProvider.Resolve&lt;IRepositoryXYZ&gt;(). &lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Pros: &lt;/span&gt; &lt;br /&gt;- simple and quickly &lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Cons : &lt;/span&gt; &lt;br /&gt;- strong coupling between IoC and Entities&lt;br /&gt;- cannot create unit tests for domain layer &lt;br /&gt;- don&#39;t support with different UI (Wcf, Web, ..)&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.&lt;/span&gt; To resolve these cons, we have implemented this solution :&lt;br /&gt;In Global.asax.cs, in Application_Start add this code after builder.Build() :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;  var builder = new ContainerBuilder();&lt;br /&gt;    builder.RegisterType&amp;lt;SomeDependency&amp;gt;();&lt;br /&gt;    // ... continue registering dependencies...&lt;br /&gt;    // Once you&#39;re done registering things, set the container&lt;br /&gt;    // provider up with your registrations.&lt;br /&gt;    builder.RegisterAssemblyTypes(typeof (ProductEntity).Assembly).InstancePerDependency();&lt;br /&gt;    _containerProvider = new ContainerProvider(builder.Build());&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;Web Application : &lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;Nhibernate.Cfg.Environment.BytecodeProvider &lt;br /&gt;= new AutofacBytecodeProvider&lt;br /&gt;(new ContainerProviderContainer(AutofacContainerProvider)&lt;br /&gt;, new ProxyFactoryFactory()&lt;br /&gt;, new DefaultCollectionTypeFactory());&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;WCF Application :&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;Nhibernate.Cfg.Environment.BytecodeProvider&lt;br /&gt; = new AutofacBytecodeProvider(AutofacContainer&lt;br /&gt;, new ProxyFactoryFactory()&lt;br /&gt;, new DefaultCollectionTypeFactory());&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In nhibernate.cfg.xml you should use this factory :&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&amp;lt;property name=&amp;quot;proxyfactory.factory_class&amp;quot;&amp;gt;NHibernate.ByteCode.Castle.ProxyFactoryFactory&lt;br /&gt;, NHibernate.ByteCode.Castle&amp;lt;/property&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;   and in Entities of domain layer, you should declare the repository interfaces in constructors.</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/6079968399349349933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/03/how-to-dependency-injection-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/6079968399349349933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/6079968399349349933'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/03/how-to-dependency-injection-with.html' title='How to Dependency Injection with NHibernate and Autofac in domain layer ?'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-8241517254637761902</id><published>2011-03-09T11:20:00.000+01:00</published><updated>2011-03-09T11:44:01.618+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bulk data"/><category scheme="http://www.blogger.com/atom/ns#" term="Nhibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="Stateless Session"/><title type='text'>How to bulk insert data with Nhibernate Stateless Session ?</title><content type='html'>With following code we can use NHibernate in bulk data operations, an area where ORM&#39;s traditionally perform pretty badly.  To deal this, we use the nhibernate StatelessSession.&lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&quot;A IStatelessSession has no persistence context associated with it and does not provide many of the higher-level life cycle semantics. In particular, a stateless session does not implement a first-level cache nor interact with any second-level or query cache. It does not implement transactional write-behind or automatic dirty checking.&quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;using (IStatelessSession statelessSession = sessionFactoryHelper.OpenStatelessSession())&lt;br /&gt;{&lt;br /&gt;  using (ITransaction transaction = statelessSession.BeginTransaction())&lt;br /&gt;  {&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      statelessSession.Insert(objEntity);&lt;br /&gt;      transaction.Commit();&lt;br /&gt;      return objEntity;&lt;br /&gt;    }&lt;br /&gt;    catch (Exception ex)&lt;br /&gt;    {&lt;br /&gt;      transaction.Rollback();&lt;br /&gt;      throw ex;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/8241517254637761902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/03/how-to-bulk-insert-data-with-nhibernate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/8241517254637761902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/8241517254637761902'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/03/how-to-bulk-insert-data-with-nhibernate.html' title='How to bulk insert data with Nhibernate Stateless Session ?'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-3363733399662013811</id><published>2011-03-09T10:55:00.000+01:00</published><updated>2011-03-09T11:12:48.772+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EventListener"/><category scheme="http://www.blogger.com/atom/ns#" term="Nhibernate"/><category scheme="http://www.blogger.com/atom/ns#" term="SoftDelete"/><title type='text'>How to Soft Delete with Nhibernate event listener ?</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;1.&lt;/span&gt; First, we need to define the domain specific interface ISoftDeletable to implement on the entities for which we need to keep a permanent record. &lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;public interface ISoftDeletable&lt;br /&gt;{       &lt;br /&gt;      DateTime? DateDelete { set; get; }       &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.&lt;/span&gt; Next, we should create the SoftDeleteEventListener class that inherit from NHibernate.Event.Default.DefaultDeleteEventListener, and simply override the DeleteEntity method. &lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;public class SoftDeleteEventListener : DefaultDeleteEventListener&lt;br /&gt;{&lt;br /&gt;  protected override void DeleteEntity(IEventSource session, object entity,&lt;br /&gt;    EntityEntry entityEntry, bool isCascadeDeleteEnabled,&lt;br /&gt;    IEntityPersister persister, ISet transientEntities)&lt;br /&gt;  {&lt;br /&gt;    if (entity is ISoftDeletable)&lt;br /&gt;    {&lt;br /&gt;      var e = (ISoftDeletable)entity;&lt;br /&gt;      e.DateDelete = DateTime.Now;&lt;br /&gt;&lt;br /&gt;      //CascadeBeforeDelete(session, persister, entity, entityEntry,            transientEntities);&lt;br /&gt;      //CascadeAfterDelete(session, persister, entity, transientEntities);&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;      base.DeleteEntity(session, entity, entityEntry, isCascadeDeleteEnabled,&lt;br /&gt;                persister, transientEntities);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.&lt;/span&gt; Finally, we need to configure the listener with nhibernate :&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;Nhibernate.cfg.Configuration configuration = new Configuration().Configure();&lt;br /&gt;configuration.SetListener(ListenerType.Delete, new SoftDeleteEventListener());&lt;br /&gt;configuration.BuildSessionFactory();&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4.&lt;/span&gt; Now, to hide a deleted data, we define a soft delete filter in mapping file for which we need to keep a permanent record :&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;hibernate-mapping xmlns=&amp;quot;urn:nhibernate-mapping-2.2&amp;quot; ...&amp;gt;&lt;br /&gt;  &amp;lt;class ...&amp;gt;&lt;br /&gt;    &amp;#8230;&lt;br /&gt;     &amp;lt;property name=&amp;quot;DateDelete&amp;quot; column=&amp;quot;DateDelete&amp;quot; type=&amp;quot;DateTime&amp;quot; /&amp;gt;  &lt;br /&gt;     &amp;lt;filter name=&amp;quot;SoftDeleteFilter&amp;quot;&amp;gt; &amp;lt;/filter&amp;gt;&lt;br /&gt;  &amp;lt;/class&amp;gt;  &lt;br /&gt;  &amp;lt;filter-def name=&amp;quot;SoftDeleteFilter&amp;quot; condition=&amp;quot;DateDelete IS NULL&amp;quot;&amp;gt;&lt;br /&gt;  &amp;lt;/filter-def&amp;gt;    &lt;br /&gt;&amp;lt;/hibernate-mapping&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5.&lt;/span&gt; and, in the application_beginrequest, you should enable soft delete filter on the nhibernate session :&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;   nhibernateSession.EnableFilter(&amp;#8220;SoftDeleteFilter&amp;#8221;).Validate();&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/3363733399662013811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/03/how-to-soft-delete-with-nhibernate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/3363733399662013811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/3363733399662013811'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/03/how-to-soft-delete-with-nhibernate.html' title='How to Soft Delete with Nhibernate event listener ?'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-5399139398502499893</id><published>2011-03-08T17:43:00.001+01:00</published><updated>2011-03-09T11:19:08.474+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dynamic resource"/><category scheme="http://www.blogger.com/atom/ns#" term="Multi-language"/><category scheme="http://www.blogger.com/atom/ns#" term="Nhibernate"/><title type='text'>Create Multi-Language domain model (dynamic resource) with Nhibernate and database ?</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWWSQYz_frZt9a6SRYjlVYHw1u-sa26rKYu3SiWOa84C5fGvqJ0wIHyXOpHreyHiovWjBAtvxhvgCE6x56je6P8pRC0BrQpNen6KZ0Q4ummFXeQZ9hvfMnfhWDQbvYLlyY75kcc-rsCw/s1600/nh.PNG&quot;&gt;&lt;img style=&quot;display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 480px; height: 86px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWWSQYz_frZt9a6SRYjlVYHw1u-sa26rKYu3SiWOa84C5fGvqJ0wIHyXOpHreyHiovWjBAtvxhvgCE6x56je6P8pRC0BrQpNen6KZ0Q4ummFXeQZ9hvfMnfhWDQbvYLlyY75kcc-rsCw/s400/nh.PNG&quot; border=&quot;0&quot; alt=&quot;&quot;id=&quot;BLOGGER_PHOTO_ID_5581751724728735394&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.&lt;/span&gt; Create a Culture Filter on one nhibernate mapping file :&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt; &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&amp;gt;  &lt;br /&gt; &amp;lt;hibernate-mapping xmlns=&quot;urn:nhibernate-mapping-2.2&quot; ...&amp;gt;  &lt;br /&gt;  &amp;lt;class ...&amp;gt;  &lt;br /&gt;   ...  &lt;br /&gt;  &amp;lt;/class&amp;gt;   &lt;br /&gt;  &amp;lt;filter-def name=&quot;CultureFilter&quot;&amp;gt;  &lt;br /&gt;    &amp;lt;filter-param name=&quot;CultureCode&quot; type=&quot;System.String&quot; /&amp;gt;  &lt;br /&gt;  &amp;lt;/filter-def&amp;gt;    &lt;br /&gt; &amp;lt;/hibernate-mapping&amp;gt;     &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.&lt;/span&gt; Declare the following tag of culture code in the mapping files related to the language table :&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;hibernate-mapping ...&amp;gt;&lt;br /&gt;    &amp;lt;class name=&amp;quot;ProductTypeCulture&amp;quot; table=&amp;quot;Product_Type_Culture&amp;quot; mutable=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;       &amp;lt;id name=&amp;quot;ID&amp;quot; column=&amp;quot;ProductTypeId&amp;quot; type=&amp;quot;Int64&amp;quot;  unsaved-value=&amp;quot;0&amp;quot; &amp;gt;&lt;br /&gt;      &amp;lt;generator class=&amp;quot;native&amp;quot; /&amp;gt;&lt;br /&gt;    &amp;lt;/id&amp;gt;&lt;br /&gt;    &amp;lt;property name=&amp;quot;Label&amp;quot; column=&amp;quot;Label&amp;quot; type=&amp;quot;String&amp;quot; not-null=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;property name=&amp;quot;CultureCode&amp;quot; column=&amp;quot;CultureCode&amp;quot; type=&amp;quot;String&amp;quot; not-null=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;    &amp;lt;filter name=&amp;quot;CultureFilter&amp;quot; condition=&amp;quot;:CultureCode = CultureCode&amp;quot;/&amp;gt;     &lt;br /&gt;    &amp;lt;/class&amp;gt;&lt;br /&gt;&amp;lt;/hibernate-mapping&amp;gt;  &lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.&lt;/span&gt; In the application_beginrequest, you should enable filter on the nhibernate session :&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt;CultureCode = CultureInfo.CurrentCulture.TwoLetterISOLanguageName;&lt;br /&gt;public string CultureCode&lt;br /&gt;{&lt;br /&gt;    get { return CultureInfo.CurrentCulture.TwoLetterISOLanguageName; }&lt;br /&gt;    set&lt;br /&gt;        {&lt;br /&gt;          nhSession.EnableFilter(&amp;#8220;CultureFilter&amp;#8221;).SetParameter(&amp;#8220;CultureCode&amp;#8221;,value)&lt;br /&gt;          .Validate();&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4.&lt;/span&gt; Now, the entity ProductTypeCulture  should inherit the following class :&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt; public class EntityCulture : Entity&amp;lt;EntityCulture&amp;gt;, ICloneable, IEntityCulture  &lt;br /&gt; {  &lt;br /&gt;   #region Constructors  &lt;br /&gt;   public EntityCulture() {}  &lt;br /&gt;   &lt;br /&gt;   public EntityCulture(string label)  &lt;br /&gt;   {  &lt;br /&gt;     _label = label;  &lt;br /&gt;   }  &lt;br /&gt;   #endregion  &lt;br /&gt;   &lt;br /&gt;   #region Properties  &lt;br /&gt;   private string _label;  &lt;br /&gt;   public virtual string CultureCode { get; set; }  &lt;br /&gt;   public virtual string Label  &lt;br /&gt;   {  &lt;br /&gt;     get { return _label; }  &lt;br /&gt;     set { _label = value; }  &lt;br /&gt;   }  &lt;br /&gt;   #endregion  &lt;br /&gt;   &lt;br /&gt;   #region ICloneable Members  &lt;br /&gt;   public virtual object Clone()  &lt;br /&gt;   {  &lt;br /&gt;     var cloned = new EntityCulture {Label = Label};  &lt;br /&gt;     return cloned;  &lt;br /&gt;   }  &lt;br /&gt;   #endregion  &lt;br /&gt;   &lt;br /&gt;   #region override  &lt;br /&gt;   private int? _oldHashCode;  &lt;br /&gt;   public override bool IsTransient()  &lt;br /&gt;   {  &lt;br /&gt;     return ID.Equals(0) || string.IsNullOrEmpty(CultureCode);  &lt;br /&gt;   }  &lt;br /&gt;   public virtual bool Equals(EntityCulture other)  &lt;br /&gt;   {  &lt;br /&gt;     if (ReferenceEquals(this, other))  &lt;br /&gt;       return true;  &lt;br /&gt;   &lt;br /&gt;     if (other == null || !GetType().Equals(other.GetType()))  &lt;br /&gt;       return false;  &lt;br /&gt;   &lt;br /&gt;     if (!IsTransient() &amp;amp;&amp;amp; !other.IsTransient() &amp;amp;&amp;amp; ID.Equals(other.ID) &amp;amp;&amp;amp;         CultureCode.Equals(other.CultureCode))  &lt;br /&gt;       return true;  &lt;br /&gt;   &lt;br /&gt;     return IsTransient() &amp;amp;&amp;amp; other.IsTransient();  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   public override bool Equals(object obj)  &lt;br /&gt;   {  &lt;br /&gt;     var compareTo = obj as EntityCulture;  &lt;br /&gt;   &lt;br /&gt;     return Equals(compareTo);  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   public override int GetHashCode()  &lt;br /&gt;   {  &lt;br /&gt;     if (_oldHashCode.HasValue)  &lt;br /&gt;       return _oldHashCode.Value;  &lt;br /&gt;   &lt;br /&gt;     if (IsTransient())  &lt;br /&gt;     {  &lt;br /&gt;       _oldHashCode = base.GetHashCode();  &lt;br /&gt;       return _oldHashCode.Value;  &lt;br /&gt;     }  &lt;br /&gt;   &lt;br /&gt;     return ID.GetHashCode() + CultureCode.GetHashCode();  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   public override string ToString()  &lt;br /&gt;   {  &lt;br /&gt;     return GetType().FullName + &quot;#&quot; + ID + &quot;-&quot; + CultureCode;  &lt;br /&gt;   }  &lt;br /&gt;   #endregion  &lt;br /&gt; }  &lt;br /&gt; public interface IEntityCulture  &lt;br /&gt; {  &lt;br /&gt;   string Label { get; set; }  &lt;br /&gt;   object Clone();  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5.&lt;/span&gt; Finally, the entity ProductType should inherit the following class :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;code&gt;&lt;br /&gt; public class EntityMultiLanguage&amp;lt;T, TCulture&amp;gt; : Entity&amp;lt;T&amp;gt;, IEntityMultiLanguage&amp;lt;TCulture&amp;gt; where T : class where TCulture : class, IEntityCulture  &lt;br /&gt; {  &lt;br /&gt;   private IDictionary&amp;lt;string, TCulture&amp;gt; _resources;  &lt;br /&gt;   &lt;br /&gt;   #region IEntityMultiLanguage&amp;lt;TCulture&amp;gt; Members  &lt;br /&gt;   public virtual string Label  &lt;br /&gt;   {  &lt;br /&gt;     get  &lt;br /&gt;     {  &lt;br /&gt;       TCulture res = GetResource();  &lt;br /&gt;       return res != null ? res.Label : null;  &lt;br /&gt;     }  &lt;br /&gt;     set  &lt;br /&gt;     {  &lt;br /&gt;       GetOrCreateResource().Label = value;  &lt;br /&gt;     }  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   public virtual IDictionary&amp;lt;string, TCulture&amp;gt; Resources  &lt;br /&gt;   {  &lt;br /&gt;     get { return _resources ?? new Dictionary&amp;lt;string, TCulture&amp;gt;(); }  &lt;br /&gt;     set { _resources = value; }  &lt;br /&gt;   }  &lt;br /&gt;   #endregion  &lt;br /&gt;   &lt;br /&gt;   protected virtual TCulture GetDefaultResource()  &lt;br /&gt;   {  &lt;br /&gt;   return   Resources.ContainsKey(CultureFilter.DefaultCulture.TwoLetterISOLanguageName)  &lt;br /&gt;       ? Resources[CultureFilter.DefaultCulture.TwoLetterISOLanguageName]  &lt;br /&gt;       : null;  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   protected virtual TCulture GetOrCreateResource()  &lt;br /&gt;   {  &lt;br /&gt;     if (Resources.ContainsKey(CultureFilter.CultureCode))  &lt;br /&gt;       return Resources[CultureFilter.CultureCode];  &lt;br /&gt;   &lt;br /&gt;     var newResource = GetResource().Clone() as TCulture;  &lt;br /&gt;     Resources.Add(CultureFilter.CultureCode, newResource);   &lt;br /&gt;     return newResource;  &lt;br /&gt;   }  &lt;br /&gt;   protected virtual TCulture GetResource()  &lt;br /&gt;   {  &lt;br /&gt;     return Resources.ContainsKey(CultureFilter.CultureCode)  &lt;br /&gt;       ? Resources[CultureFilter.CultureCode]  &lt;br /&gt;       : GetDefaultResource();  &lt;br /&gt;   }  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/5399139398502499893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/03/create-multi-language-domain-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/5399139398502499893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/5399139398502499893'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/03/create-multi-language-domain-model.html' title='Create Multi-Language domain model (dynamic resource) with Nhibernate and database ?'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWWSQYz_frZt9a6SRYjlVYHw1u-sa26rKYu3SiWOa84C5fGvqJ0wIHyXOpHreyHiovWjBAtvxhvgCE6x56je6P8pRC0BrQpNen6KZ0Q4ummFXeQZ9hvfMnfhWDQbvYLlyY75kcc-rsCw/s72-c/nh.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-2874756709572765099</id><published>2011-03-08T15:22:00.000+01:00</published><updated>2011-03-08T17:37:45.088+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DDD"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity"/><category scheme="http://www.blogger.com/atom/ns#" term="ValueObject"/><title type='text'>Generic Entity and Value Object in DDD</title><content type='html'>In the Domain Layer of DDD architecture, it&#39;s necessary to create generic entity and  value object. &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Generic Entity :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;br /&gt;&lt;code&gt;public interface IEntity&amp;lt;t&amp;gt; where T : class&lt;br /&gt;{&lt;br /&gt;    long ID { get; set; }&lt;br /&gt;    bool IsTransient();&lt;br /&gt;    bool Equals(object obj);&lt;br /&gt;    bool Equals(Entity&amp;lt;t&amp;gt; other);&lt;br /&gt;    int GetHashCode();&lt;br /&gt;    string ToString();&lt;br /&gt;}&lt;br /&gt;[Serializable]  &lt;br /&gt; public abstract class Entity : IEntity where T : class  &lt;br /&gt; {  &lt;br /&gt;      private int? _oldHashCode;  &lt;br /&gt;      public virtual long ID { get; set; }  &lt;br /&gt;      public virtual bool IsTransient()  &lt;br /&gt;      {  &lt;br /&gt;           return ID.Equals(0);  &lt;br /&gt;      }  &lt;br /&gt;      public virtual bool Equals(Entity other)  &lt;br /&gt;      {  &lt;br /&gt;           if (ReferenceEquals(this, other))  &lt;br /&gt;                return true;  &lt;br /&gt;           if (other == null || !(other is T))  &lt;br /&gt;                return false;  &lt;br /&gt;           if (!IsTransient() &amp;amp;&amp;amp; !other.IsTransient() &amp;amp;&amp;amp; ID.Equals(other.ID))  &lt;br /&gt;                return true;  &lt;br /&gt;           return IsTransient() &amp;amp;&amp;amp; other.IsTransient();  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      public override bool Equals(object obj)  &lt;br /&gt;      {  &lt;br /&gt;           var compareTo = obj as Entity;  &lt;br /&gt;           return Equals(compareTo);  &lt;br /&gt;      }  &lt;br /&gt;      public override int GetHashCode()  &lt;br /&gt;      {  &lt;br /&gt;           unchecked  &lt;br /&gt;           {          &lt;br /&gt;                if (_oldHashCode.HasValue)  &lt;br /&gt;                     return _oldHashCode.Value;            &lt;br /&gt;                if (IsTransient())  &lt;br /&gt;                {  &lt;br /&gt;                     _oldHashCode = base.GetHashCode();  &lt;br /&gt;                     return _oldHashCode.Value;  &lt;br /&gt;                }  &lt;br /&gt;                return ID.GetHashCode();  &lt;br /&gt;           }  &lt;br /&gt;      }  &lt;br /&gt;      public override string ToString()  &lt;br /&gt;      {  &lt;br /&gt;           return GetType().FullName + &quot;#&quot; + ID;  &lt;br /&gt;      }  &lt;br /&gt;      public static bool operator ==(Entity left, Entity right)  &lt;br /&gt;      {  &lt;br /&gt;           return Equals(left, right);  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      public static bool operator !=(Entity left, Entity right)  &lt;br /&gt;      {  &lt;br /&gt;           return !Equals(left, right);  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Generic ValueObject&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;br /&gt;&lt;code&gt;public interface IValueObject&amp;lt;t&amp;gt; where T : class  &lt;br /&gt; {  &lt;br /&gt;      bool IsTransient();  &lt;br /&gt;      bool Equals(ValueObject&amp;lt;t&amp;gt; other);  &lt;br /&gt;      bool Equals(object obj);  &lt;br /&gt;      int GetHashCode();  &lt;br /&gt;      string ToString();  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt; [Serializable]  &lt;br /&gt; public abstract class ValueObject&amp;lt;t&amp;gt; : IEquatable&amp;lt;t&amp;gt;, IValueObject&amp;lt;t&amp;gt; where T : class  &lt;br /&gt; {  &lt;br /&gt;      private int? _oldHashCode;  &lt;br /&gt;      public abstract bool IsTransient();  &lt;br /&gt;      public virtual bool Equals(T other)  &lt;br /&gt;      {  &lt;br /&gt;           var compareTo = other as ValueObject&amp;lt;t&amp;gt;;  &lt;br /&gt;   &lt;br /&gt;           return Equals(compareTo);  &lt;br /&gt;      }  &lt;br /&gt;      public virtual bool Equals(ValueObject&amp;lt;t&amp;gt; other)  &lt;br /&gt;      {  &lt;br /&gt;           if (ReferenceEquals(this, other))  &lt;br /&gt;                return true;  &lt;br /&gt;   &lt;br /&gt;           if (ReferenceEquals(null, other) || !GetType().Equals(other.GetType()))  &lt;br /&gt;                return false;  &lt;br /&gt;   &lt;br /&gt;           if (!IsTransient() &amp;amp;amp;&amp;amp;amp; !other.IsTransient() &amp;amp;amp;&amp;amp;amp; PropertiesEquals(other))  &lt;br /&gt;                return true;  &lt;br /&gt;   &lt;br /&gt;           return IsTransient() &amp;amp;amp;&amp;amp;amp; other.IsTransient();  &lt;br /&gt;      }  &lt;br /&gt;      public override bool Equals(object obj)  &lt;br /&gt;      {  &lt;br /&gt;           var compareTo = obj as ValueObject&amp;lt;t&amp;gt;;  &lt;br /&gt;   &lt;br /&gt;           return Equals(compareTo);  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      public override int GetHashCode()  &lt;br /&gt;      {  &lt;br /&gt;           unchecked  &lt;br /&gt;           {  &lt;br /&gt;                if (_oldHashCode.HasValue)  &lt;br /&gt;                     return _oldHashCode.Value;  &lt;br /&gt;   &lt;br /&gt;                if (IsTransient())  &lt;br /&gt;                {  &lt;br /&gt;                     _oldHashCode = base.GetHashCode();  &lt;br /&gt;                     return _oldHashCode.Value;  &lt;br /&gt;                }  &lt;br /&gt;   &lt;br /&gt;                return PropertiesGetHashCode();  &lt;br /&gt;           }  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      public override string ToString()  &lt;br /&gt;      {  &lt;br /&gt;           return GetType().FullName;  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      protected abstract bool PropertiesEquals(ValueObject&amp;lt;t&amp;gt; obj);  &lt;br /&gt;      protected abstract int PropertiesGetHashCode();  &lt;br /&gt;   &lt;br /&gt;      public static bool operator ==(ValueObject&amp;lt;t&amp;gt; left, ValueObject&amp;lt;t&amp;gt; right)  &lt;br /&gt;      {  &lt;br /&gt;           return Equals(left, right);  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      public static bool operator !=(ValueObject&amp;lt;t&amp;gt; left, ValueObject&amp;lt;t&amp;gt; right)  &lt;br /&gt;      {  &lt;br /&gt;           return !Equals(left, right);  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;      public static bool IsTransient&amp;lt;tentity&amp;gt;(IEntity&amp;lt;tentity&amp;gt; entity) where TEntity : class  &lt;br /&gt;      {  &lt;br /&gt;           return entity == null || entity.IsTransient();  &lt;br /&gt;      }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Example of Value Object :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%&quot;&gt;&lt;br /&gt;&lt;code&gt;public class Address : ValueObject&amp;lt;address&amp;gt;  &lt;br /&gt; {  &lt;br /&gt;      ...  &lt;br /&gt;      public override bool IsTransient()  &lt;br /&gt;      {  &lt;br /&gt;           return StreetAddress == null &amp;amp;amp;&amp;amp;amp; City == null &amp;amp;amp;&amp;amp;amp; ZipCode == null;  &lt;br /&gt;      }  &lt;br /&gt;   &lt;br /&gt;          protected override bool PropertiesEquals(ValueObject&amp;lt;address&amp;gt; obj)  &lt;br /&gt;          {  &lt;br /&gt;            Address adr = obj as Address;  &lt;br /&gt;            if (adr != null)  &lt;br /&gt;            {  &lt;br /&gt;                   return StreetAddress == adr.StreetAddress &amp;amp;amp;&amp;amp;amp; City == adr.City  &lt;br /&gt;                &amp;amp;amp;&amp;amp;amp; ZipCode == adr.ZipCode;  &lt;br /&gt;            }  &lt;br /&gt;            return false;  &lt;br /&gt;          }  &lt;br /&gt;   &lt;br /&gt;          protected override int PropertiesGetHashCode()  &lt;br /&gt;          {  &lt;br /&gt;            return (StreetAddress ?? string.Empty).GetHashCode() ^ (City ?? string.Empty).GetHashCode()  &lt;br /&gt;                     ^ (ZipCode ?? string.Empty).GetHashCode() ;  &lt;br /&gt;          }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/2874756709572765099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2011/03/generic-entity-and-value-object-in-ddd.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2874756709572765099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2874756709572765099'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2011/03/generic-entity-and-value-object-in-ddd.html' title='Generic Entity and Value Object in DDD'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-6734104155233716601</id><published>2010-02-11T14:48:00.000+01:00</published><updated>2010-02-11T16:13:28.497+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Autofac"/><category scheme="http://www.blogger.com/atom/ns#" term="Castle Windsor"/><category scheme="http://www.blogger.com/atom/ns#" term="DI"/><category scheme="http://www.blogger.com/atom/ns#" term="IoC"/><category scheme="http://www.blogger.com/atom/ns#" term="Ninject"/><category scheme="http://www.blogger.com/atom/ns#" term="Spring.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="StructureMap"/><category scheme="http://www.blogger.com/atom/ns#" term="Unity"/><title type='text'>Inversion of Control (IoC)</title><content type='html'>&lt;a href=&quot;http://martinfowler.com/articles/injection.html#InversionOfControl&quot;&gt;&lt;em&gt;Inversion de contrôle (IoC)&lt;/em&gt;&lt;/a&gt; est une approche dans le développement de logiciels qui favorise la suppression des dépendances entre les classes pour avoir un code plus simple et plus flexible. Autrement dit, c&#39;est de contrôler la dépendance en dehors de la classe, tout en rendant cette dépendance explicite.&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://2.bp.blogspot.com/_N9yFJ1zigLY/S3QegFuDHyI/AAAAAAAAAAM/G2bNbOelq9c/s1600-h/IoC.gif&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 159px;&quot; src=&quot;http://2.bp.blogspot.com/_N9yFJ1zigLY/S3QegFuDHyI/AAAAAAAAAAM/G2bNbOelq9c/s320/IoC.gif&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5437004186782998306&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;L&#39;utilisation de l&#39;IoC et plus particulièrement l&#39;injection de dépendance (DI) est générallement conçu pour créer des applications qui seront plus flexible, uni-testable, simple et facile à maintenir à long terme. Aujourd&#39;hui, il existe plusieurs IoC en .NET. Parmi les principales, on trouve :&lt;a href=&quot;http://www.castleproject.org/container/index.html&quot;&gt;&lt;strong&gt; Castle  Windsor&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, &lt;/strong&gt;&lt;a href=&quot;http://structuremap.sourceforge.net/&quot;&gt;&lt;strong&gt;StructureMap&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, &lt;/strong&gt;&lt;strong&gt;&lt;a href=&quot;http://www.springframework.net/&quot;&gt;&lt;strong&gt;Spring.NET&lt;/strong&gt;&lt;/a&gt;, &lt;/strong&gt;&lt;a href=&quot;http://code.google.com/p/autofac/&quot;&gt;&lt;strong&gt;Autofac&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, &lt;/strong&gt;&lt;strong&gt;&lt;a href=&quot;http://codeplex.com/unity&quot;&gt;&lt;strong&gt;Unity&lt;/strong&gt;&lt;/a&gt;, &lt;/strong&gt;&lt;a href=&quot;http://ninject.org/&quot;&gt;&lt;strong&gt;Ninject&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/6734104155233716601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2010/02/inversion-of-control-ioc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/6734104155233716601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/6734104155233716601'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2010/02/inversion-of-control-ioc.html' title='Inversion of Control (IoC)'/><author><name>MBH</name><uri>http://www.blogger.com/profile/09375734593638951343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_N9yFJ1zigLY/S3QegFuDHyI/AAAAAAAAAAM/G2bNbOelq9c/s72-c/IoC.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-1683074805972917274</id><published>2010-02-11T11:38:00.000+01:00</published><updated>2010-02-11T12:17:12.153+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>JSON vs XML</title><content type='html'>Utiliser JSON, si vous avez besoin de :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;une configuration plus simple&lt;br /&gt;&lt;/li&gt;&lt;li&gt;une analyse rapide par le browser.&lt;/li&gt;&lt;li&gt;une sérialisation des structures données&lt;br /&gt;&lt;/li&gt;&lt;li&gt;envoyer des structures plutôt qu&#39;un document &lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Utiliser XML, si vous avez besoin de :&lt;br /&gt;&lt;ol&gt;&lt;li&gt;utiliser les outils XML, XSLT&lt;br /&gt;&lt;/li&gt;&lt;li&gt;utiliser des structures de données complexe&lt;/li&gt;&lt;li&gt;fournir des données à usage général&lt;br /&gt;&lt;/li&gt;&lt;li&gt;envoyer un document plutôt qu&#39;une structure&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/1683074805972917274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2010/02/json-vs-xml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/1683074805972917274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/1683074805972917274'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2010/02/json-vs-xml.html' title='JSON vs XML'/><author><name>MBH</name><uri>http://www.blogger.com/profile/09375734593638951343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-4737946078478732507</id><published>2010-02-11T10:38:00.000+01:00</published><updated>2010-02-11T12:16:55.803+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JSON"/><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight"/><category scheme="http://www.blogger.com/atom/ns#" term="WCF RIA Services"/><title type='text'>Termes techniques</title><content type='html'>&lt;a href=&quot;http://www.json.org/&quot;&gt;JSON &lt;/a&gt;( JavaScript Object Notation ) est un format léger d&#39;échange des données. Il est écrit sous format texte. Il est fait pour la structuration de données.&lt;br /&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ee707344%28VS.91%29.aspx&quot;&gt;Microsoft WCF RIA Services&lt;/a&gt; simplifie le développement des solutions N-Tier pour les applications internet riche (RIA). Il permet de construire de bout en bout les applications Silverlight. Il se présente comme un intermédiaire entre la couche présentation et la base de données.&lt;br /&gt;&lt;a href=&quot;http://silverlight.net/&quot;&gt;Microsoft Silverlight&lt;/a&gt; est un framework d&#39;application Web. Il fournit des fonctionnalités similaire à Adobe Flash. Par contre, il n&#39;est compatible qu&#39;avec les systèmes d&#39;exploitations Microsoft Windows.&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;file:///C:/Temp/moz-screenshot.png&quot; alt=&quot;&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/4737946078478732507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2010/02/termes-techniques.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/4737946078478732507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/4737946078478732507'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2010/02/termes-techniques.html' title='Termes techniques'/><author><name>MBH</name><uri>http://www.blogger.com/profile/09375734593638951343</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-8828234764181450250</id><published>2010-02-03T12:52:00.000+01:00</published><updated>2010-02-03T13:00:48.753+01:00</updated><title type='text'>Les spécifications fonctionnelles sans peine !</title><content type='html'>J&#39;aime bien la façon dont &lt;a href=&quot;http://en.wikipedia.org/wiki/Joel_Spolsky&quot;&gt;Joel Spolsky&lt;/a&gt; a décrit en quelques paragraphes : qu&#39;est ce qu&#39;une Spécification, comment  et par qui doit être rédigée ... &lt;a href=&quot;http://french.joelonsoftware.com/Articles/PainlessFunctionalSpecifi-2.html&quot;&gt;http://french.joelonsoftware.com/Articles/PainlessFunctionalSpecifi-2.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/8828234764181450250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2010/02/les-specifications-fonctionnelles-sans.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/8828234764181450250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/8828234764181450250'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2010/02/les-specifications-fonctionnelles-sans.html' title='Les spécifications fonctionnelles sans peine !'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-1271863210440427057</id><published>2010-02-01T16:27:00.000+01:00</published><updated>2010-02-04T13:25:27.079+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Anemic Domain Model"/><category scheme="http://www.blogger.com/atom/ns#" term="pattern"/><title type='text'>L&#39;anti-pattern : &quot;Anemic Domain Model&quot;</title><content type='html'>Anemic Domain Model est un terme utilisé pour décrire l&#39;utilisation du modèle métier (Domain Model) où la logique métier est implémentée en dehors des objets du domaine.&lt;br /&gt;Il est décrit par &lt;a href=&quot;http://en.wikipedia.org/wiki/Martin_Fowler&quot; title=&quot;Martin  Fowler&quot;&gt;Martin Fowler&lt;/a&gt;, comme un anti-pattern (&lt;a href=&quot;http://www.martinfowler.com/bliki/AnemicDomainModel.html&quot;&gt;AnemicDomainModel&lt;/a&gt;).. Qui décrit que les classes métier ne contiennent que des attributs et les méthodes getters et setters associées aux attributs. Donc, les  objets métier ne servent que de stockage de données.&lt;br /&gt;&lt;br /&gt;Les avantages :&lt;br /&gt;- Séparation claire entre la logique et les données (langage procédurale)&lt;br /&gt;&lt;br /&gt;Les inconvenants :&lt;br /&gt;-  il s’agit d’une approche anti-objet, un objet contient à la fois des  données et des comportements&lt;br /&gt;- Facilite la duplication du code dans les cas d&#39;utilisation similaire ce qui permet de réduire la réutilisation du code.&lt;br /&gt;- difficulté de maintenance des règles métier</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/1271863210440427057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2010/02/anemic-domain-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/1271863210440427057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/1271863210440427057'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2010/02/anemic-domain-model.html' title='L&#39;anti-pattern : &quot;Anemic Domain Model&quot;'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1080242216982789373.post-2858385518482754172</id><published>2009-12-30T18:02:00.001+01:00</published><updated>2010-02-03T13:18:16.678+01:00</updated><title type='text'>Principe de Peter</title><content type='html'>&lt;div&gt;&lt;i&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;b&gt;&quot;Dans une hiérarchie, tout employé a tendance à s’élever à son  niveau d’incompétence.&quot; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal; font-weight: normal; &quot;&gt;&lt;b&gt;Principe de Peter&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&quot;In a Hierarchy Every Employee Tends to Rise to His Level of  Incompetence.&quot; &lt;i&gt;The Peter Principle&lt;/i&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;كل موظف في الهرم الوظيفي تتم ترقيته حتى يصل إلى مستوى تنعدم فيه الكفاءة  عنده.&quot; &lt;i&gt;مبدأ بيتر&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal; &quot;&gt;&quot;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mouforum.blogspot.com/feeds/2858385518482754172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mouforum.blogspot.com/2009/12/ceci-est-mon-1er-bl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2858385518482754172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1080242216982789373/posts/default/2858385518482754172'/><link rel='alternate' type='text/html' href='http://mouforum.blogspot.com/2009/12/ceci-est-mon-1er-bl.html' title='Principe de Peter'/><author><name>mouforum</name><uri>http://www.blogger.com/profile/08950220173638779372</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>