feedback on mvc example
Opened this issue · 3 comments
I did a large mvc example
I want it to demonstrate a way of structuring applications that's not stupid but also not too opinionated / bullshit.
It would be good to get some eyes on it.
@Matt-Esch you had some opinions about structuring applications as standalone feature folders. I tried to structure it like that, would love to hear about the good & bad.
@thlorenz you had some opinions about structuring larger apps as modules. I tried to structure it like that, would to love to hear about the good & bad
So in general the structure is fine. It would be nice to get this example to the point of production readiness as I think it is lacking some things at the moment.
- An example "domain" i.e. a fat business logic require, for completeness
- Integrate domains and clustering of the routes, since everyone should want to do this
- Add a reasonable error handling and logging mechanism, again because everyone should want to do this
- Not mutating the config, but creating a deps objects with config as a property plus the additions
- Demonstrate environment based switching, helpful for people with different dev/production configs (for things like oauth) or persistence strategies (useful to Azure devs)
- the example domain is called model.js ( https://github.com/Raynos/http-framework/blob/master/examples/mvc/features/pet/model.js )
- domains & clustering might be out of scope for this example
- I think good error & logging is of value.
- I'm on the fence about deps vs config.
- I demonstrate different environment switching for the port.
@Matt-Esch do you want to make PR demonstrating logging & error handling ? (maybe consider using bunyan
).
Would you also like to PR a new clustering example?