May be you do not like hear “have a look into documentation” - but I am sure lots of your questions will be answered there. See …Details on Session Management… (within…Special Development Topics…).
In principal, the session management is hidden inside Application Designer. If you write normal applications running in the Application Designer workplace environment, you do not have to care about session management at all: you do not have to somehow collect data from a session object in order to work with it or do something similar…