I’ve raised this on the chat as well but wanted to move it here to not hijack the chat for that discussion.
I was wondering what the added benefit of “app” architecture is. @hieuk09 was giving me some help:
Actually, it does not give you more features or performance. It just makes the app structure clearer. For example, why do you need apps/web when app is enough? It’s true that it adds complexity in the codebase, but the directory structure looks more reasonable.
To me it looks like “app” is just a “container” with a different directory structure and the limitation of one app.
I see problems with following points due to the different directory structure:
- documentation: need to explain the differences and benefits of each architecture
- support: for questions asked in chat/mailing list the answer might depend on the architecture
- change the archtiecture: people might want to change the architecture => support needed in CLI
- code complexity: calls to env.container? will be sprinkled throughout the code to modify the behavior depending on the architecture, this is mostly for includes.
- extensions/gems: they might need to check for architecture as well
While it does not seem add much more complexity: in a lot of the tests this might actually result in twice as many tests if one wants to properly test all the cases. So it happened in my cli refactoring. Besides adding a lot of “if” statements in the generator for action, it also doubled the tests and fixtures because i wanted to test all combinations.
To me sounds like a lot of trouble for no functionality but a different directory structure. If someone want the “app” setup, he can easily do it by creating different lotus applications but only adding one app each.
With my current knowledge of lotus i’d actually remove the architecture feature (though it only has been added recently) in favor of clean, simple code. But … perhaps i’m missing something important?
So i was wondering: who is using “app” architecture and why?