Update Project Structure and Naming Schemes authored by Morgan Williams's avatar Morgan Williams
At first glance there may appear to be many different projects in the companion app, but this is not eh case. Code will only be written in the `lib` and `test` as the code from the `lib` is compiled down to run on android and ios. At first glance there may appear to be many different projects in the companion app, but this is not the case. Code will only be written in the `lib` and `test` as the code from the `lib` is compiled down to run on android and ios.
## Naming ## Naming
The language for this project is Dart so the all the file are .dart files. The names of all files should be in all lower case with word separated by underscores. Files should also be named in the format of what it does followed by what it is. For example, a datasorce that is used to complete objectives would be called `complete_objective_datasource.dart`. The language for this project is Dart so the all the file are .dart files. The names of all files should be in all lower case with word separated by underscores. Files should also be named in the format of what it does followed by what it is. For example, a datasorce that is used to complete objectives would be called `complete_objective_datasource.dart`.
...@@ -6,8 +6,9 @@ The language for this project is Dart so the all the file are .dart files. The n ...@@ -6,8 +6,9 @@ The language for this project is Dart so the all the file are .dart files. The n
## Project structure ## Project structure
This project groups item by similar functionality so it easier to find files and know where to write new ones. Each feature should have two folders, data and presentation. This project groups item by similar functionality so it easier to find files and know where to write new ones. Each feature should have two folders, data and presentation.
### Data ### Data
In the data folder there are three folders. One for the controller, called `controller`, one for the datasource, called `datasource`, and one for the repositories, called `repository`. In addition to the files that relate to them each of these folders contains a .dart file what matches the name of the folder. This file contains the imports needed to implement the functionality. In the `data` folder there are four folders. One for the controller, called `controller`, one for the datasource, called `datasource`, one for the repositories, called `repository`, and one for response and request objects, called `model`. In addition to the files that relate to them each of these folders contains a `.dart` file what matches the name of the folder. This file contains the imports needed to implement the functionality.
### Presentation ### Presentation
The presentation folder has two sub folders. One for the views, called `view`, and one for widgets, called `widget`. The `view` folder is used to store all views for the feature and the `widget` folder is used to store any widgets created for repeated use. The `presentation` folder has two sub folders. One for the views, called `view`, and one for widgets, called `widget`. The `view` folder is used to store all views for the feature and the `widget` folder is used to store any widgets created for repeated use.
\ No newline at end of file \ No newline at end of file