<?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: Java anti-pattern: splitting the project into multiple projects	</title>
	<atom:link href="http://matteo.vaccari.name/blog/archives/134/feed" rel="self" type="application/rss+xml" />
	<link>http://matteo.vaccari.name/blog/archives/134</link>
	<description>Extreme enthusiasm</description>
	<lastBuildDate>
	Mon, 25 Feb 2019 15:18:16 +0000	</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.1.1</generator>
			<item>
				<title>
				By: Charles				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-316834</link>
		<dc:creator><![CDATA[Charles]]></dc:creator>
		<pubDate>Fri, 26 Jan 2018 13:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-316834</guid>
					<description><![CDATA[I also think that dividing too much could be a dangerous move, especially for simple projects. I see it as over engineering. It&#039;s like adding inheritance right from the get go, just by assuming that the system will eventually grow. That&#039;s an error in my humble opinion. Design must grow as the requirement expands. That&#039;s the same when dividing a project into several Maven projects. There are tons of pros of applying the Divide and Conquer approach, but do you really need it? I think what matteo is trying to say is that in most cases the YAGNI principle will apply (you ain&#039;t gonna need it). 

I can see a real benefit in splitting a project into several modules when the ecosystem is getting large and that you can clearly see the system in several logical parts. As for creating a module for model, another one for peristence, another one for controllers, another one for views, etc... I think that doesn&#039;t make sense and makes it difficult to maintain down the road.

Just my two cents.]]></description>
		<content:encoded><![CDATA[<p>I also think that dividing too much could be a dangerous move, especially for simple projects. I see it as over engineering. It&#8217;s like adding inheritance right from the get go, just by assuming that the system will eventually grow. That&#8217;s an error in my humble opinion. Design must grow as the requirement expands. That&#8217;s the same when dividing a project into several Maven projects. There are tons of pros of applying the Divide and Conquer approach, but do you really need it? I think what matteo is trying to say is that in most cases the YAGNI principle will apply (you ain&#8217;t gonna need it). </p>
<p>I can see a real benefit in splitting a project into several modules when the ecosystem is getting large and that you can clearly see the system in several logical parts. As for creating a module for model, another one for peristence, another one for controllers, another one for views, etc&#8230; I think that doesn&#8217;t make sense and makes it difficult to maintain down the road.</p>
<p>Just my two cents.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: matteo				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-97051</link>
		<dc:creator><![CDATA[matteo]]></dc:creator>
		<pubDate>Tue, 09 Sep 2014 11:16:36 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-97051</guid>
					<description><![CDATA[Thanks for your comment.  As you can see, the original post is from 2008, and it reflects my thoughts at the moment.

I am not completely against breaking down projects in modules, but I still think that it&#039;s a dangerous move; it&#039;s expensive to revert! and if you later discover that the current subdivision in modules does no longer serve your purposes, then you have strong resistance against refactoring the project towards a better structure.  So I advise to break the project in modules only where there&#039;s a demonstrated *need* to do so.

I agree about the argument about the collegue who breaks the design, but only in the sense that the module structure helps collegues understand the design.  Other than that, I think that if a collegue unwittingly breaks my design, it is my fault! I should explain my design better.  Design is an act of communication, and the effectiveness of communication is the responsibility of the speaker.  When collegues break the design, perhaps it is a sign that the design is not good enough; it does not serve our purposes well enough.]]></description>
		<content:encoded><![CDATA[<p>Thanks for your comment.  As you can see, the original post is from 2008, and it reflects my thoughts at the moment.</p>
<p>I am not completely against breaking down projects in modules, but I still think that it&#8217;s a dangerous move; it&#8217;s expensive to revert! and if you later discover that the current subdivision in modules does no longer serve your purposes, then you have strong resistance against refactoring the project towards a better structure.  So I advise to break the project in modules only where there&#8217;s a demonstrated *need* to do so.</p>
<p>I agree about the argument about the collegue who breaks the design, but only in the sense that the module structure helps collegues understand the design.  Other than that, I think that if a collegue unwittingly breaks my design, it is my fault! I should explain my design better.  Design is an act of communication, and the effectiveness of communication is the responsibility of the speaker.  When collegues break the design, perhaps it is a sign that the design is not good enough; it does not serve our purposes well enough.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Chris				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-97050</link>
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 08 Sep 2014 12:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-97050</guid>
					<description><![CDATA[The benefits of splitting any reasonably complex project into multiple sub-projects *far* outweight the cons, in my experience. Especially when you&#039;re working with IntelliJ which lets you refctor and work simultaneously across all modules by respecting the directed acyclic graph of dependencies defined by your Maven POMs.  Splitting projects down enforces separation of concerns by design, assisting unit testing, code reuse and finally... the most important point of all.  We&#039;ve all worked with that one developer who doesn&#039;t understand MVC and wantonly pollutes even your lowest-level Model classes with high level application behaviour.  Well, with a separate model project they can&#039;t do that any more.]]></description>
		<content:encoded><![CDATA[<p>The benefits of splitting any reasonably complex project into multiple sub-projects *far* outweight the cons, in my experience. Especially when you&#8217;re working with IntelliJ which lets you refctor and work simultaneously across all modules by respecting the directed acyclic graph of dependencies defined by your Maven POMs.  Splitting projects down enforces separation of concerns by design, assisting unit testing, code reuse and finally&#8230; the most important point of all.  We&#8217;ve all worked with that one developer who doesn&#8217;t understand MVC and wantonly pollutes even your lowest-level Model classes with high level application behaviour.  Well, with a separate model project they can&#8217;t do that any more.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: matteo				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-71440</link>
		<dc:creator><![CDATA[matteo]]></dc:creator>
		<pubDate>Thu, 06 Nov 2008 16:14:24 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-71440</guid>
					<description><![CDATA[I realize that saying &quot;I don&#039;t like it&quot; is not saying much.  So let me explain better.  Maven lets you cope with projects with complex dependencies, at the cost of introducing a complex tool.  I&#039;d rather work at reducing complexity and dependencies.  I think Maven is the wrong answer to a real problem.  The good answer is &quot;simplify!&quot;]]></description>
		<content:encoded><![CDATA[<p>I realize that saying &#8220;I don&#8217;t like it&#8221; is not saying much.  So let me explain better.  Maven lets you cope with projects with complex dependencies, at the cost of introducing a complex tool.  I&#8217;d rather work at reducing complexity and dependencies.  I think Maven is the wrong answer to a real problem.  The good answer is &#8220;simplify!&#8221;</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: matteo				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-71432</link>
		<dc:creator><![CDATA[matteo]]></dc:creator>
		<pubDate>Thu, 06 Nov 2008 07:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-71432</guid>
					<description><![CDATA[Hi Subash,

Thanks for sharing your experience.  I&#039;m not against modularization!  I&#039;m just saying that splitting your modules in separate Java projects does increase complexity.  

Modularization is good, but once you split your code across multiple &quot;projects&quot; it becomes more difficult to do large refactorings.  You have an incentive to keep your refactoring contained within a project, and lose the gains you might get from refactoring across them. 

So I will keep my code in a single project until the time comes when it&#039;s clear I will benefit from a split.  It&#039;s a tradeoff between simplicity and flexibility.  More flexibility comes at a cost!

The thing about ant scripts, I agree that you risk having a lot of redundancy and cruft in them; yet there&#039;s nothing to stop you from refactoring them and keeping them clean.  Build scripts are code, just like your java code, and must be kept clean by refactoring too.

Perhaps when I&#039;ll take the time to learn Maven well I will change my mind.  What I&#039;ve seen so far about Maven I don&#039;t like.  I&#039;m not crazy about Ant either, but it suits much better my taste and opinions.]]></description>
		<content:encoded><![CDATA[<p>Hi Subash,</p>
<p>Thanks for sharing your experience.  I&#8217;m not against modularization!  I&#8217;m just saying that splitting your modules in separate Java projects does increase complexity.  </p>
<p>Modularization is good, but once you split your code across multiple &#8220;projects&#8221; it becomes more difficult to do large refactorings.  You have an incentive to keep your refactoring contained within a project, and lose the gains you might get from refactoring across them. </p>
<p>So I will keep my code in a single project until the time comes when it&#8217;s clear I will benefit from a split.  It&#8217;s a tradeoff between simplicity and flexibility.  More flexibility comes at a cost!</p>
<p>The thing about ant scripts, I agree that you risk having a lot of redundancy and cruft in them; yet there&#8217;s nothing to stop you from refactoring them and keeping them clean.  Build scripts are code, just like your java code, and must be kept clean by refactoring too.</p>
<p>Perhaps when I&#8217;ll take the time to learn Maven well I will change my mind.  What I&#8217;ve seen so far about Maven I don&#8217;t like.  I&#8217;m not crazy about Ant either, but it suits much better my taste and opinions.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Subhash				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-71431</link>
		<dc:creator><![CDATA[Subhash]]></dc:creator>
		<pubDate>Thu, 06 Nov 2008 07:25:01 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-71431</guid>
					<description><![CDATA[I am a strong believer in divide-and-conquer. Complexity can be managed easily by dividing the project into smaller modules.

Let me take your points one by one:

   1. increases complexity a lot,
      Never. Project complexity is never increased by dividing source code into different modules. Each module is independently testable, and looking at any module you can immediately recognize clarity and purpose of it. Of course, if you say there are more integration points, yes, there are. But that does not increase complexity.


   2. makes integration longer and more difficult,
      Same as first point. Integration is not more difficult. It is easier infact. Just use a already well-tested library without working about the details of that module.


   3. is an obstacle to the evolution of the design,
      How can it be? When a project is modularized, only then design evolves. Monolithic folder structure creates fear in the minds of the programmers to approach the code itself due to perceived complexity.

   4. and results in a lot of work being spent on the build system.
      Before initiating a project/module, I spend considerable time configuring Maven (but in later versions of Maven this has reduced considerably due to archetype plugin). This I consider a one-time investment. When this is done correctly, all my team mates are able to consistently build the modules effectively.



This sort of things drives people to introduce things like Maven or Ivy in the project, and that brings a lot of additional complexity.


I use Maven. I have been using it since its inception. It does not increase complexity, but reduces it to a great extent. Using standard conventions I am not writing redundant Ant build scripts these days.



With multiple projects it happens that you do work in one project, and the other projects don’t “see” your latest modifications.


This is never the case if we are managing projects using Maven. We define a parent project with all the sub-modules inside it. Parent changes are always available to the developers.]]></description>
		<content:encoded><![CDATA[<p>I am a strong believer in divide-and-conquer. Complexity can be managed easily by dividing the project into smaller modules.</p>
<p>Let me take your points one by one:</p>
<p>   1. increases complexity a lot,<br />
      Never. Project complexity is never increased by dividing source code into different modules. Each module is independently testable, and looking at any module you can immediately recognize clarity and purpose of it. Of course, if you say there are more integration points, yes, there are. But that does not increase complexity.</p>
<p>   2. makes integration longer and more difficult,<br />
      Same as first point. Integration is not more difficult. It is easier infact. Just use a already well-tested library without working about the details of that module.</p>
<p>   3. is an obstacle to the evolution of the design,<br />
      How can it be? When a project is modularized, only then design evolves. Monolithic folder structure creates fear in the minds of the programmers to approach the code itself due to perceived complexity.</p>
<p>   4. and results in a lot of work being spent on the build system.<br />
      Before initiating a project/module, I spend considerable time configuring Maven (but in later versions of Maven this has reduced considerably due to archetype plugin). This I consider a one-time investment. When this is done correctly, all my team mates are able to consistently build the modules effectively.</p>
<p>This sort of things drives people to introduce things like Maven or Ivy in the project, and that brings a lot of additional complexity.</p>
<p>I use Maven. I have been using it since its inception. It does not increase complexity, but reduces it to a great extent. Using standard conventions I am not writing redundant Ant build scripts these days.</p>
<p>With multiple projects it happens that you do work in one project, and the other projects don’t “see” your latest modifications.</p>
<p>This is never the case if we are managing projects using Maven. We define a parent project with all the sub-modules inside it. Parent changes are always available to the developers.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Tommaso Torti				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-71397</link>
		<dc:creator><![CDATA[Tommaso Torti]]></dc:creator>
		<pubDate>Tue, 04 Nov 2008 10:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-71397</guid>
					<description><![CDATA[how to manage multiple related projects ? 

buildall.sh : 
cd project1
ant 
cp project1/dist/project1.jar project2/lib
cd project 2 
ant
cp project2/dist/project2.jar project3/lib
....

very simple, very clear.

&quot;But i cannot run sh in my windows pc!&quot;
First solution: no windows at all 
Second solution: cygwin]]></description>
		<content:encoded><![CDATA[<p>how to manage multiple related projects ? </p>
<p>buildall.sh :<br />
cd project1<br />
ant<br />
cp project1/dist/project1.jar project2/lib<br />
cd project 2<br />
ant<br />
cp project2/dist/project2.jar project3/lib<br />
&#8230;.</p>
<p>very simple, very clear.</p>
<p>&#8220;But i cannot run sh in my windows pc!&#8221;<br />
First solution: no windows at all<br />
Second solution: cygwin</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Paolo Perrotta				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-71388</link>
		<dc:creator><![CDATA[Paolo Perrotta]]></dc:creator>
		<pubDate>Mon, 03 Nov 2008 22:14:05 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-71388</guid>
					<description><![CDATA[Amen that. Sorry Fabrizio, to me this is definitely an antipattern - meaning that it seems to do more wrong than good on a global scale (your mileage may differ).

The deepest problem with the whole concept is that it usually degenerates into one &quot;star&quot; team writing the &quot;infrastructure&quot;, or &quot;framework&quot;, or some similar kind of bullshit, for the other less-skilled teams to consume. I work on such a team right now, and I still think that the cheaper way to improve productivity in most companies would be to take all the infrastructure guys out in the open and shoot them.

It takes a nearly non-human amount of humility to do a framework right. Most framework teams seem to just go out on a tangent and produce the kind of dog food that they wouldn&#039;t eat themselves. I&#039;m comfortable with saying that in my 10-years-plus experience, exactly 100% of the company frameworks I&#039;ve witnessed were utter shit. (Yes, again, I was guilty of that kind of crime myself).]]></description>
		<content:encoded><![CDATA[<p>Amen that. Sorry Fabrizio, to me this is definitely an antipattern &#8211; meaning that it seems to do more wrong than good on a global scale (your mileage may differ).</p>
<p>The deepest problem with the whole concept is that it usually degenerates into one &#8220;star&#8221; team writing the &#8220;infrastructure&#8221;, or &#8220;framework&#8221;, or some similar kind of bullshit, for the other less-skilled teams to consume. I work on such a team right now, and I still think that the cheaper way to improve productivity in most companies would be to take all the infrastructure guys out in the open and shoot them.</p>
<p>It takes a nearly non-human amount of humility to do a framework right. Most framework teams seem to just go out on a tangent and produce the kind of dog food that they wouldn&#8217;t eat themselves. I&#8217;m comfortable with saying that in my 10-years-plus experience, exactly 100% of the company frameworks I&#8217;ve witnessed were utter shit. (Yes, again, I was guilty of that kind of crime myself).</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: Andrea Maietta				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-71375</link>
		<dc:creator><![CDATA[Andrea Maietta]]></dc:creator>
		<pubDate>Mon, 03 Nov 2008 09:05:17 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-71375</guid>
					<description><![CDATA[We are now using separate projects as we inherited badly coupled code (e.g. why would you need a dependency on servlet.jar to test a class that only parses strings?) that is very difficult to decouple, no matter how much Feathers, so burned once shy twice.

No Maven, no cry... NetBeans transparently handles the increased complexity in build files, as all you have to do is to declare that your webapp depends on the model jar and so on and so forth. That also pushes us to consider design more properly, much more than having to rely on the way we deal with packages.]]></description>
		<content:encoded><![CDATA[<p>We are now using separate projects as we inherited badly coupled code (e.g. why would you need a dependency on servlet.jar to test a class that only parses strings?) that is very difficult to decouple, no matter how much Feathers, so burned once shy twice.</p>
<p>No Maven, no cry&#8230; NetBeans transparently handles the increased complexity in build files, as all you have to do is to declare that your webapp depends on the model jar and so on and so forth. That also pushes us to consider design more properly, much more than having to rely on the way we deal with packages.</p>
]]></content:encoded>
						</item>
						<item>
				<title>
				By: matteo				</title>
				<link>http://matteo.vaccari.name/blog/archives/134/comment-page-1#comment-71349</link>
		<dc:creator><![CDATA[matteo]]></dc:creator>
		<pubDate>Sat, 01 Nov 2008 20:42:52 +0000</pubDate>
		<guid isPermaLink="false">http://matteo.vaccari.name/blog/?p=134#comment-71349</guid>
					<description><![CDATA[Fabrizio: why don&#039;t you share a few tips on how to do it right? :-)]]></description>
		<content:encoded><![CDATA[<p>Fabrizio: why don&#8217;t you share a few tips on how to do it right? :-)</p>
]]></content:encoded>
						</item>
			</channel>
</rss>
