<?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: Naming the Java Implementation Classes</title>
	<atom:link href="http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/</link>
	<description>Nobody can be perfect, but you can think better, design better, and always use baby steps!</description>
	<lastBuildDate>Tue, 22 Nov 2011 10:53:40 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Geucimar</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-7798</link>
		<dc:creator>Geucimar</dc:creator>
		<pubDate>Fri, 07 May 2010 02:32:40 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-7798</guid>
		<description>&lt;p&gt;I agree that this is a bad convention. But the problem is that persons like Gavin King used it to appoint as SessionFactoryImpl class.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I agree that this is a bad convention. But the problem is that persons like Gavin King used it to appoint as SessionFactoryImpl class.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Isa Goksu</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-6328</link>
		<dc:creator>Isa Goksu</dc:creator>
		<pubDate>Wed, 17 Feb 2010 03:37:50 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-6328</guid>
		<description>&lt;p&gt;@beko I guess u lost the point somewhere. If you do have 2 possible implementations of that ReservationService, u should make implementation class names meaningful. In ur example I&#039;d have: com.foo.service.ReservationService (interface), com.foo.service.impl.OpenTableReservationService, com.foo.service.impl.YelpReservationService kinda. If you don&#039;t have multiple implementations of that interface, YAGNI should stop u to have an interface there, don&#039;t u think?&lt;/p&gt;

&lt;p&gt;When u don&#039;t give meaningful names to your classes, then as u pointed too, u end up having stupid names like RestaurantReservationService. If you can&#039;t give a meaningful name to ur classes, I&#039;d say ur class is either not supposed to be there, or it has more than one reason to change. I hope this clarifies a bit.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@beko I guess u lost the point somewhere. If you do have 2 possible implementations of that ReservationService, u should make implementation class names meaningful. In ur example I&#8217;d have: com.foo.service.ReservationService (interface), com.foo.service.impl.OpenTableReservationService, com.foo.service.impl.YelpReservationService kinda. If you don&#8217;t have multiple implementations of that interface, YAGNI should stop u to have an interface there, don&#8217;t u think?</p>

<p>When u don&#8217;t give meaningful names to your classes, then as u pointed too, u end up having stupid names like RestaurantReservationService. If you can&#8217;t give a meaningful name to ur classes, I&#8217;d say ur class is either not supposed to be there, or it has more than one reason to change. I hope this clarifies a bit.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: beko</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-6324</link>
		<dc:creator>beko</dc:creator>
		<pubDate>Wed, 17 Feb 2010 00:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-6324</guid>
		<description>&lt;p&gt;disagree with u guys.it depends on your business logic.if u need a ReservationService interface and your company is just a restaurant or somethng like that, u cant call its implementations as RestaurantReservationService or RichCustomerReservationService..that would be silly.of course ide can tell us which one is a interface or a concrete impl. so u recommend us to add a impl. package to our projects with exactly the same class names? like
com.foo.service.ReservationService and com.foo.service.impl.ReservationService.. =)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>disagree with u guys.it depends on your business logic.if u need a ReservationService interface and your company is just a restaurant or somethng like that, u cant call its implementations as RestaurantReservationService or RichCustomerReservationService..that would be silly.of course ide can tell us which one is a interface or a concrete impl. so u recommend us to add a impl. package to our projects with exactly the same class names? like
com.foo.service.ReservationService and com.foo.service.impl.ReservationService.. =)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Isa Goksu</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-5674</link>
		<dc:creator>Isa Goksu</dc:creator>
		<pubDate>Fri, 22 Jan 2010 18:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-5674</guid>
		<description>&lt;p&gt;@jigar, I see your point. But when you&#039;re naming the classes, I believe you should be talking in ubiquitous language. Your design details come after this perspective. In your case I don&#039;t think putting base or abstract would make any difference since after a while you&#039;ll find everyone is naming their classes BaseXXX, AbstractXXX. And then you&#039;ll notice that (in the project I work right now) Abstract classes extending from other AbstractBase classes :) LOL. It&#039;s just crazy.&lt;/p&gt;

