Difference between Screen action and server action

Difference between Screen action and server action

  

What is the theoretical and logical difference between screen action and server actions? May be a very basic question.

Screen action = client side (runs in the ui/browser)

Server action = server side (runs on the server)

Does that help?

Might be worth running through this course that covers all of this in detail

Hi Dan,

Screen Actions allow you to run logic when the user interacts with the screen, such as clicking on a button or a link.

In OutSystems you can create Server Actions to encapsulate the logic that implements the business rules of your application and use them in other actions, such as Preparation actions, Screen Actions or other Server Actions:


See for more details.

https://success.outsystems.com/Documentation/10/Developing_an_Application/Implement_Application_Logic/Actions_in_Web_Applications#Screen_Actions

Solution

@Dan: What you are saying is correct for Mobile Apps, but not for Web Apps. For Web Apps, Screen Actions also run server-side.

@Ajith: I've written here about screen actions: "A Screen Action is an Action that is called by Screen Elements, e.g. a Button or a Link (or by a Widget as part of a Notify). It has direct access to the Screen's Variables and Preperation." Note that for Web Apps, Screen Actions can't call each other, but for Mobile Apps, they can. Screen Actions have always Screen scope, so only elements of the Screen can access them.

On the other hand, Server Actions, like shoeb said, are used for encapsulating reusable logic. The can be Public, i.e. they can be Referenced by other eSpaces.

Solution