<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Ubiquitous Language, Tiny Types and Responsibility</title>
	<atom:link href="http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/feed/" rel="self" type="application/rss+xml" />
	<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/</link>
	<description>Repeat after me: Data is code, code is data.</description>
	<pubDate>Fri, 10 Sep 2010 18:29:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Phillip Calçado</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1901</link>
		<dc:creator>Phillip Calçado</dc:creator>
		<pubDate>Sun, 30 Aug 2009 06:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1901</guid>
		<description>Hi all,

Allan,

&lt;blockquote&gt;A question about your example: What would you do if you requirement is that it can be a TimeInterval that mixes the Business Hours and Overtime Period - in you example you consider it a kind overtime, but let’s say that we want to divide it in some hours for Business and some overtime ? How would you build your classes ?
&lt;/blockquote&gt;

I'm no expert in this domain but if that was a requirement I'd say that there is a third Kind of TimeInterval that models that. But the best answer would be: ask your domain expert.

Rodrigo,

&lt;blockquote&gt; Most people praise this as a flexible solution, as rules can be dynamically added and removed and the model object will remain the same. 
&lt;/blockquote&gt;

For me this sentence clearly states that the system is not built using Domain-Driven Design. If it was then the "model objects" would have to model the business domain and that includes those rules.

That said, DDD is not a requirement and there are cases where it's not even the best solution. If the developers know that they are not following DDD and have a good reason in doing so then I can see no problem.

Cheers all</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>Allan,</p>
<blockquote><p>A question about your example: What would you do if you requirement is that it can be a TimeInterval that mixes the Business Hours and Overtime Period - in you example you consider it a kind overtime, but let’s say that we want to divide it in some hours for Business and some overtime ? How would you build your classes ?
</p></blockquote>
<p>I&#8217;m no expert in this domain but if that was a requirement I&#8217;d say that there is a third Kind of TimeInterval that models that. But the best answer would be: ask your domain expert.</p>
<p>Rodrigo,</p>
<blockquote><p> Most people praise this as a flexible solution, as rules can be dynamically added and removed and the model object will remain the same.
</p></blockquote>
<p>For me this sentence clearly states that the system is not built using Domain-Driven Design. If it was then the &#8220;model objects&#8221; would have to model the business domain and that includes those rules.</p>
<p>That said, DDD is not a requirement and there are cases where it&#8217;s not even the best solution. If the developers know that they are not following DDD and have a good reason in doing so then I can see no problem.</p>
<p>Cheers all</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1892</link>
		<dc:creator>Rodrigo</dc:creator>
		<pubDate>Wed, 26 Aug 2009 15:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1892</guid>
		<description>Great post!

Most systems I've seen have some kind of validation engine built-in. An anemic domain object is built and submitted for verification. As this engine checks the internals of other objects, isn't that an encapsulation violation? Most people praise this as a flexible solution, as rules can be dynamically added and removed and the model object will remain the same. On the other hand, domain objects can be created in inconsistent states, leading to obscure bugs. 

