Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Fixation of architecture and its documentation #6

Closed
3 of 5 tasks
k00ni opened this issue Oct 24, 2016 · 12 comments
Closed
3 of 5 tasks

Fixation of architecture and its documentation #6

k00ni opened this issue Oct 24, 2016 · 12 comments
Assignees

Comments

@k00ni
Copy link
Member

k00ni commented Oct 24, 2016

  • Reduce information to the essence we talked about
    • exact data flow (flux!)
    • required elements in flow (RDF store, a Redux store, container and component ...)
  • fixate file structure
    • use "by nature"
  • create a list of required libraries (vendors)
    • which library is used in which part of the application?
  • plan a basic test concept (keep existing unit tests)
    • deploy new folder structure
    • mocking of Redux stores
    • add a system test which uses rdf-store + redux store + container to query the store via SPARQL and expect a certain list of triples (JSON-LD)
  • important: usage of technologies which allow execution on old browsers like the ones on Android 4.0 or newer
    • please research if there is a library or test tool to check availability

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

@simeonackermann
Copy link
Collaborator

simeonackermann commented Oct 26, 2016

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
Copy link
Collaborator

A more detailed version with additional elements:

architecture-detailed

@simeonackermann
Copy link
Collaborator

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
Copy link
Member Author

k00ni commented Oct 28, 2016

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
Copy link
Collaborator

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
Copy link
Member Author

k00ni commented Oct 28, 2016

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
Copy link
Collaborator

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
Copy link
Member Author

k00ni commented Oct 28, 2016

Ok, sounds good. What are your next steps?

@k00ni
Copy link
Member Author

k00ni commented Oct 30, 2016

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

@simeonackermann
Copy link
Collaborator

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

The new test concept is still on progress.

@k00ni
Copy link
Member Author

k00ni commented Jan 17, 2017

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

@simeonackermann
Copy link
Collaborator

simeonackermann commented Jan 17, 2017 via email

@k00ni k00ni closed this as completed Feb 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants