Visualizing the v3 architecture - feedback wanted #376
dillonkearns
started this conversation in
General
Replies: 1 comment 1 reply
-
I guess what might help would be, in addition to what you already have, three separate diagrams highlighting the relevant bits, and three code blocks showing only the relevant functions and types. As is, the diagram and the code might feel a bit daunting at first sight. I would also, but maybe that’s just me, rearrange the three actions like this:
But mostly, separating diagrams and code blocks in three, demonstrating each of these three actions (maybe interactively by the way?) would be awesome, I think. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There's a lot to explain in the v3 architecture, and this doesn't address every single detail, but I wanted to try to capture the core details. I'll try to explain it in the format I would use in the documentation site so people can give me feedback and suggestions for how to make it more clear.
Accompanying Explanation
This shows the flow through 3 user interactions:
onClick
)In (1), we hit the database using our definitions in our
custom-backend-task.ts
.In (2), the form makes a
POST
request to our Backend App. After running theBackendTask
inaction
with the incoming HTTP request, ourdata
is re-fetched from the Frontend App in order to get fresh data from any changes (like a new favorite count).(3) is a vanilla Elm
Msg
. It doesn't communicate with the server at all. It directly sends aToggleMenu
Msg, which updates theModel
to show the menu.Route Code
Here is the code for the route. Note that this module is used in two Elm apps - our Backend App (runs on our server) and Frontend App (runs in user's browser).
Beta Was this translation helpful? Give feedback.
All reactions