Commit 89f06ac6 authored by Thomas Dupriez's avatar Thomas Dupriez
Browse files

The README file now contains more details about the architecture of the project

parent 21492cf3
......@@ -3,7 +3,14 @@ SBT:
- To use sbt, place yourself at the root of the project (where there is the build.sbt file) and enter "sbt" in the command line. It will start sbt. Then enter "compile" to compile the files that changed since the last compiling, or "run" to do the same job than "compile" + run the project.
- The Main classes for the different groups are in the scala folder (I tried to use java, but SBT didn't detect java main classes properly). But that doesn't prevent you from coding in the java folder and then only putting a single function call in the scala main class, to use your java code.
- The code has to be in the "java" (for java code) and "scala" (for scala code) folders, located in src/main/java and src/main/scala respectively.
- Each group has two dedicated folders, one in the java folder and one in the scala folder. There are minimal examples of files in both folders.
- Each group has a "package". A package is an annotation ("package <package_name>;" in java | "package <package_name>" in scala) that has to be put at the beginning of your files, to indicate in which package they are. A package defines a scope of visibility for the code. It means that different files from the same package are able to see each other. In order to "see" the code from a different package, a file has to "import" the said package ("import <package_name>.*;" for java files | "import <package_name>._" for scala files).
- Each group has a Main class located in its scala folder (it's not in the java one because sbt wasn't able to detect these main classes nicely). When using the "run" command in sbt, you will have to choose which main class you want to use for the execution. These classes are there for test purposes only, they should disappear from the final software. Their purpose is to allow the different groups to test their code by executing it without involving other groups in the process.
- One thing to note is that these test main classes are in the scala groups folders for sbt to see them, not to prevent groups from using java. Groups may even code entirely in java if they want to. In this case, the scala main class can be defined to only call a java function defined by the group, containing the actual main code.
- There is a GlobalMain class, in the core group folder, which is intended to be the final main class of the project.
- The "resources" folder that is on the same level of the scala and java folders should contains things like images and so on as far as I understand it.
- The "target" folders located throughout the project contains in particular the compiled files that sbt generates. I can't think of any reason you could have to interact with them.
Library dependencies can be added in two ways:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment