I try to wrap my head around the boot process for dry-web-roda apps, currently looking both at an umbrella style app and a flat app. Especially the umbrella app is quite a lot to take in when it comes to what files are loaded and in what order.
One thing that might help me is to better understand why the different parts are placed where they are. If I look at the umbrella, I think the
sytem directory could be looked at as configuration, while the
lib directory is more “general” code. But in the sub apps (and in the flat app) some of the corresponding files to the ones in the umbrella’s
lib directory are located in the sub app’s
system directory. E.g there is a
lib/my_umbrella/transactions.rb but also an
apps/my_sub_app/system/my_sub_app/transactions.rb, and there’s a
lib/my_umbrella/repository.rb but a
system/my_flat_app/repository.rb. What is the reasoning behind this?
Another thing I don’t understand is why persistence isn’t under the apps “namespace” in the lib directory? I like to think of anything in my
lib dir as something that could at any point be extracted into it’s own gem, so it should be properly namespaced. But a general
Persistence module isn’t. I realize my personal view of the
lib dir probably isn’t that interesting to the project, but would still appreciate some insight in how you think about it. To me, placing persistence either under
lib/my_app/persistence (“this is how persistence works in this app”), or under
system/my_app/persistence (“this is how we currently configure persistence”) would probably make more sense.