<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: People don&#039;t get the difference between business and UI logic</title>
	<atom:link href="http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 06:49:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/comment-page-1/#comment-41414</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Wed, 28 Nov 2007 08:58:17 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/27/people-dont-get-the-difference-between-business-and-ui-logic/#comment-41414</guid>
		<description>@raveman: Suppose someone asks you (a new developer or a product manager or whoever) what the logic is for displaying a field? Would you rather like to look at UserUIState and tell him (or better show him a readable BDD spec) or search through 1k JSP to find out? I&#039;d rather like to look in one class.</description>
		<content:encoded><![CDATA[<p>@raveman: Suppose someone asks you (a new developer or a product manager or whoever) what the logic is for displaying a field? Would you rather like to look at UserUIState and tell him (or better show him a readable BDD spec) or search through 1k JSP to find out? I&#8217;d rather like to look in one class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raveman</title>
		<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/comment-page-1/#comment-41410</link>
		<dc:creator>raveman</dc:creator>
		<pubDate>Wed, 28 Nov 2007 08:22:33 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/27/people-dont-get-the-difference-between-business-and-ui-logic/#comment-41410</guid>
		<description>I disagree, 

c:if test=&quot;${user.loggedIn &amp;&amp; user.bookedProducts &amp;&amp; user.hasPaid}&quot;

is easier to change, lets say you want to show something more if user.bookedProducts, in this example is easy and in your version you need to add another business method/field for that.

I think great example of UI logic are reports, for example FOP, you pass xml data to fop and it creates report using XPath. When reports need to be changed, for example you want to count how many products is ordered you just execute XPath query and NOT add another xml field with count result. This way there really is UI logic in your example UI logic is ... not existing, you have just business logic.
I also worked with reports on production and using UI logic i was able to change them, in your example that wouldn&#039;t be possible because you need to also change your business logic for that.

I don&#039;t think you should worry about things being reused, but worry about how things might change in time.</description>
		<content:encoded><![CDATA[<p>I disagree, </p>
<p>c:if test=&#8221;${user.loggedIn &amp;&amp; user.bookedProducts &amp;&amp; user.hasPaid}&#8221;</p>
<p>is easier to change, lets say you want to show something more if user.bookedProducts, in this example is easy and in your version you need to add another business method/field for that.</p>
<p>I think great example of UI logic are reports, for example FOP, you pass xml data to fop and it creates report using XPath. When reports need to be changed, for example you want to count how many products is ordered you just execute XPath query and NOT add another xml field with count result. This way there really is UI logic in your example UI logic is &#8230; not existing, you have just business logic.<br />
I also worked with reports on production and using UI logic i was able to change them, in your example that wouldn&#8217;t be possible because you need to also change your business logic for that.</p>
<p>I don&#8217;t think you should worry about things being reused, but worry about how things might change in time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prashant</title>
		<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/comment-page-1/#comment-41370</link>
		<dc:creator>prashant</dc:creator>
		<pubDate>Wed, 28 Nov 2007 02:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/27/people-dont-get-the-difference-between-business-and-ui-logic/#comment-41370</guid>
		<description>Stephan,

Agree with you completely.

Thanks
Prashant</description>
		<content:encoded><![CDATA[<p>Stephan,</p>
<p>Agree with you completely.</p>
<p>Thanks<br />
Prashant</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/comment-page-1/#comment-41312</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 27 Nov 2007 19:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/27/people-dont-get-the-difference-between-business-and-ui-logic/#comment-41312</guid>
		<description>&quot;I know about components, sub-templates etc.&quot;

You&#039;re way doesn&#039;t provide a solution for the distributed nature of the mapping. With your example you still distribute the decision of showMenu over several components possibly. 

I could use a JSTL custom tag just like you use a wicket component. But the still: Put the decision of showMenu in the component or put it in an adaption layer. What if you have several widget which should be shown depending on a condition?

With JSP the code is in the c:if, with wicket it&#039;s in here.

isVisible = hasPrice();

  public boolean isVisible() {
    return hasPrice();
  }

But this mapping has to be written down somewhere. That&#039;s my point. Either explicit or implicit. And I vote im most - but the simpliest cases - for explicit.</description>
		<content:encoded><![CDATA[<p>&#8220;I know about components, sub-templates etc.&#8221;</p>
<p>You&#8217;re way doesn&#8217;t provide a solution for the distributed nature of the mapping. With your example you still distribute the decision of showMenu over several components possibly. </p>
<p>I could use a JSTL custom tag just like you use a wicket component. But the still: Put the decision of showMenu in the component or put it in an adaption layer. What if you have several widget which should be shown depending on a condition?</p>
<p>With JSP the code is in the c:if, with wicket it&#8217;s in here.</p>
<p>isVisible = hasPrice();</p>
<p>  public boolean isVisible() {<br />
    return hasPrice();<br />
  }</p>
<p>But this mapping has to be written down somewhere. That&#8217;s my point. Either explicit or implicit. And I vote im most &#8211; but the simpliest cases &#8211; for explicit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MarshaKnows</title>
		<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/comment-page-1/#comment-41308</link>
		<dc:creator>MarshaKnows</dc:creator>
		<pubDate>Tue, 27 Nov 2007 19:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/27/people-dont-get-the-difference-between-business-and-ui-logic/#comment-41308</guid>
		<description>The Wicket way is better. There are no doubts of where business logic lives. http://www.systemmobile.com/?page_id=253</description>
		<content:encoded><![CDATA[<p>The Wicket way is better. There are no doubts of where business logic lives. <a href="http://www.systemmobile.com/?page_id=253" rel="nofollow">http://www.systemmobile.com/?page_id=253</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/comment-page-1/#comment-41302</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Tue, 27 Nov 2007 18:30:13 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/27/people-dont-get-the-difference-between-business-and-ui-logic/#comment-41302</guid>
		<description>I&#039;m not sure if &lt;code&gt;UserUIState&lt;/code&gt; is the right name and I&#039;m not sure the method should be called &lt;code&gt;showMenu&lt;/code&gt;, it depends on the code and the project. This was just an example. But it tremendously simplifies Unit testing and template coding. And it leads to much more maintenable code and a lot less bugs (simpleness leads to quality).</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure if <code>UserUIState</code> is the right name and I&#8217;m not sure the method should be called <code>showMenu</code>, it depends on the code and the project. This was just an example. But it tremendously simplifies Unit testing and template coding. And it leads to much more maintenable code and a lot less bugs (simpleness leads to quality).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Medinets</title>
		<link>http://codemonkeyism.com/people-dont-get-the-difference-between-business-and-ui-logic/comment-page-1/#comment-41297</link>
		<dc:creator>David Medinets</dc:creator>
		<pubDate>Tue, 27 Nov 2007 17:20:42 +0000</pubDate>
		<guid isPermaLink="false">http://stephan.reposita.org/archives/2007/11/27/people-dont-get-the-difference-between-business-and-ui-logic/#comment-41297</guid>
		<description>I agree. Originally, I was not convinced that creating the UserUIState is useful. However, upon reflection (no pun intended) I can see that using a state object simplifies the design. Each state variable (showMenu, showFooter, etc) does not need to be placed into the UI context, just the UserUIState object.</description>
		<content:encoded><![CDATA[<p>I agree. Originally, I was not convinced that creating the UserUIState is useful. However, upon reflection (no pun intended) I can see that using a state object simplifies the design. Each state variable (showMenu, showFooter, etc) does not need to be placed into the UI context, just the UserUIState object.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 4/17 queries in 0.015 seconds using disk

Served from: codemonkeyism.com @ 2010-07-30 12:45:25 -->