<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Comments on: [link] Package by feature</title>
	<atom:link href="http://johannesbrodwall.com/2008/07/29/link-package-by-feature/feed/" rel="self" type="application/rss+xml" />
	<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/</link>
	<description>Johannes Brodwall&#039;s Musings on Software Architecture and Programming</description>
	<lastBuildDate>Fri, 27 Jan 2012 09:40:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Thomas Ferris Nicolaisen</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-79454</link>
		<dc:creator>Thomas Ferris Nicolaisen</dc:creator>
		<pubDate>Wed, 06 Aug 2008 22:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-79454</guid>
		<description>Count me as package by feature (or group of features). A package is for me merely a way of hiding implementation/internal classes. The book Effective Java 2nd ed. explains this in Item 13: Minimize the accessibility of classes and members. 

Although I traditionally followed the by-layer rule just because everyone else did it, this was because I didn&#039;t understand the potential of using package-private (i.e. didn&#039;t know Java). Instead we tended to use Maven multi-module projects to seperate layers. These give you an extra bonus of enforcing directional dependencies between modules (don&#039;t access the web layer from the dao, etc). But it seems that people have become lazy with the use of traditional moduling with packages.. 

I recently added a new piece of functionality to our project. The use case was evaluating an organization number to decide what sort of insurances your company can buy online. I started off by making a new service, EvaluationService. I put it in its own package called &#039;evaluation&#039;. I introduced a domain object called CustomerEvaluation (the result of doing an evaluation with the service), which I placed in our &#039;domain&#039; package (by layer), but I would&#039;ve rather put it in the &#039;evaluation&#039; package (by feature). We still put all our exceptions in an &#039;exceptions&#039; package, btw. These conventions are more for traditional reasons than for any good reason.

Anyway, I then implemented the EvaluationService with lots of underlying bits and pieces like IndustryCodeService, LegacyCodeTranslator and so on, all of which I dumped into the &#039;evaluation&#039; package and made them package-private because they were just details needed to get the EvaluationService working. The evaluation package now feels really clean. It has its own Spring-context, its own nice set of tests, and one single public API exposed in the EvaluationService (and the CustomerEvaluation object).

If another piece of functionality ever needs the IndustryCodeService, I&#039;ll probably drag it out of the &#039;evaluation&#039; package, make it public and create an &#039;industry-code&#039; package that both existing packages can depend on.

If it became necessary to enforce that the industry-code package would not create circular references by depending &#039;evaluation&#039; or another, I would move it into another maven module (project) higher up in the dependency hierarchy. This would be seperating layers for the reason of enforcing good design, I suppose.

