I recently asked this point in the chat and figured out afterwards that this wasn’t the best place for several reasons. I’d like to ask here again and hope i’ll get thoughts about it.
How the project-name is currently used during generation
The guides introduce two different terms as architectural option in a lotus-app: “Container” which “hosts several applications” and “Application” which seems to be considered as a monolithic counterpart to containers (as already mentioned in another discussion, i think the monolithic approach should be dropped - the design of lotus-containers is not overall complex and the USP of Lotus).
When creating a new project (which the guide files under the headline “Commandline/Applications”)
fancyfoo (i’ll reference to that as project-name) the generator ends up in the following directory-tree (i omit unnecessary parts):
fancyfoo/ lib/ fancyfoo.rb fancyfoo/ config/
The generator creates 2 files whose names are borrowed by the project and it injects the project-name at 11 places in the source-code.
How i think the framework is meant to be used
Currently i think the
lib/-directory contains all stuff which is reused by other parts of my applications. Different apps (stored in the
apps/-directory) will be used to expose functionality to my users.
So i think of the
lib/-content as the core of my project. If i add new functionality i will add new entities, mailers and so on.
If these functionalities need to be provided, i extend the given app.
Where my imaginations don’t fit to the project-structure
I’ll try to explain where i see differences between my understanding of Lotus and why.
- If the
lib/-directory contains in first place the core of the application i’d expect to be called something like
core. Reusing the project-name adds unvalued complexity to the project and expect from bigger projects there won’t ever be additional directories named differently.
- If the
lib/-content is meant to be extended in a topical matter (f.e. to couple stuff by domain) i would expect it to be limited to the subdirectories (not including the
<<project-name>>.rb). The concept should have an explicit name and should be covered by a cli. This would emphasize the core-modularity and give it a similar weight as the applications already have.
- The documentation mixes partially names of concepts and project-parts up, it took me some time to get an idea of the core-concepts behind Lotus (i probably haven’t understood everything right). I think it could be helpful to create a glossary to separate and standardize the meanings which would it make easy to use the “lotus-idioms” and lowers the entry-barrier.
All these points have their source in my subjective point of view and they’re not meant to be offensive.
I’d be really happy to get some feedback, probably i badly misunderstood some core-concepts. Thanks for reading!