7

This question is not related to a specific programming language but this is confusing me all the time when it comes to the question how to structure my project directories in a “professional way”.

AFAIK the bin directory contains compiled and compressed executable binary files while the src directory contains the raw source code and the build directory contains uncompressed executables (e.g. for local execution).

According to this Answer the dist directory contains the compressed/archived output stuff. But what’s the difference between bin and dist then? And what does a deploy folder contain aside from all these folders?

And finally: Where to put the assets (images, JSON, whatever) in? assets or vendor?

Community
  • 1
  • 1
headacheCoder
  • 4,503
  • 8
  • 30
  • 33
  • I think the final question maybe split into a new question of its own, as it is a non-trivial subject and may differ according to project needs. For example, some projects only use a few images, or maybe an icon-font library, in that case an asset folder would be acceptable. Other projects may require to serve images and other resources dynamically, like streaming video, in which case is better to set a CDN server to deliver static files. – Amy Pellegrini Aug 30 '16 at 11:26
  • related - http://stackoverflow.com/q/23730882/104380 – vsync Jan 11 '17 at 20:13

2 Answers2

0

The folder structures will always specific and different each other based on the technology and build tools we are using. As per the java I can suggest

For core java apps the structure will be

Project folder inside that we will have LIB SRC CLASSES folders in LIB all the archievs libraries of java SRC normally Source code .java files CLASSES cantaines always compiled java classes. other files normally We use RESOURCES Folder

And for WEB APPLICATIONS build structures decided by the build tools and servlet specifications as per the ServletSpecification PROJECT FOLDER inside WEB-INF folder inside WEB-INF classes and lib folders out side WEB-INF there are all resources and jsp html script files should be.

If use ANT TOOL there will be configuration xml file. there we can create and use the made the above servlet specified file structure. If use MAVEN it will take care to create above folder structure automatically from maven folder structures.

If we use plugins of maven and ant in the IDES that will take care every thing.

Thanks..

sansoft
  • 3
  • 2
0

As you tagged your question with java, I assume the projects you mention are java projects. Have a look at Standard Directory Layout of Maven, it might be helpfull.

Boris
  • 22,667
  • 16
  • 50
  • 71