
<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for Programming Thoughts @ Work</title>
	<link>http://anirudhvyas.com/root</link>
	<description>A block of code can say more than a great book filled with 'anecdotes' and insights</description>
	<pubDate>Tue, 07 Oct 2008 05:26:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>Comment on Abuses of DTO pattern in Java world by Anirudh Vyas</title>
		<link>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-120</link>
		<dc:creator>Anirudh Vyas</dc:creator>
		<pubDate>Sun, 14 Sep 2008 19:18:45 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-120</guid>
		<description>Yes; One of our colleagues had a discussion about this at length with Igor (Query for data and count being separate; and their opinion seems to be that as a framework thats what makes sense to them; I dont completely agree). 

Usage of a DTO in common J2EE environment is a POJO or a Java bean; The difference is only a matter of purist view in my opinion. Its like when i use DTO to represent say an Order and call it OrderDTO and then use the same entity for persistence; the TO's purpose becomes polluted. A TO should do only what its supposed to do; beyond transfer the tier has to take over. In my opinion actual DB entities should be represented as Models in Java / J2EE environment and then passed around through tiers using a DTO (which would mimic the data of Model or state of the Model or could in fact contain the model itself.)

This in my opinion leads to better Separation of concerns.

Regards
Vyas, Anirudh</description>
		<content:encoded><![CDATA[<p>Yes; One of our colleagues had a discussion about this at length with Igor (Query for data and count being separate; and their opinion seems to be that as a framework thats what makes sense to them; I dont completely agree). </p>
<p>Usage of a DTO in common J2EE environment is a POJO or a Java bean; The difference is only a matter of purist view in my opinion. Its like when i use DTO to represent say an Order and call it OrderDTO and then use the same entity for persistence; the TO&#8217;s purpose becomes polluted. A TO should do only what its supposed to do; beyond transfer the tier has to take over. In my opinion actual DB entities should be represented as Models in Java / J2EE environment and then passed around through tiers using a DTO (which would mimic the data of Model or state of the Model or could in fact contain the model itself.)</p>
<p>This in my opinion leads to better Separation of concerns.</p>
<p>Regards<br />
Vyas, Anirudh</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Abuses of DTO pattern in Java world by Anirudh Vyas</title>
		<link>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-119</link>
		<dc:creator>Anirudh Vyas</dc:creator>
		<pubDate>Sun, 14 Sep 2008 19:12:40 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-119</guid>
		<description>One of the guys asked me to cite some sources who believe DTO and Value Objects are different, For details please read P of EAA book by Martin Fowler and refer to Page 487.


The idea of DTO vs Value Object being different is fairly common in J2EE community as per my understanding.</description>
		<content:encoded><![CDATA[<p>One of the guys asked me to cite some sources who believe DTO and Value Objects are different, For details please read P of EAA book by Martin Fowler and refer to Page 487.</p>
<p>The idea of DTO vs Value Object being different is fairly common in J2EE community as per my understanding.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Abuses of DTO pattern in Java world by R. Goodwin</title>
		<link>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-98</link>
		<dc:creator>R. Goodwin</dc:creator>
		<pubDate>Tue, 02 Sep 2008 20:07:55 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-98</guid>
		<description>Hi Anirudh,

You're not by chance using Lucene for the search and Wicket for the presentation?

I've been trying (rather unsucesfully) to integrate Wicket and a search data tier via IDataProvider, but have found that they are not compatible.

The current Wicket paging mechanism expects queries for data and total results (count query) to be executed separately.
Fine if using a DAO and a database.
But of course a Lucene search is executed once to locate both results and totals for the paging.

If you're interested, have a look at the Apache Jira ticket I created:
https://issues.apache.org/jira/browse/WICKET-1784

Don't think Igor (lead Wicket developer) is convinced that the use of a DTO object for passing search and paging parameters and returning results between Wicket to the data service tier is widely used. 

Was wondering if you have a view on this?

Many thanks.</description>
		<content:encoded><![CDATA[<p>Hi Anirudh,</p>
<p>You&#8217;re not by chance using Lucene for the search and Wicket for the presentation?</p>
<p>I&#8217;ve been trying (rather unsucesfully) to integrate Wicket and a search data tier via IDataProvider, but have found that they are not compatible.</p>
<p>The current Wicket paging mechanism expects queries for data and total results (count query) to be executed separately.<br />
Fine if using a DAO and a database.<br />
But of course a Lucene search is executed once to locate both results and totals for the paging.</p>
<p>If you&#8217;re interested, have a look at the Apache Jira ticket I created:<br />
<a href="https://issues.apache.org/jira/browse/WICKET-1784" rel="nofollow">https://issues.apache.org/jira/browse/WICKET-1784</a></p>
<p>Don&#8217;t think Igor (lead Wicket developer) is convinced that the use of a DTO object for passing search and paging parameters and returning results between Wicket to the data service tier is widely used. </p>
<p>Was wondering if you have a view on this?</p>
<p>Many thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Abuses of DTO pattern in Java world by Administrator</title>
		<link>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-67</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Sat, 23 Aug 2008 02:47:45 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-67</guid>
		<description>A DTO when taken literally should mean A Data Transferring Object; we see that Search Criteria is being passed into through the tiers and some business processing being done on Business tier and finally data being either gotten or persisted based on info gotten using Search / Operation Criteria is set in DTO to be "transferred" across the tiers back to the UI tier which initiated the request in the first place.

Could you elaborate more on your definition of a DTO mark and delve a little deeper on DTO vs  a Search Object Mark?

Regards
Vyas, Anirudh</description>
		<content:encoded><![CDATA[<p>A DTO when taken literally should mean A Data Transferring Object; we see that Search Criteria is being passed into through the tiers and some business processing being done on Business tier and finally data being either gotten or persisted based on info gotten using Search / Operation Criteria is set in DTO to be &#8220;transferred&#8221; across the tiers back to the UI tier which initiated the request in the first place.</p>
<p>Could you elaborate more on your definition of a DTO mark and delve a little deeper on DTO vs  a Search Object Mark?</p>
<p>Regards<br />
Vyas, Anirudh</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Abuses of DTO pattern in Java world by Mark</title>
		<link>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-66</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sat, 23 Aug 2008 02:37:02 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-66</guid>
		<description>Then it is a Search object or a Search results object, not  a DTO. For Search Results objects, they can be Projects or Report objects.  They might seem the same, but they are not.</description>
		<content:encoded><![CDATA[<p>Then it is a Search object or a Search results object, not  a DTO. For Search Results objects, they can be Projects or Report objects.  They might seem the same, but they are not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Abuses of DTO pattern in Java world by Administrator</title>
		<link>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-63</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Thu, 21 Aug 2008 20:01:29 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-63</guid>
		<description>You are right, In fact I would do a write up on this soon hopefully; we are using the same concept in our current project, where a DTO essentially holds a search criteria, users in UI set the criteria for search, the DTO is passed through the tiers, the search criteria could be a string, it could be a model (or a POJO or a Java bean or anything that is Serializable) and search results could be collection of models received. This definitely makes sense.

Regards
Vyas, Anirudh</description>
		<content:encoded><![CDATA[<p>You are right, In fact I would do a write up on this soon hopefully; we are using the same concept in our current project, where a DTO essentially holds a search criteria, users in UI set the criteria for search, the DTO is passed through the tiers, the search criteria could be a string, it could be a model (or a POJO or a Java bean or anything that is Serializable) and search results could be collection of models received. This definitely makes sense.</p>
<p>Regards<br />
Vyas, Anirudh</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Abuses of DTO pattern in Java world by R. Goodwin</title>
		<link>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-62</link>
		<dc:creator>R. Goodwin</dc:creator>
		<pubDate>Thu, 21 Aug 2008 19:06:11 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/04/19/abuses-of-dto-pattern-in-java-world/#comment-62</guid>
		<description>Hi Anirudh,

An interesting article.
What do you think of a DTO situation like this:

1. A web tier (on one server) constructs a Search object containing a number of search parameters, some of which may or may not be set, depending on search complexity.
2. It calls a data service tier session (on another server) passing the Search object.
3. Data service performs search, adds search results and total results (for paging options), then returns this Search object back to the web tier.

I would say the DTO pattern makes sense here because all the related details are grouped, and the session interface signature is nice and simple as there's no need to overload with all the various possibilities for the different search parameters.</description>
		<content:encoded><![CDATA[<p>Hi Anirudh,</p>
<p>An interesting article.<br />
What do you think of a DTO situation like this:</p>
<p>1. A web tier (on one server) constructs a Search object containing a number of search parameters, some of which may or may not be set, depending on search complexity.<br />
2. It calls a data service tier session (on another server) passing the Search object.<br />
3. Data service performs search, adds search results and total results (for paging options), then returns this Search object back to the web tier.</p>
<p>I would say the DTO pattern makes sense here because all the related details are grouped, and the session interface signature is nice and simple as there&#8217;s no need to overload with all the various possibilities for the different search parameters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Wicket : The greatest Java Web Framework Ever! by Peter Thomas</title>
		<link>http://anirudhvyas.com/root/2008/03/20/apache-wicket-the-greatest-java-web-framework-ever/#comment-30</link>
		<dc:creator>Peter Thomas</dc:creator>
		<pubDate>Fri, 30 May 2008 05:56:49 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/03/20/apache-wicket-the-greatest-java-web-framework-ever/#comment-30</guid>
		<description>Anirudh:  Great write up!  I agree with your analysis and recently tried to capture the flaws in the MVC Action / JSP approach in a set of slides.  It would be great if you can have a look and let me know if there are any points I have missed - based on your experience.

You can find the slides here:

http://ptrthomas.wordpress.com/2008/05/26/migrating-to-apache-wicket-presentation-slides/</description>
		<content:encoded><![CDATA[<p>Anirudh:  Great write up!  I agree with your analysis and recently tried to capture the flaws in the MVC Action / JSP approach in a set of slides.  It would be great if you can have a look and let me know if there are any points I have missed - based on your experience.</p>
<p>You can find the slides here:</p>
<p><a href="http://ptrthomas.wordpress.com/2008/05/26/migrating-to-apache-wicket-presentation-slides/" rel="nofollow">http://ptrthomas.wordpress.com/2008/05/26/migrating-to-apache-wicket-presentation-slides/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Visitor Pattern : Elegance @ Work by Programming Thoughts @ Work &#187; A much better Strategy Pattern - Part II</title>
		<link>http://anirudhvyas.com/root/2008/03/20/visitor-pattern-elegance-work/#comment-29</link>
		<dc:creator>Programming Thoughts @ Work &#187; A much better Strategy Pattern - Part II</dc:creator>
		<pubDate>Mon, 19 May 2008 03:31:11 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/03/20/visitor-pattern-elegance-work/#comment-29</guid>
		<description>[...] and making it more flexible through Generics. ( For continuation purpose; here&#8217;s the link: Visitor Pattern - Part I. Speaking of generics, we can use Generics to improve the above code too &#8230; but thats for [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] and making it more flexible through Generics. ( For continuation purpose; here&#8217;s the link: Visitor Pattern - Part I. Speaking of generics, we can use Generics to improve the above code too &#8230; but thats for [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Apache Wicket : The greatest Java Web Framework Ever! by Frank Silbermann</title>
		<link>http://anirudhvyas.com/root/2008/03/20/apache-wicket-the-greatest-java-web-framework-ever/#comment-15</link>
		<dc:creator>Frank Silbermann</dc:creator>
		<pubDate>Tue, 15 Apr 2008 22:28:43 +0000</pubDate>
		<guid>http://anirudhvyas.com/root/2008/03/20/apache-wicket-the-greatest-java-web-framework-ever/#comment-15</guid>
		<description>What I like about Wicket is that you can make self-documenting code that respects the DRY (Don't Repeat Yourself) principle.

What I mean by "self-documenting" is that I can modularize a page into panels, give those panels names oriented towards the business logic, and describe my page in those simple, hierarichical terms -- just as I can modularize a batch program as a hierarchy of well-named subroutines.  This is much more readable than a HUGE tree of deeply nested tags.

If I am using similar panels in many places, I can write a single panel class to cover all the cases, with the differences in each usage configured via the constructor parameters of my panel subclass.  Or, I can design my panel subclass with default or abstract methods to be overriden by (possibly anonymous) subclasses.  Or I can combine both techniques.  This gives me the same abstraction and re-use capabilities for the presentation logic that I already enjoy when coding the business logic.

If I want aspects of my application to have declarative configuration, I can simply include a configuration textfile in my application and write my code to read, parse, and use the information contained therein (without relying on the framework creator to guess the aspects I want to be declaratively configured).

Once you get the Wicket way of doing things, it's as flexible and powerful as Java itself.</description>
		<content:encoded><![CDATA[<p>What I like about Wicket is that you can make self-documenting code that respects the DRY (Don&#8217;t Repeat Yourself) principle.</p>
<p>What I mean by &#8220;self-documenting&#8221; is that I can modularize a page into panels, give those panels names oriented towards the business logic, and describe my page in those simple, hierarichical terms &#8212; just as I can modularize a batch program as a hierarchy of well-named subroutines.  This is much more readable than a HUGE tree of deeply nested tags.</p>
<p>If I am using similar panels in many places, I can write a single panel class to cover all the cases, with the differences in each usage configured via the constructor parameters of my panel subclass.  Or, I can design my panel subclass with default or abstract methods to be overriden by (possibly anonymous) subclasses.  Or I can combine both techniques.  This gives me the same abstraction and re-use capabilities for the presentation logic that I already enjoy when coding the business logic.</p>
<p>If I want aspects of my application to have declarative configuration, I can simply include a configuration textfile in my application and write my code to read, parse, and use the information contained therein (without relying on the framework creator to guess the aspects I want to be declaratively configured).</p>
<p>Once you get the Wicket way of doing things, it&#8217;s as flexible and powerful as Java itself.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.497 seconds -->
