Note that there are some explanatory texts on larger screens.

plurals
  1. POIDE independence for source code
    primarykey
    data
    text
    <p>Recently I posted a question here on stack overflow, looking for some instruction on how to create a jar file with dependencies in eclipse. When I posed the question it quickly became obvious that I had poorly worded my question, and that it was confusing people who were responding, but that mishap brought up a point of interest I would like a little explanation for. So when I posted my question on how to do this in eclipse I almost immediately got the response “Switch to Maven, don’t rely on your IDE to do the work of a build tool”. This seemed a little evasive rather than helpful to me, especially considering I had mentioned that I was already using Ant to generate a jar file for my projects. When I asked why, I got the response back “Because your code should be able to be built independently of the IDE in which it was written”.</p> <p>So first off, in what way is having the ability to create a jar file, with its dependencies either in the jar, or alongside it in a lib folder making my code dependent on the IDE? My code, with or without a dist directory still contains an src directory, with a typical java source directory structure. This seems like a non sequitur. I feel that if I’m say working with a class library, and making some small changes and need to deploy to a development machine to test, I should be able to simply build a jar file with all the dependencies easily in my IDE to deploy it someplace. Having that ability is a build step, not a design step. It doesn’t change the structure of the source code directories, or anything about the code at all. It doesn’t create any partial classes, or other sneaky VS type stuff that is designed solely for the IDE I’m using, its just requesting a jar file with a valid manifest, and its dependencies. Is it really that much to ask of an IDE, or do I have this wrong? </p> <p>It also seems to me that any change from one IDE to another is going to require some conversion work. Nothing about the code I’ve written in java explicitly states where a given assembly is, and assuming that it’s not some API whose location on disk is added to an environmental variable during an install, you will always have to resolve these references manually. And correct me if im wrong, but doesnt the java compiler enforce the directory structure of the source code (throwing NoClassDef type exceptions if its not right), and therefore the IDE (at least for java) is built around that requirement? I also feel that a change in IDE is a rare event. People get comfortable with their tools, and don’t just randomly decide to start using a whole new IDE, for the same project, in the same language. Other circumstances need to pressure a person into the change (new technology or whatever). I would also think that the likelihood of a number of developers working at the same place, in the same language, and using multiple IDEs, is pretty much non-existent. Every place I’ve worked the entire development teams uses the same set of tools, where the development team is working on the same sort of projects. Android devs are using eclipse, ASP.NET devs are using Visual Studio, etc. I understand that it happens, but in my experience a change in IDE usually means converting to whatever new version of the same IDE was recently released, and usually it comes with some type of backward compatibility, or a conversion wizard. </p> <p>I’m not trying to be facetious, nor take a stab at the people involved in my earlier post, I’m legitimately interested in their reasoning. Given the number of up votes their answers receive, it would appear that most of the community agree, and in the interest of not being a sheep, please help me understand.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload