Answer the question
In order to leave comments, you need to log in
What problems does reactive programming solve?
I'm trying to get my head around what reactive programming is all about. wikipedia says - in general, the propagation of changes, as in the formulas of excel tables. From a ReactJS perspective, ReduxJS is data streams. The original microsoft articles talk about behaviors, events and their composition, which is enough. The reactive manifesto mentions responsiveness, fault tolerance, and resilience to loads. I don't get a clear picture.
Can you please tell me the classic problems of reactive programming, for which it was created?
I hope in this way to comprehend what it is all the same.
Answer the question
In order to leave comments, you need to log in
I hope I understood your question correctly.
I store photos from Mars in HD format in the database, I make a request for 100 photos, the task is to show 100 photos sequentially on the screen.
Standard approach: I make a request to the database for 100 photos, wait 2 seconds, get an array of 100 photos,
run through the collection with an iterator and show the pictures on the screen
pseudocode:
pics = GetPicsFromDatabase();
foreach(var pic in pics)
ShowPic(pic)
// somecode
GetPicsFromDatabaseReactive(NextPictureHandler);
// somecode
NextPictureHandler(Image pic)
{
ShowPic(pic)
}
Wikipedia example
In imperative programming, expression
means to take the current values of 'b' and 'c', add them up and assign 'a' the result. Further changes to the parameters 'b' and 'c' do not affect 'a'.
In reactive programming, the same expression:
Means that 'a' is the sum of 'b' and 'c'. If 'b' or 'c' changes in the future, this will affect the value of 'a'.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question