Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Project directory structure for a multi-language application

I recently started work on an application that involves both Python and Java components independent of each other. What is the best way to structure the folder hierarchy for the project, in particular the source files?

Right now the structure looks like this:

/src
 -- java packages here
/test
 -- jUnit test packages here
/deployment
 -- Ant scripts here
/bin
/lib
/etc
.gitignore

A possible solution would be to have src/java and src/python (as in, subdirectories under the src folder). Another solution would be to have two separate directories in the project for instance src_java and src_python. anyone worked on a project like this? Is there a de facto convention that should be used?

I've read the answers to this question What is the best project structure for a Python application? but the 6th point wasn't discussed much regarding the non-Python sources.

like image 685
rink.attendant.6 Avatar asked Sep 18 '14 17:09

rink.attendant.6


Video Answer


1 Answers

In Gradle projects, it is recommended to structure the folders like this:

src
  main
    java
    python
  test
    java
    python
build
libs
...
.gitignore
README.md

Maven recommends a similar structure.

Python has different recommendations, but since the Java build tools usually are more sophisticated (due to requiring compilation and output directories for that), I'd go with the Gradle or Maven structure.

like image 139
Clashsoft Avatar answered Oct 25 '22 16:10

Clashsoft