2182
Views
8
Comments
Solved
Client action, server action

I need to explain which time using server and client action and we want differentiate in theoretical manner

2025-05-05 10-10-34
Vednarayan

Hi @SHANMUGA PRIYA 


Server Action:-

 Server Actions are Actions that are always executed on the server, both in Web and Mobile. Since Web Apps run on the server in their entirety, this is the only available type of Action for a Web App. When a Mobile App calls a Server Action, it needs to be online (since it must reach the server to execute the Action). Use Server Actions in Web Apps whenever you need to abstract some business logic or core logic or domain-specific logic. Use Server Actions in Mobile Apps only if you cannot avoid it (e.g. when syncing data), as it will incur a performance penalty (for calling the server and waiting for it to respond back). 


Client-Action:-

Client Actions are the Mobile equivalent to Server Actions. They run on the device, not on a server. Client Actions are therefore only available for Mobile Apps. Their use, like Server Actions, is to abstract logic.

Since OutSystems 11, there is one more action added that is called  Service Actions. These are very much like Server Actions, but share some properties with REST Methods (perhaps yet another type of Action), in that calling them only creates a "weak" Reference to the Module it's in (instead of the normal "strong" Reference). But if you've just started OutSystems, I'd forget about them for now.

Thanks and Regards

Vednarayan Saket

2024-12-02 12-15-17
Aravind EONE

Client Actions:

  1. Client actions are executed in client side like javascript.
  2. Client actions are only available in Mobile apps and Reactive web apps.
  3. You can use client actions in expressions if its function property is set to true.
  4. Mostly used for validations and widget event handlers.
  5. Use your client actions light weight.

Server Actions:

  1. Server actions will be executed in server side like database activities.
  2. Server actions are available in both Mobile and Web apps.
  3. Use server actions in mobile apps only if it is necessary/unavoidable.
  4. You cannot use server actions in expressions even if it's function property is set to true.
  5. Using frequent server actions may affect the performance. 
2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Aravind,

Your answer has some incorrect statements

  • Client actions are also available for Reactive Web apps, not only Mobile
  • You CAN call server actions in expressions if function property is set to true but only in Traditional Web.
2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

You only updated one of the two bullets

2024-12-02 12-15-17
Aravind EONE

Got it Thanks for the info Daniel. I forgot to mention that we cannot access server action as function in expressions in mobile and reactive apps.

2022-08-23 05-13-34
Kishore

Client Action : An Action cannot be exposed when:

  • It has a parameter that is defined using an Entity/Structure that is not exposed.
  • It has a parameter that is defined using an Entity/Structure that is reused from another module.

In case the execution of the Producer and Consumer modules are under different User Providers, the modules have different sessions. In this case, variables associated to the session can hold different values between modules.


Server Action : 

An Action cannot be exposed when:

  • It has a parameter that is defined using an Entity/Structure that is not exposed.
  • It has a parameter that is defined using an Entity/Structure that is reused from another module.

In case the execution of the Producer and Consumer modules are under different User Providers, the modules have different sessions. In this case, variables associated to the session can hold different values between modules.


some of the link to ref:  https://success.outsystems.com/Documentation/10/Developing_an_Application/Implement_Application_Logic/Actions_in_Web_Applications?_gl=1*11gm88l*_ga*MjYyODk0MjgzLjE2MzcyODg3MzU.*_ga_ZD4DTMHWR2*MTYzNzY1OTU0Ny44LjEuMTYzNzY2MjMyNi40MQ..#Screen_Actions


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