What do you think about that? What is the best approach for validation in your opinion?</description>
		<content:encoded><![CDATA[<p>Great post!</p>
<p>Most systems I&#8217;ve seen have some kind of validation engine built-in. An anemic domain object is built and submitted for verification. As this engine checks the internals of other objects, isn&#8217;t that an encapsulation violation? Most people praise this as a flexible solution, as rules can be dynamically added and removed and the model object will remain the same. On the other hand, domain objects can be created in inconsistent states, leading to obscure bugs. </p>
<p>What do you think about that? What is the best approach for validation in your opinion?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafael Peixoto de Azevedo</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1891</link>
		<dc:creator>Rafael Peixoto de Azevedo</dc:creator>
		<pubDate>Tue, 25 Aug 2009 12:33:23 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1891</guid>
		<description>Greetings, Phillip 

Value objects can be smaller or bigger and, if we stick to DDD, the same applies to entities, services etc... I just think it is better to categorise them after their essential responsibility in the design instead of after their accidental tininess.

I totally agree that a wise design strategy is to make explicit all the relevant domain concepts, and only them. This leads to a simple and expressive design, that facilitates both software maintenance and collaboration with stakeholders.

I think the key issue here is the discernment of what is relevant and what is not in the context of each project and domain. As usual, this is critical for healthily applying any design principle.

Cheers,
Rafael</description>
		<content:encoded><![CDATA[<p>Greetings, Phillip </p>
<p>Value objects can be smaller or bigger and, if we stick to DDD, the same applies to entities, services etc&#8230; I just think it is better to categorise them after their essential responsibility in the design instead of after their accidental tininess.</p>
<p>I totally agree that a wise design strategy is to make explicit all the relevant domain concepts, and only them. This leads to a simple and expressive design, that facilitates both software maintenance and collaboration with stakeholders.</p>
<p>I think the key issue here is the discernment of what is relevant and what is not in the context of each project and domain. As usual, this is critical for healthily applying any design principle.</p>
<p>Cheers,<br />
Rafael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Rubin</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1890</link>
		<dc:creator>Alan Rubin</dc:creator>
		<pubDate>Tue, 25 Aug 2009 12:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1890</guid>
		<description>Nice post. I'm using Tiny Types now for some projects and it really makes the domain and the API explicity. Also it facilitates the reuse of concepts between parts of the project (methods such as .validate() for each type that can be easily used by UI layers for field validation for example).

A question about your example: What would you do if you requirement is that it can be a TimeInterval that mixes the Business Hours and Overtime Period - in you example you consider it a kind overtime, but let's say that we want to divide it in some hours for Business and some overtime ? How would you build your classes ?

Thanks,
Alan</description>
		<content:encoded><![CDATA[<p>Nice post. I&#8217;m using Tiny Types now for some projects and it really makes the domain and the API explicity. Also it facilitates the reuse of concepts between parts of the project (methods such as .validate() for each type that can be easily used by UI layers for field validation for example).</p>
<p>A question about your example: What would you do if you requirement is that it can be a TimeInterval that mixes the Business Hours and Overtime Period - in you example you consider it a kind overtime, but let&#8217;s say that we want to divide it in some hours for Business and some overtime ? How would you build your classes ?</p>
<p>Thanks,<br />
Alan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phillip Calçado</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1889</link>
		<dc:creator>Phillip Calçado</dc:creator>
		<pubDate>Mon, 24 Aug 2009 06:58:38 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1889</guid>
		<description>Hi,

Rafael Peixoto,

Tiny Types are different from Value Object. Although something "TinyType'd" is very likely to be a Value Object that is not a requirement. And Value Objects don't have to be  "tiny" in any sense.

Batman,

Your message got approved only because I recognised the IP address, please use your real name from now on ;)

The thing about operators is probably true but I tend to not use language features that will introduce noise to readers coming from other languages. 

Rafael Noronha,

I've done Design By Contract and even implemented my own libraries for that. I like the concept but I am still not convinced that it makes sense as part of the object model for languages like C# or Java.

Cheers all</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Rafael Peixoto,</p>
<p>Tiny Types are different from Value Object. Although something &#8220;TinyType&#8217;d&#8221; is very likely to be a Value Object that is not a requirement. And Value Objects don&#8217;t have to be  &#8220;tiny&#8221; in any sense.</p>
<p>Batman,</p>
<p>Your message got approved only because I recognised the IP address, please use your real name from now on <img src='http://fragmental.tw/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The thing about operators is probably true but I tend to not use language features that will introduce noise to readers coming from other languages. </p>
<p>Rafael Noronha,</p>
<p>I&#8217;ve done Design By Contract and even implemented my own libraries for that. I like the concept but I am still not convinced that it makes sense as part of the object model for languages like C# or Java.</p>
<p>Cheers all</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafael Noronha</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1887</link>
		<dc:creator>Rafael Noronha</dc:creator>
		<pubDate>Sun, 23 Aug 2009 16:50:29 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1887</guid>
		<description>Tiny types looks like an interesting idea.
The implementation sounds good.

Something that also seems to bring expressiveness is the concept of code contracts, e.g. Spec#.

Have you tried it?</description>
		<content:encoded><![CDATA[<p>Tiny types looks like an interesting idea.<br />
The implementation sounds good.</p>
<p>Something that also seems to bring expressiveness is the concept of code contracts, e.g. Spec#.</p>
<p>Have you tried it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Batman</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1885</link>
		<dc:creator>The Batman</dc:creator>
		<pubDate>Sat, 22 Aug 2009 08:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1885</guid>
		<description>Nice post, homeboy.

In you Contract example, you could reduce the noise you mention by adding implicit operators (for casting to/from int) to your Years class.</description>
		<content:encoded><![CDATA[<p>Nice post, homeboy.</p>
<p>In you Contract example, you could reduce the noise you mention by adding implicit operators (for casting to/from int) to your Years class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafael Peixoto de Azevedo</title>
		<link>http://fragmental.tw/2009/08/21/ubiquitous-language-tiny-types-and-responsibility/#comment-1881</link>
		<dc:creator>Rafael Peixoto de Azevedo</dc:creator>
		<pubDate>Fri, 21 Aug 2009 11:13:34 +0000</pubDate>
		<guid isPermaLink="false">http://fragmental.tw/?p=153#comment-1881</guid>
		<description>Clear meaning and relevant behaviour are key factors for composing expressive types and deep models.

Nice post. I like the way you show the need for careful design in order to avoid creating irrelevant types or breaking apart single (or tightly related) domain concepts.

By the way, I prefer using the term "value object" over "tiny type", because the latter represents to me a pure (and less relevant) focus on syntax. For the sake of "minimal integrity", I would also explicitly add the requirement that "from" be less than "to", since they are just integers. 

Thanks for another "well designed" post with clear thinking and simple examples about relevant design issues.</description>
		<content:encoded><![CDATA[<p>Clear meaning and relevant behaviour are key factors for composing expressive types and deep models.</p>
<p>Nice post. I like the way you show the need for careful design in order to avoid creating irrelevant types or breaking apart single (or tightly related) domain concepts.</p>
<p>By the way, I prefer using the term &#8220;value object&#8221; over &#8220;tiny type&#8221;, because the latter represents to me a pure (and less relevant) focus on syntax. For the sake of &#8220;minimal integrity&#8221;, I would also explicitly add the requirement that &#8220;from&#8221; be less than &#8220;to&#8221;, since they are just integers. </p>
<p>Thanks for another &#8220;well designed&#8221; post with clear thinking and simple examples about relevant design issues.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
