ASSOCIATE-REACTIVE-DEVELOPER practice question 31 of 35

The recommended data types for Session Variables are...

Full set: 262 questions
Answer options
A: Any data type can be used.
B: Basic and Structures Types.
C: Basic and Entity Identifier Types. Correct answer
D: Basic and Entity Types.
Correct Answer:
C. Basic and Entity Identifier Types.
Explanation

Session Variables are designed to store small amounts of information specific to a user's session. To ensure optimal application performance, Outsystems restricts their data types. Storing large or complex data structures in the session would increase server memory consumption and the amount of data transferred with each request, leading to performance degradation. Therefore, the recommended and allowed data types are limited to Basic Types (e.g., Text, Integer, Boolean) and Entity Identifier Types. This allows for storing simple values or references to database records without loading the entire record into memory.

Why Incorrect

A. Any data type can be used. This is incorrect. Complex data types like Record Lists or Binary Data are not permitted for Session Variables to prevent significant performance issues.
B. Basic and Structures Types. This is incorrect. Structures are complex record types. Storing them in Session Variables is an anti-pattern that negatively impacts application performance and is not allowed.
D. Basic and Entity Types. This is incorrect. Storing an entire Entity record in a session consumes excessive server memory and can lead to data inconsistency (stale data). ---

References

1. OutSystems Official Documentation, "Session Variables":

Reference: Under the "Data Type" property description, the documentation explicitly states: "The data type of a Session Variable can only be a basic data type or an Entity Identifier data type."

Location: OutSystems Documentation > ... > Core Concepts > Variables > Session Variables.

2. OutSystems Official Documentation, "Session Variables Best Practices":

Reference: This guide advises: "Use only basic data types. Session Variables can only have basic data types, such as Text, Integer, or Boolean, or be record identifiers. Don't use complex data types, such as records or lists, to avoid performance degradation."

Location: OutSystems Documentation > ... > Best Practices > Performance Best Practices > Session Variables Best Practices.

3. OutSystems Guided Path, "Developing Web Apps (Reactive)":

Reference: In the section covering session management, the course material reinforces this limitation, explaining that Session Variables are meant for small, simple data points like a user ID, not for complex structures or entire records.

Location: OutSystems Training > Guided Paths > Developing Web Apps (Reactive) > Variables in Reactive Web Apps > Session Variables.

Scroll to Top