"Reactive": Difference between revisions

From Helpful
Jump to navigation Jump to search
m (Helpful moved page Reactive to "Reactive")
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#addbodyclass:tag_tech}}
{{#addbodyclass:tag_webdev}}


===Reactive websites (layouting)===
===Reactive websites (layouting)===




'''Reactive websites''', responsive design, adaptive websites, and mobile friendly websites, are all different takes on very similar themes -- that theme ''largely'' (but not only) being about layouting for different sizes and shapes of screen, and dealing different kinds of input (mouse versus touch).
'''Reactive websites''', '''responsive design''', '''adaptive websites''', and '''mobile friendly websites''', are all different takes on very similar themes -- ''largely'' (but not only) being about '''layouting for different shapes and sizes of screen''', and dealing with '''different kinds of input''' (e.g. mouse versus touch).




In this context,
In webby context,
: 'responsive' often means that the same thing will naturally layout in a different sensible way on a different-shaped or different-sized screen (and you'll get people resizing the browser and saying "see?")
: 'responsive' often means that the same thing will naturally layout in a different sensible way on a different-shaped or different-sized screen (and you'll get people resizing the browser and saying "see?")


: 'reactive' (and 'adaptive') often means you get sent a somewhat different site between desktop and mobile.
: 'reactive' (and 'adaptive') often means you get sent a somewhat different site between desktop and mobile.
...yet there are no hard boundaries here




Line 21: Line 26:
* a relatively declarative style.
* a relatively declarative style.


* thinking in terms of events (rather than things as ordered by code)
* thinking in terms of  
 
** events (rather than things as ordered by code)
: and possibly grouping those events in event ''streams''
** sources of those events (e.g. interactable items)
** things that process those events


: a fairly [[asynchronous]] system of execution (in terms of event ordering)
...and possibly...
* a fairly [[asynchronous]] system of execution (in terms of event ordering)


It's also a lot closer to functional programming than people seem to realize.
* grouping those events in event ''streams''


{{comment|(It's also a lot closer to functional programming than people seem to realize.)}}




This concept is used anywhere from  
This concept is used anywhere from  
: to the hidden model of GUI updates
: the model model that makesof GUI updates go, particularly on the web (where we may want things to be more redefinable than [[MVC]] easily gives us)
:: see also e.g. Vue, Svelte, where what looks like regular JS  
:: see also e.g. Vue, Svelte, where what looks like regular JS  


: program language design
: program language design
:: that is, languages with added features, like coroutines;
:: e.g. languages that add features like coroutines  
:: a fully reactive languages have proven to be useful for specific purposes but not as a generic language
:: a fully reactive languages have proven to be useful for specific purposes but not as a generic language


Line 63: Line 71:


-->
-->


===Reactive provisioning===
===Reactive provisioning===

Latest revision as of 00:33, 21 April 2024

Reactive websites (layouting)

Reactive websites, responsive design, adaptive websites, and mobile friendly websites, are all different takes on very similar themes -- largely (but not only) being about layouting for different shapes and sizes of screen, and dealing with different kinds of input (e.g. mouse versus touch).


In webby context,

'responsive' often means that the same thing will naturally layout in a different sensible way on a different-shaped or different-sized screen (and you'll get people resizing the browser and saying "see?")
'reactive' (and 'adaptive') often means you get sent a somewhat different site between desktop and mobile.

...yet there are no hard boundaries here



Reactive programming (state management)

Reactive programming is programming style where state changes are automatically propagated to where they need to go.

This tends to mean

  • a relatively declarative style.
  • thinking in terms of
    • events (rather than things as ordered by code)
    • sources of those events (e.g. interactable items)
    • things that process those events

...and possibly...

  • a fairly asynchronous system of execution (in terms of event ordering)
  • grouping those events in event streams

(It's also a lot closer to functional programming than people seem to realize.)


This concept is used anywhere from

the model model that makesof GUI updates go, particularly on the web (where we may want things to be more redefinable than MVC easily gives us)
see also e.g. Vue, Svelte, where what looks like regular JS
program language design
e.g. languages that add features like coroutines
a fully reactive languages have proven to be useful for specific purposes but not as a generic language


Reactive JS frameworks

Reactive provisioning