- api
- config
- lib
- priv
- web
- routes
- surnames
- controllers
- views
- adapters
- tree
- controllers
- views
- adapters
- members
- controllers
- views
- adapters
- fmp
- controllers
- views
- adapters
- layout
- templates
- views
- surnames
- shared
- parsers
- json
- parsers
- plugs
- channels
- routes
This folder should be used for static shared code that doesn't change often, mostly because phoenix hot reloader excludes /lib precisely so you can have a folder to put long-lived code.
/libstructure- we are getting rid of
/srcand what is in/domainwill be moved to/web/shared. /environmentwill be moved to/web/sharedbut ideally we want to remove it all togetherpre-librarywill be removed, and what is inside it will just go up one level (i.e./lib)
- we are getting rid of
We'd have the test files next to the actual files we are testing so that there is less navigation.
This is where the most change is suggested.
-
We would like to have all code for a specific "domain" to be in it's own folder, we have called that
/routes. That way, whenever we have to change something related to surnames all we need to do is open/surnamesfolder.
Each route should then subsequently have the following structure:- /controllers
- controllers get data from adapters, pass it on to views which template and return.
- /views
- these will be mainly json views which will take in data and template it.
- /adapters
- adapters will gather the data and return it.
This would make sure we all follow the same pattern.
- /controllers
-
We then would have
/sharedwhere we would have "helpers" likejsonparsers.
/queries/service_wrappers/templates/adapters
Also we'd talked about the
/sharedstructure for say the JSON library to be a bit more like/web/shared/parsers/json.exrather than a folder for each helper module. At least that's how I understood it.