Controller File
Last updated
Was this helpful?
Last updated
Was this helpful?
What Controller file is actually a with a special name "controller.sqlx". Controller file will be automatically loaded just after the user session creation but before the first request is processed. All Sodium projects must have one controller file in the same folder even if it is empty.
Why Controller file term is used to provide developers with a standard application design. With a well-known controller file, developers can find implementation of the business logic. Controller files consist of global variables/functions which are available from the beginning of the Sodium application to the end of the user session.
In another word, Controller file is used for;
Business rule implementation.
Shared functions and/or variables.
Session-wide triggers (Ex: )