﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>jdn commented on Encapsulation is the enemy of the user interface</title><description>Another advantage of splitting models is that you then don't need to map from your domain model to your view model (and vice versa).  Why hydrate domain objects in the first place if you can create simpler objects in the first place?
</description><link>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment6</link><guid>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment6</guid><pubDate>Tue, 26 Jan 2010 11:23:35 GMT</pubDate></item><item><title>Frank Quednau commented on Encapsulation is the enemy of the user interface</title><description>Yes, darned users, always want to interfere with my beautiful coding with silly UIs, Command Lines  and *gasp* API calls.
</description><link>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment5</link><guid>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment5</guid><pubDate>Tue, 26 Jan 2010 08:37:48 GMT</pubDate></item><item><title>Steve Py commented on Encapsulation is the enemy of the user interface</title><description>Depending on what you're writing, avoiding DTOs can be wrought with adding a whole level of complexity integrated in the code that matters. Data-binding is the rage. Restricting actions available to users is easy; restricting views available to users is easy; but restricting specific details of data transferred to those common views... That's where things can go pear-shaped. I hate the thought of introducing code into views that essentially says "oh, I just won't show that."
  
  
I'm not sure I'd go so far as to introduce a separate models for view vs. update. I do like to define DTOs specific not only to views, but to things like user roles. IMO a view needs to remain ignorant of the business entities, but I guess that's why I tend to think more MVP/MVC rather than MVVM.
</description><link>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment4</link><guid>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment4</guid><pubDate>Tue, 26 Jan 2010 05:39:14 GMT</pubDate></item><item><title>Kyle commented on Encapsulation is the enemy of the user interface</title><description>Who are you agreeing with, Rafal? :)
  
  
Yes, development is much more productive after understanding CQ(R)S. I love mixing them together like an alcoholic drink.
</description><link>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment3</link><guid>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment3</guid><pubDate>Mon, 25 Jan 2010 18:28:27 GMT</pubDate></item><item><title>Rafal commented on Encapsulation is the enemy of the user interface</title><description>Agreed. Artificial separation of the 'model' and 'view model' leads to duplication of logic and lots of boilerplate code to generate data transport objects. It's much better to allow the use of ORM-generated DAL in views + some smart ambient session management.
</description><link>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment2</link><guid>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment2</guid><pubDate>Mon, 25 Jan 2010 14:23:30 GMT</pubDate></item><item><title>Roger Alsing commented on Encapsulation is the enemy of the user interface</title><description>IMO don't mix up CQS with CQRS. they are two vastly different creatures.
  
  
CQRS is Greg Youngs idea with a command model and a query model where you can have queries for a certain gui.
  
  
CQS intends to make it possible to make pre/post/invariant checks in DBC without changing state and thus breaking already evaluated conditions.
  
  
There may be commands and queries in both cases, but the problems and contexts are not the same.
</description><link>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment1</link><guid>http://ayende.com/4375/encapsulation-is-the-enemy-of-the-user-interface#comment1</guid><pubDate>Mon, 25 Jan 2010 10:58:41 GMT</pubDate></item></channel></rss>