why we cant use preparation in reactive web?
Question
Application Type
Reactive

What are the unique things in reactive web as compared to traditional web.

please explain in detail.

Thanks in advance.

mvp_badge
MVP
Solution

Hi Ajit,


Preparation, as a dedicated server-side Action that loads initial data for Screens, doesn't exist in the client-side Reactive interface. In Traditional Web, the page will only be rendering after the Preparation, not contributing for a better user experience like a modern technology like Reactive where data is fetched asynchronously and the screen is being filled.

If you need to execute some logic before the screen starts to load, you can do it using screen events like the OnInitialize, but be aware that depending on the logic executed that it may have an impact on performance like the one you try to avoid using the Reactive technology (see more details and advice on the link).


Regarding the differences between Traditional and Reactive, to avoid forgetting about any or writing a very extensive answer, please refer to the documentation about what you need to know about Reactive the documentation on the differences to consider between both.


Kind Regards,
João

mvp_badge
MVP
Solution

Hi Ajit,

In addition to João’s detailed answer, if you are looking to create similar behavior in Reactive Web as the Preparation does for Traditional Web, you could use a Data Action instead (which is also executed on the server-side) and control the visibility of all screen elements using the IsDataFetched runtime property.

This way, even though the Data Action executes asynchronously while the page is already rendered, the screen elements will only “show” after the Data Action has finished its execution. Similar to how the page will only “show” in Traditional Web after Preparation has finished its execution.

Hope this helps!

Regards,
Nordin

mvp_badge
MVP
Solution

Hi Ajit,


Preparation, as a dedicated server-side Action that loads initial data for Screens, doesn't exist in the client-side Reactive interface. In Traditional Web, the page will only be rendering after the Preparation, not contributing for a better user experience like a modern technology like Reactive where data is fetched asynchronously and the screen is being filled.

If you need to execute some logic before the screen starts to load, you can do it using screen events like the OnInitialize, but be aware that depending on the logic executed that it may have an impact on performance like the one you try to avoid using the Reactive technology (see more details and advice on the link).


Regarding the differences between Traditional and Reactive, to avoid forgetting about any or writing a very extensive answer, please refer to the documentation about what you need to know about Reactive the documentation on the differences to consider between both.


Kind Regards,
João

mvp_badge
MVP
Solution

Hi Ajit,

In addition to João’s detailed answer, if you are looking to create similar behavior in Reactive Web as the Preparation does for Traditional Web, you could use a Data Action instead (which is also executed on the server-side) and control the visibility of all screen elements using the IsDataFetched runtime property.

This way, even though the Data Action executes asynchronously while the page is already rendered, the screen elements will only “show” after the Data Action has finished its execution. Similar to how the page will only “show” in Traditional Web after Preparation has finished its execution.

Hope this helps!

Regards,
Nordin

Hi,

Actually, Traditional Web is more like MVC and React is more like MVVM. Almost events and logics of Traditional Web run on server while some of React run on client(our browers)  as Client Action( actually are js actions). Refer to 

MVC:

MVVM:

So we can have the preparetion action for Traditional, because in this event, our brower are waiting the page( which already has been rended with data) returned from server. All operations are synchronous. This means we use elements to communicate with server not data. When we need to refresh page or submit page, we will post page or refresh some section on page.

But when we use React, we will not wait the page(which rended by server), the brower shows the page with no data first, then at the same time, brower requests the data from server, when we get the data, the brower rend the page itself. All operations are asynchronous. And we only use data to communicate with server. So there is no preparetion for React, but we can use Ready, Render, DataFetched these event.


mvp_badge
MVP

Hello Ajit,

Please refrain yourself asking same/similar question multiple times on the forum, and keep the discussion on your question centralised on then first discussion you started, that was already answered. You even marked the reply from @Tiago Simões as solution.

https://www.outsystems.com/forums/discussion/73615/why-reactive-web-follows-asynchronous-programming/

Furthermore a simple search on OutSystems documentation would also have gave you the answers, like @João Marques already emphasized.

Regards,

Daniel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.