<?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: A POJO with annotations is not Plain</title>
	<atom:link href="http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/</link>
	<description>Software development done right!</description>
	<lastBuildDate>Wed, 08 Feb 2012 14:41:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Somebody</title>
		<link>http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-6384</link>
		<dc:creator>Somebody</dc:creator>
		<pubDate>Fri, 20 Apr 2007 14:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-6384</guid>
		<description>POJO term is stupid. Don&#039;t you see that it is context dependent? POJO by definition is not derived from any framework&#039;s abstract class or interface. If my class is derived from, let&#039;s say, XMLBean abstract class then in context of EJB it is still a POJO but in context of XMLBean framework it is not. Since its definition is unclear from the beginning it allows for any type of abuse.</description>
		<content:encoded><![CDATA[<p>POJO term is stupid. Don&#8217;t you see that it is context dependent? POJO by definition is not derived from any framework&#8217;s abstract class or interface. If my class is derived from, let&#8217;s say, XMLBean abstract class then in context of EJB it is still a POJO but in context of XMLBean framework it is not. Since its definition is unclear from the beginning it allows for any type of abuse.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xebia Blog</title>
		<link>http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-5741</link>
		<dc:creator>Xebia Blog</dc:creator>
		<pubDate>Tue, 03 Apr 2007 08:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-5741</guid>
		<description>[...] @EJB??? There it is! But why there? I don&#039;t care that the customer is an EJB, I just want it to be injected. Now one of the main reasons for using interfaces is gone: my AcccountServive knows implementation details about the CustomerBean, namely that it is an EJB. A more general problem with using these annotations is that my classes are now dependent on JEE to compile, since the annotations are in the JEE API and not the JSE. This is also one the points Vincent talked about when mixing annotations and POJO&#039;s. [...]</description>
		<content:encoded><![CDATA[<p>[...] @EJB??? There it is! But why there? I don&#8217;t care that the customer is an EJB, I just want it to be injected. Now one of the main reasons for using interfaces is gone: my AcccountServive knows implementation details about the CustomerBean, namely that it is an EJB. A more general problem with using these annotations is that my classes are now dependent on JEE to compile, since the annotations are in the JEE API and not the JSE. This is also one the points Vincent talked about when mixing annotations and POJO&#8217;s. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Brakkee</title>
		<link>http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-4836</link>
		<dc:creator>Erik Brakkee</dc:creator>
		<pubDate>Wed, 14 Feb 2007 23:01:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-4836</guid>
		<description>Completely agree. The current annotations craze is just another example of overcompensation and overuse of new cool features. One framework that takse this to the limit is JBoss SEAM where you really have to write only a few lines of code but your code gets totally blurred by large numbers of annotations. 

The trick is to use annotations to the right extent. For instance, as far as the JPA annotations go, I think it is really useful to have an annotation like @ManyToOne because it enriches the code. Namely, it tells you that the relation is many-to-one and not one-to-one, a fact that cannot be determined from the code alone. Nevertheless, it starts to get a bit dubious when information that might be deployment specific enters the code such as table or column names.

I guess we will know in a few years time what really works or not.</description>
		<content:encoded><![CDATA[<p>Completely agree. The current annotations craze is just another example of overcompensation and overuse of new cool features. One framework that takse this to the limit is JBoss SEAM where you really have to write only a few lines of code but your code gets totally blurred by large numbers of annotations. </p>
<p>The trick is to use annotations to the right extent. For instance, as far as the JPA annotations go, I think it is really useful to have an annotation like @ManyToOne because it enriches the code. Namely, it tells you that the relation is many-to-one and not one-to-one, a fact that cannot be determined from the code alone. Nevertheless, it starts to get a bit dubious when information that might be deployment specific enters the code such as table or column names.</p>
<p>I guess we will know in a few years time what really works or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Kersic</title>
		<link>http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-4514</link>
		<dc:creator>Ron Kersic</dc:creator>
		<pubDate>Wed, 31 Jan 2007 22:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/#comment-4514</guid>
		<description>Unquestionably, the annotation examples you highlighted are stark reminders how difficult it seems to be to learn from earlier mistakes. Setting these examples aside, and forgetting how half-baked the support is in Java 5, I’m not sure whether an application of annotations actually removes the “plainness” from POJO’s. 

Adding (layers of) metadata on top of our POJO’s isn’t a new trick of course. The @deprecated JavaDoc tag, the transient keyword, and the Serializable interface but also the Spring ApplicationContent.xml are all examples of adding metadata to objects that still would qualify as POJO’s in my book (or at the least, as objects that enjoy the same benefits as POJO’s do).

As long as the core values of a class (or class hierarchy) can be verified in isolation from the qualities its annotations are communicating then the moniker POJO still seems applicable. This holds for “Java-generic” annotations (@Deprecated, @SupressWarnings) or “domain-specific” annotations (@Product, @Role). 

But even annotations that draw from the solution domain are not always harmful. A domain class annotated with @Table(name=”foo”) should not prevent using the class solely for its domain qualities (e.g. calculating a mortgage). You can’t test its persistency qualities without some implementation/container present of course and yes, you need the definition of the ‘Table’ annotation, but no great harm seems being done. No? 

My $0,02….</description>
		<content:encoded><![CDATA[<p>Unquestionably, the annotation examples you highlighted are stark reminders how difficult it seems to be to learn from earlier mistakes. Setting these examples aside, and forgetting how half-baked the support is in Java 5, I’m not sure whether an application of annotations actually removes the “plainness” from POJO’s. </p>
<p>Adding (layers of) metadata on top of our POJO’s isn’t a new trick of course. The @deprecated JavaDoc tag, the transient keyword, and the Serializable interface but also the Spring ApplicationContent.xml are all examples of adding metadata to objects that still would qualify as POJO’s in my book (or at the least, as objects that enjoy the same benefits as POJO’s do).</p>
<p>As long as the core values of a class (or class hierarchy) can be verified in isolation from the qualities its annotations are communicating then the moniker POJO still seems applicable. This holds for “Java-generic” annotations (@Deprecated, @SupressWarnings) or “domain-specific” annotations (@Product, @Role). </p>
<p>But even annotations that draw from the solution domain are not always harmful. A domain class annotated with @Table(name=”foo”) should not prevent using the class solely for its domain qualities (e.g. calculating a mortgage). You can’t test its persistency qualities without some implementation/container present of course and yes, you need the definition of the ‘Table’ annotation, but no great harm seems being done. No? </p>
<p>My $0,02….</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  blog.xebia.com/2007/01/28/a-pojo-with-annotations-is-not-plain/feed/ ) in 0.42639 seconds, on Feb 9th, 2012 at 7:58 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 9th, 2012 at 8:58 pm UTC -->
