-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Is there any particular reason to structure the app based on technical
properties of a file instead of functional properties? I can imagine
that when a project grows in size the mental burden to switch contexts
between 4 directories can be limiting. Any chance this could be in a
functional way?
Looking through the app I see the following technical separation:
components, constants, containers, models and stores. I'd like to look
at a directory structure and see what and where the functionalities
are. Right now it's unclear.
I'd suggest the following separation/structure:
- App: this is where the components
FooterandHeaderreside,
with the constantsstores, the containerRootand the
createStoreplumbing stuff. Here you do the wiring of actions
creating stores, bootstrapping of the application, routing (with
RouterStore), etc. - Todo: should contain the
TodoStore, theTodoModel, the
ToDo components (TodoItem,TodoList,TodoTextInput)
This way, when the app gets more functionality, it's all neatly
organized and you don't get in the way of other components, and you
don't need to keep 4 directories open in when adding functionality.
Especially this structure allows for horizontal scaling instead of
vertical scaling. More features only means more directories that can
hold that specific feature. You can look at it as a tree: it either
grows very tall with no branches (and it's going to be hard to pick
the top most fruit) or have a tree with branches to the side. Each
branch offering it's fruits just within reach.