&lt;p&gt;Anyways, I&#039;d rename your cookers like this if it makes sense to you: Cooker (your base or abstract), FastCooker (fast one), SlowCooker (slow one). If you really need to have base and abstract at the same time, I think you should just look at your design, maybe something shouldn&#039;t be there. Then again I don&#039;t know your context. For interface vs Impl difference that you say, FastCooker cannot be an interface to me. Being Fast and can Cook are 2 different concerns. You&#039;re trying to merge them. That&#039;s why you think an interface (FastCooker) and an implementation (FastRealCooker) will be needed. I&#039;d say, make CanCook, IsFast and IsSlow interfaces and implement FastCooker with CanCook and IsFast together. You can do better encapsulation with this way.&lt;/p&gt;

&lt;p&gt;As I said, all these are just from my perspective. Maybe people think I&#039;m bullshitting. But when I see a name contains Can, Is, Able, etc I know for sure it&#039;s interface. Beside, any stupid IDE can tell you if it&#039;s an interface or implementation.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@jigar, I see your point. But when you&#8217;re naming the classes, I believe you should be talking in ubiquitous language. Your design details come after this perspective. In your case I don&#8217;t think putting base or abstract would make any difference since after a while you&#8217;ll find everyone is naming their classes BaseXXX, AbstractXXX. And then you&#8217;ll notice that (in the project I work right now) Abstract classes extending from other AbstractBase classes :) LOL. It&#8217;s just crazy.</p>

<p>Anyways, I&#8217;d rename your cookers like this if it makes sense to you: Cooker (your base or abstract), FastCooker (fast one), SlowCooker (slow one). If you really need to have base and abstract at the same time, I think you should just look at your design, maybe something shouldn&#8217;t be there. Then again I don&#8217;t know your context. For interface vs Impl difference that you say, FastCooker cannot be an interface to me. Being Fast and can Cook are 2 different concerns. You&#8217;re trying to merge them. That&#8217;s why you think an interface (FastCooker) and an implementation (FastRealCooker) will be needed. I&#8217;d say, make CanCook, IsFast and IsSlow interfaces and implement FastCooker with CanCook and IsFast together. You can do better encapsulation with this way.</p>

<p>As I said, all these are just from my perspective. Maybe people think I&#8217;m bullshitting. But when I see a name contains Can, Is, Able, etc I know for sure it&#8217;s interface. Beside, any stupid IDE can tell you if it&#8217;s an interface or implementation.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jigar Shah</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-5646</link>
		<dc:creator>Jigar Shah</dc:creator>
		<pubDate>Fri, 22 Jan 2010 08:52:15 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-5646</guid>
		<description>&lt;p&gt;One more issue I see here....What if we have and Cooker (interface) AbstractCooker (abstract class), A BaseCooker (Base class to / can be extended by all cookers) and FastCooker, SlowCooker ? Isn&#039;t Base and Abstract necessary ?&lt;/p&gt;

&lt;p&gt;Same way if we have Cooker enum, It would better spelled as CookerType or CookerEnum ? CookerEnum says its enum and easy to identify at first glance ?&lt;/p&gt;

&lt;p&gt;I agree with case of context. FastCookerImpl and SlowCookerImpl is not needed. But What if we Have FastCooker interface and SlowCooker Interface and implementation as FastRealCooker and FastFakeCooker ? Isn&#039;t it easier to find &quot;Intf&quot; and &quot;Impl&quot; clearly ?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>One more issue I see here&#8230;.What if we have and Cooker (interface) AbstractCooker (abstract class), A BaseCooker (Base class to / can be extended by all cookers) and FastCooker, SlowCooker ? Isn&#8217;t Base and Abstract necessary ?</p>

<p>Same way if we have Cooker enum, It would better spelled as CookerType or CookerEnum ? CookerEnum says its enum and easy to identify at first glance ?</p>

