- 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
On
/lib: it's not reallyusher run hotthat's the issue, it's the phoenix hot reloader which excludes/libprecisely so you can have a folder to put long-lived code. Also, I thought we'd agreed to get rid of thepre-libraryfolder and move those contents into either/libor/web/shareddepending on their nature.On
/test: we don't need to compromise anymore! 🎉On
/web: might want to add definitions of what we think should be in each folder. i.e. controllers get data from adapters, pass it on to views which template and return.