Answer the question
In order to leave comments, you need to log in
How to store data about bookmarks (movies) on the client?
The user has a page with his bookmarks (what movie he wants to watch, what movie he plans, etc.).
Information about the user's bookmarks comes from the server with incomplete information about the film, it is necessary for a brief description (name, what, year of release).
There is a movie page, which has all the information about the movie (actors, genre, fees, etc.).
The question arises: how to store movie data in the store?
1. Store 2 entities Movie and Movie_short, which will contain 2 duplicate pieces of information: one for displaying all information, and one for bookmarks. Each of which will be filled in independently of each other (a request from the bookmarks page and a request from the movie page).
2. Store everything in one entity and then merge them together. For example: The user went to a page with bookmarks, the server gave incomplete information about the movie, it is poured into the Movie entity, then I get data about the bookmark from it. Then follows the transition to the page with the movie from the bookmark, on which I get detailed information and overwrite the Movie entity with new fields. But then another question arises, how will I understand that I have all the data that I need, because the data loading is checked for the existence of data in this entity? Check each field, and if it is missing, then make a request to the server?
Or are there any other options?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question