Answer the question
In order to leave comments, you need to log in
How can the design be optimized?
Hello. I’ll make a reservation right away: I don’t need code, but help in building the right application logic.
Essence such:
I store at myself the data in a DB. Through the bot, I check the same data on a third-party service. If they change, I write them to my database. Regardless of the changes, for each request, I send myself the result of the request in the cart. There is a lot of data, so in my cart they are displayed as a slider (forward and backward). The button properties store the record ID in the database, the current position and the action (forward or backward).
Procedure:
I make a request to a foreign server.
As a result, I will receive either an array of data or null
If there is an array of data, then
1. I convert the array into a string
2. I inform that there is data
3. I compare the data from a DB. If they differ, I enter them in the database, and if they match, I put a mark in a separate field and immediately get the number of the last entry in the
database in the database
Otherwise, if null, then
- I inform you that there is no data.
- I compare the data from a DB. In case of their difference, I enter it in the database, and in case of a match, I put a mark in a separate field and immediately get the number of the last record in the database
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