Classes could still be in the same package while being in different projects/modules.. Haven&#039;t played around too much with that approach but it feels like it has potential. Wow, long comment better quit my rambling now. Feature package +1 :)</description>
		<content:encoded><![CDATA[<p>Count me as package by feature (or group of features). A package is for me merely a way of hiding implementation/internal classes. The book Effective Java 2nd ed. explains this in Item 13: Minimize the accessibility of classes and members. </p>
<p>Although I traditionally followed the by-layer rule just because everyone else did it, this was because I didn&#8217;t understand the potential of using package-private (i.e. didn&#8217;t know Java). Instead we tended to use Maven multi-module projects to seperate layers. These give you an extra bonus of enforcing directional dependencies between modules (don&#8217;t access the web layer from the dao, etc). But it seems that people have become lazy with the use of traditional moduling with packages.. </p>
<p>I recently added a new piece of functionality to our project. The use case was evaluating an organization number to decide what sort of insurances your company can buy online. I started off by making a new service, EvaluationService. I put it in its own package called &#8216;evaluation&#8217;. I introduced a domain object called CustomerEvaluation (the result of doing an evaluation with the service), which I placed in our &#8216;domain&#8217; package (by layer), but I would&#8217;ve rather put it in the &#8216;evaluation&#8217; package (by feature). We still put all our exceptions in an &#8216;exceptions&#8217; package, btw. These conventions are more for traditional reasons than for any good reason.</p>
<p>Anyway, I then implemented the EvaluationService with lots of underlying bits and pieces like IndustryCodeService, LegacyCodeTranslator and so on, all of which I dumped into the &#8216;evaluation&#8217; package and made them package-private because they were just details needed to get the EvaluationService working. The evaluation package now feels really clean. It has its own Spring-context, its own nice set of tests, and one single public API exposed in the EvaluationService (and the CustomerEvaluation object).</p>
<p>If another piece of functionality ever needs the IndustryCodeService, I&#8217;ll probably drag it out of the &#8216;evaluation&#8217; package, make it public and create an &#8216;industry-code&#8217; package that both existing packages can depend on.</p>
<p>If it became necessary to enforce that the industry-code package would not create circular references by depending &#8216;evaluation&#8217; or another, I would move it into another maven module (project) higher up in the dependency hierarchy. This would be seperating layers for the reason of enforcing good design, I suppose.</p>
<p>Classes could still be in the same package while being in different projects/modules.. Haven&#8217;t played around too much with that approach but it feels like it has potential. Wow, long comment better quit my rambling now. Feature package +1 :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas Ferris Nicolaisen</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-84473</link>
		<dc:creator>Thomas Ferris Nicolaisen</dc:creator>
		<pubDate>Wed, 06 Aug 2008 20:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-84473</guid>
		<description>Count me as package by feature (or group of features). A package is for me merely a way of hiding implementation/internal classes. The book Effective Java 2nd ed. explains this in Item 13: Minimize the accessibility of classes and members. &lt;br&gt;&lt;br&gt;Although I traditionally followed the by-layer rule just because everyone else did it, this was because I didn&#039;t understand the potential of using package-private (i.e. didn&#039;t know Java). Instead we tended to use Maven multi-module projects to seperate layers. These give you an extra bonus of enforcing directional dependencies between modules (don&#039;t access the web layer from the dao, etc). But it seems that people have become lazy with the use of traditional moduling with packages.. &lt;br&gt;&lt;br&gt;I recently added a new piece of functionality to our project. The use case was evaluating an organization number to decide what sort of insurances your company can buy online. I started off by making a new service, EvaluationService. I put it in its own package called &#039;evaluation&#039;. I introduced a domain object called CustomerEvaluation (the result of doing an evaluation with the service), which I placed in our &#039;domain&#039; package (by layer), but I would&#039;ve rather put it in the &#039;evaluation&#039; package (by feature). We still put all our exceptions in an &#039;exceptions&#039; package, btw. These conventions are more for traditional reasons than for any good reason.&lt;br&gt;&lt;br&gt;Anyway, I then implemented the EvaluationService with lots of underlying bits and pieces like IndustryCodeService, LegacyCodeTranslator and so on, all of which I dumped into the &#039;evaluation&#039; package and made them package-private because they were just details needed to get the EvaluationService working. The evaluation package now feels really clean. It has its own Spring-context, its own nice set of tests, and one single public API exposed in the EvaluationService (and the CustomerEvaluation object).&lt;br&gt;&lt;br&gt;If another piece of functionality ever needs the IndustryCodeService, I&#039;ll probably drag it out of the &#039;evaluation&#039; package, make it public and create an &#039;industry-code&#039; package that both existing packages can depend on.&lt;br&gt;&lt;br&gt;If it became necessary to enforce that the industry-code package would not create circular references by depending &#039;evaluation&#039; or another, I would move it into another maven module (project) higher up in the dependency hierarchy. This would be seperating layers for the reason of enforcing good design, I suppose.&lt;br&gt;&lt;br&gt;Classes could still be in the same package while being in different projects/modules.. Haven&#039;t played around too much with that approach but it feels like it has potential. Wow, long comment better quit my rambling now. Feature package +1 :)</description>
		<content:encoded><![CDATA[<p>Count me as package by feature (or group of features). A package is for me merely a way of hiding implementation/internal classes. The book Effective Java 2nd ed. explains this in Item 13: Minimize the accessibility of classes and members. </p>
<p>Although I traditionally followed the by-layer rule just because everyone else did it, this was because I didn&#39;t understand the potential of using package-private (i.e. didn&#39;t know Java). Instead we tended to use Maven multi-module projects to seperate layers. These give you an extra bonus of enforcing directional dependencies between modules (don&#39;t access the web layer from the dao, etc). But it seems that people have become lazy with the use of traditional moduling with packages.. </p>
<p>I recently added a new piece of functionality to our project. The use case was evaluating an organization number to decide what sort of insurances your company can buy online. I started off by making a new service, EvaluationService. I put it in its own package called &#39;evaluation&#39;. I introduced a domain object called CustomerEvaluation (the result of doing an evaluation with the service), which I placed in our &#39;domain&#39; package (by layer), but I would&#39;ve rather put it in the &#39;evaluation&#39; package (by feature). We still put all our exceptions in an &#39;exceptions&#39; package, btw. These conventions are more for traditional reasons than for any good reason.</p>
<p>Anyway, I then implemented the EvaluationService with lots of underlying bits and pieces like IndustryCodeService, LegacyCodeTranslator and so on, all of which I dumped into the &#39;evaluation&#39; package and made them package-private because they were just details needed to get the EvaluationService working. The evaluation package now feels really clean. It has its own Spring-context, its own nice set of tests, and one single public API exposed in the EvaluationService (and the CustomerEvaluation object).</p>
<p>If another piece of functionality ever needs the IndustryCodeService, I&#39;ll probably drag it out of the &#39;evaluation&#39; package, make it public and create an &#39;industry-code&#39; package that both existing packages can depend on.</p>
<p>If it became necessary to enforce that the industry-code package would not create circular references by depending &#39;evaluation&#39; or another, I would move it into another maven module (project) higher up in the dependency hierarchy. This would be seperating layers for the reason of enforcing good design, I suppose.</p>
<p>Classes could still be in the same package while being in different projects/modules.. Haven&#39;t played around too much with that approach but it feels like it has potential. Wow, long comment better quit my rambling now. Feature package +1 :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eivind Nordby</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-74989</link>
		<dc:creator>Eivind Nordby</dc:creator>
		<pubDate>Thu, 31 Jul 2008 08:32:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-74989</guid>
		<description>I find it quite natural to organize user interfaces, &quot;service layer&quot; functionality and support packages by feature, but I am not so convinced concerning cross-cutting domain classes. A good architecture should also support your needs for variation. If for instance you need both a rich GUI, a web interface, an XML interface and test routines on top of your domain, would you melt it all into one single package then? Maybe a pragmatic mixture with an open mind might be an option?</description>
		<content:encoded><![CDATA[<p>I find it quite natural to organize user interfaces, &#8220;service layer&#8221; functionality and support packages by feature, but I am not so convinced concerning cross-cutting domain classes. A good architecture should also support your needs for variation. If for instance you need both a rich GUI, a web interface, an XML interface and test routines on top of your domain, would you melt it all into one single package then? Maybe a pragmatic mixture with an open mind might be an option?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eivind Nordby</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-84472</link>
		<dc:creator>Eivind Nordby</dc:creator>
		<pubDate>Thu, 31 Jul 2008 06:32:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-84472</guid>
		<description>I find it quite natural to organize user interfaces, &quot;service layer&quot; functionality and support packages by feature, but I am not so convinced concerning cross-cutting domain classes. A good architecture should also support your needs for variation. If for instance you need both a rich GUI, a web interface, an XML interface and test routines on top of your domain, would you melt it all into one single package then? Maybe a pragmatic mixture with an open mind might be an option?</description>
		<content:encoded><![CDATA[<p>I find it quite natural to organize user interfaces, &#8220;service layer&#8221; functionality and support packages by feature, but I am not so convinced concerning cross-cutting domain classes. A good architecture should also support your needs for variation. If for instance you need both a rich GUI, a web interface, an XML interface and test routines on top of your domain, would you melt it all into one single package then? Maybe a pragmatic mixture with an open mind might be an option?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Espen Dalløkken</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-74968</link>
		<dc:creator>Espen Dalløkken</dc:creator>
		<pubDate>Thu, 31 Jul 2008 06:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-74968</guid>
		<description>@Johannes: I was speaking from a theoretical stand point. One of the reasons why you would use an agile approach is because of the idea that you do not know all the details about what it is you are going to create right off the bat. Therefor you iterate and gradually gain more knowledge of the problem domain. Given this theory you do not know a lot when starting a project and therefor naming features could be a challeng, but this might not be such a big issue in reality.</description>
		<content:encoded><![CDATA[<p>@Johannes: I was speaking from a theoretical stand point. One of the reasons why you would use an agile approach is because of the idea that you do not know all the details about what it is you are going to create right off the bat. Therefor you iterate and gradually gain more knowledge of the problem domain. Given this theory you do not know a lot when starting a project and therefor naming features could be a challeng, but this might not be such a big issue in reality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Espen Dalløkken</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-84471</link>
		<dc:creator>Espen Dalløkken</dc:creator>
		<pubDate>Thu, 31 Jul 2008 04:18:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-84471</guid>
		<description>@Johannes: I was speaking from a theoretical stand point. One of the reasons why you would use an agile approach is because of the idea that you do not know all the details about what it is you are going to create right off the bat. Therefor you iterate and gradually gain more knowledge of the problem domain. Given this theory you do not know a lot when starting a project and therefor naming features could be a challeng, but this might not be such a big issue in reality.</description>
		<content:encoded><![CDATA[<p>@Johannes: I was speaking from a theoretical stand point. One of the reasons why you would use an agile approach is because of the idea that you do not know all the details about what it is you are going to create right off the bat. Therefor you iterate and gradually gain more knowledge of the problem domain. Given this theory you do not know a lot when starting a project and therefor naming features could be a challeng, but this might not be such a big issue in reality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Filip van Laenen</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-74646</link>
		<dc:creator>Filip van Laenen</dc:creator>
		<pubDate>Wed, 30 Jul 2008 12:06:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-74646</guid>
		<description>I find it odd that so many people are writing code that doesn&#039;t seem to implement a feature. Or maybe more correct: they don&#039;t know which feature they&#039;re working on when they write the code. Authorization code is either an authorization feature, part of the bigger security feature just like the authentication feature, just to give an example. If you don&#039;t think security is a feature, then try to leave the security out and see how your system will do...

The same goes of course for wrappers, adapters, bridges, and whatever: if you don&#039;t know why you&#039;re writing them, then don&#039;t write them, or think a bit harder about why you&#039;re really writing them. I think names like «util» and «common» are more a sign og laziness than anything else.</description>
		<content:encoded><![CDATA[<p>I find it odd that so many people are writing code that doesn&#8217;t seem to implement a feature. Or maybe more correct: they don&#8217;t know which feature they&#8217;re working on when they write the code. Authorization code is either an authorization feature, part of the bigger security feature just like the authentication feature, just to give an example. If you don&#8217;t think security is a feature, then try to leave the security out and see how your system will do&#8230;</p>
<p>The same goes of course for wrappers, adapters, bridges, and whatever: if you don&#8217;t know why you&#8217;re writing them, then don&#8217;t write them, or think a bit harder about why you&#8217;re really writing them. I think names like «util» and «common» are more a sign og laziness than anything else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes Brodwall</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-74626</link>
		<dc:creator>Johannes Brodwall</dc:creator>
		<pubDate>Wed, 30 Jul 2008 11:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-74626</guid>
		<description>Thanks to Marcus and Espen for valuable experiences of trying this kind of approach.

I think the most valuable point is that being dogmatic either way (like the original article) is a bad thing. Like Thomas says: &quot;There are no &#039;best practices&#039;, only good ones&quot;.

But I find Espen&#039;s comment about not having enough information to create the structure in an agile project to be puzzling. I find I can organize user stories in rough features. Isn&#039;t this sufficient?

Does anyone else have experience on finding feature categories for your code?</description>
		<content:encoded><![CDATA[<p>Thanks to Marcus and Espen for valuable experiences of trying this kind of approach.</p>
<p>I think the most valuable point is that being dogmatic either way (like the original article) is a bad thing. Like Thomas says: &#8220;There are no &#8216;best practices&#8217;, only good ones&#8221;.</p>
<p>But I find Espen&#8217;s comment about not having enough information to create the structure in an agile project to be puzzling. I find I can organize user stories in rough features. Isn&#8217;t this sufficient?</p>
<p>Does anyone else have experience on finding feature categories for your code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Filip van Laenen</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-84470</link>
		<dc:creator>Filip van Laenen</dc:creator>
		<pubDate>Wed, 30 Jul 2008 10:06:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-84470</guid>
		<description>I find it odd that so many people are writing code that doesn&#039;t seem to implement a feature. Or maybe more correct: they don&#039;t know which feature they&#039;re working on when they write the code. Authorization code is either an authorization feature, part of the bigger security feature just like the authentication feature, just to give an example. If you don&#039;t think security is a feature, then try to leave the security out and see how your system will do...&lt;br&gt;&lt;br&gt;The same goes of course for wrappers, adapters, bridges, and whatever: if you don&#039;t know why you&#039;re writing them, then don&#039;t write them, or think a bit harder about why you&#039;re really writing them. I think names like «util» and «common» are more a sign og laziness than anything else.</description>
		<content:encoded><![CDATA[<p>I find it odd that so many people are writing code that doesn&#39;t seem to implement a feature. Or maybe more correct: they don&#39;t know which feature they&#39;re working on when they write the code. Authorization code is either an authorization feature, part of the bigger security feature just like the authentication feature, just to give an example. If you don&#39;t think security is a feature, then try to leave the security out and see how your system will do&#8230;</p>
<p>The same goes of course for wrappers, adapters, bridges, and whatever: if you don&#39;t know why you&#39;re writing them, then don&#39;t write them, or think a bit harder about why you&#39;re really writing them. I think names like «util» and «common» are more a sign og laziness than anything else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes Brodwall</title>
		<link>http://johannesbrodwall.com/2008/07/29/link-package-by-feature/comment-page-1/#comment-84469</link>
		<dc:creator>Johannes Brodwall</dc:creator>
		<pubDate>Wed, 30 Jul 2008 09:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.brodwall.com/johannes/blog/2008/07/29/link-package-by-feature/#comment-84469</guid>
		<description>Thanks to Marcus and Espen for valuable experiences of trying this kind of approach.&lt;br&gt;&lt;br&gt;I think the most valuable point is that being dogmatic either way (like the original article) is a bad thing. Like Thomas says: &quot;There are no &#039;best practices&#039;, only good ones&quot;.&lt;br&gt;&lt;br&gt;But I find Espen&#039;s comment about not having enough information to create the structure in an agile project to be puzzling. I find I can organize user stories in rough features. Isn&#039;t this sufficient?&lt;br&gt;&lt;br&gt;Does anyone else have experience on finding feature categories for your code?</description>
		<content:encoded><![CDATA[<p>Thanks to Marcus and Espen for valuable experiences of trying this kind of approach.</p>
<p>I think the most valuable point is that being dogmatic either way (like the original article) is a bad thing. Like Thomas says: &#8220;There are no &#39;best practices&#39;, only good ones&#8221;.</p>
<p>But I find Espen&#39;s comment about not having enough information to create the structure in an agile project to be puzzling. I find I can organize user stories in rough features. Isn&#39;t this sufficient?</p>
<p>Does anyone else have experience on finding feature categories for your code?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

