AKSW / building-navigator

The Gebäude-Navigator helps you to find accessible places in Leipzig.
https://behindertenverband-leipzig.de/gebaeude-navigator
GNU General Public License v3.0
3 stars 2 forks source link

Fixation of architecture and its documentation #6

Closed k00ni closed 7 years ago

k00ni commented 7 years ago

All the information you write will result in the future README.md.

simeonackermann commented 7 years ago

First quite reduced draft of the architecture with required elements.

architecture

Especially the "Action API" will have additional elements like functions/interfaces/classes etc to request the Store, build the Filter etc. Shall I add these to the architecture diagram?

simeonackermann commented 7 years ago

A more detailed version with additional elements:

architecture-detailed

simeonackermann commented 7 years ago

I figured out an important update of the flow between the actions, rdfstore and middleware. We can use the middleware as an API to do asynchronous requests to the rdfstore and pass the results to the redux-store. The new architecture might look like this: architecture

A description will follow in the Readme...

k00ni commented 7 years ago

Thanks for the sketches, they look good already. But i dont understand, why we need the Middleware API? The container is already subscribed on the redux store and therefore gets called, if anything changes. This kind of asynchronization is already there, why the Middleware?

simeonackermann commented 7 years ago

In the first sketches the asynchronous call to the rdfstore was made in the action API. But this was wrong. The actions are mainly for synchronous calls to the Redux store. With a custom middleware we can do an asynchronous call to the rdfstore, fetch places and dispatch them to the Redux store. Therefore the middleware wraps the dispatch function and is independently from actions.

k00ni commented 7 years ago

The middleware is basically the handler of asynchron request/responses and delivers. Therefore it makes sense. So the container doesn't wait for something, just fire and forget. But gets called, if an update arrived. This way?

simeonackermann commented 7 years ago

Yep, thats the way. And while the sync request is working, the container can subscribe to an 'is-fetching' state, to may view a loading icon.

k00ni commented 7 years ago

Ok, sounds good. What are your next steps?

k00ni commented 7 years ago

Which bullet points can be already marked solved in the list above?

simeonackermann commented 7 years ago

With the updated Readme and source we can check the first three points.

The new test concept is still on progress.

k00ni commented 7 years ago

Very interesting article how to structure a React application: https://medium.com/@alexmngn/how-to-better-organize-your-react-applications-2fd3ea1920f1#.a0y594u1s

simeonackermann commented 7 years ago

Yep, had this (or a similar) article in mind when creating the architecture. But we decided against it because the structure overhead.

But with current folder and file structure I would see some advantages in using more filigran separation.

Am 17. Januar 2017 10:47:07 MEZ schrieb Konrad Abicht notifications@github.com:

Very interesting article how to structure a React application: https://medium.com/@alexmngn/how-to-better-organize-your-react-applications-2fd3ea1920f1#.a0y594u1s

-- You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/AKSW/building-navigator/issues/6#issuecomment-273068545

-- Diese Nachricht wurde von meinem CyanogenMod Android-Mobiltelefon mit K-9 Mail gesendet.