<p>I agree with case of context. FastCookerImpl and SlowCookerImpl is not needed. But What if we Have FastCooker interface and SlowCooker Interface and implementation as FastRealCooker and FastFakeCooker ? Isn&#8217;t it easier to find &#8220;Intf&#8221; and &#8220;Impl&#8221; clearly ?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Isa Goksu</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-2844</link>
		<dc:creator>Isa Goksu</dc:creator>
		<pubDate>Mon, 20 Jul 2009 07:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-2844</guid>
		<description>&lt;p&gt;@dan Spring issue is really weird. Most of its users are using Spring just for DI, nothing more.. I don&#039;t know, IMHO Spring is way big for a DI mechanism. I remember I read an article about how Google Guice is 100 times faster than Spring in DI.. Anyways..&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@dan Spring issue is really weird. Most of its users are using Spring just for DI, nothing more.. I don&#8217;t know, IMHO Spring is way big for a DI mechanism. I remember I read an article about how Google Guice is 100 times faster than Spring in DI.. Anyways..</p>]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-2840</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Mon, 20 Jul 2009 01:13:32 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-2840</guid>
		<description>&lt;p&gt;You make a good point in your first comment. If you are forced by framework to violate YAGNI and create an interface due to spring, which pushes you to make a decision of creating IPerson or PersonImpl, maybe its time to question the usage of the framework.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You make a good point in your first comment. If you are forced by framework to violate YAGNI and create an interface due to spring, which pushes you to make a decision of creating IPerson or PersonImpl, maybe its time to question the usage of the framework.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Isa Goksu</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-2838</link>
		<dc:creator>Isa Goksu</dc:creator>
		<pubDate>Mon, 20 Jul 2009 00:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-2838</guid>
		<description>&lt;p&gt;@pavel, my point about duplication was not about the Cooker part. It&#039;s about the Impl part. It&#039;s a suffix that doesn&#039;t mean anything. It&#039;s like this in your example: CakeCooker, FactCakeCookerClass, HTTPCakeCookerClass, MockCakeCookerClass etc.. Of course it&#039;s class, we know that. Why repeat again and again..&lt;/p&gt;

&lt;p&gt;Then again, I agree about our nature. That&#039;s biggest cumbersome we have actually :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@pavel, my point about duplication was not about the Cooker part. It&#8217;s about the Impl part. It&#8217;s a suffix that doesn&#8217;t mean anything. It&#8217;s like this in your example: CakeCooker, FactCakeCookerClass, HTTPCakeCookerClass, MockCakeCookerClass etc.. Of course it&#8217;s class, we know that. Why repeat again and again..</p>

<p>Then again, I agree about our nature. That&#8217;s biggest cumbersome we have actually :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Pavel</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-2831</link>
		<dc:creator>Pavel</dc:creator>
		<pubDate>Sun, 19 Jul 2009 06:57:53 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-2831</guid>
		<description>&lt;p&gt;It costs additional efforts to supply implementation with good descriptive name. People are lazy, it&#039;s our nature.&lt;/p&gt;

&lt;p&gt;From other side if there is interface CakeCooker then we probably can name implementations like FastCakeCooker, HTTPCakeCooker, MockCakeCooker but it doesn&#039;t resolve duplication problem.&lt;/p&gt;

&lt;p&gt;BTW often it&#039;s harder to get working software then to figure out naming conventions&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It costs additional efforts to supply implementation with good descriptive name. People are lazy, it&#8217;s our nature.</p>

<p>From other side if there is interface CakeCooker then we probably can name implementations like FastCakeCooker, HTTPCakeCooker, MockCakeCooker but it doesn&#8217;t resolve duplication problem.</p>

<p>BTW often it&#8217;s harder to get working software then to figure out naming conventions</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Isa Goksu</title>
		<link>http://isagoksu.com/2009/development/java/naming-the-java-implementation-classes/comment-page-1/#comment-2828</link>
		<dc:creator>Isa Goksu</dc:creator>
		<pubDate>Sun, 19 Jul 2009 05:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://isagoksu.com/2009/general/naming-the-java-implementation-classes/#comment-2828</guid>
		<description>&lt;p&gt;@andrew, yeah that&#039;s another problem too. If you have only one implementation for that particular interface and it&#039;s hanging there 3 years, then YAGNI says maybe you don&#039;t need an interface there :) A bit of the problem comes from Spring DI mechanism though. But that&#039;s another story..&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@andrew, yeah that&#8217;s another problem too. If you have only one implementation for that particular interface and it&#8217;s hanging there 3 years, then YAGNI says maybe you don&#8217;t need an interface there :) A bit of the problem comes from Spring DI mechanism though. But that&#8217;s another story..</p>]]></content:encoded>
	</item>
</channel>
</rss>

