Best way to keep webapp properties private to a session

I have developed an extensive app, working with a single user during the development. I am now getting close to launching this as a public multi-user webapp.
I just discovered (thanks to Tim Hare) that properties in a module of a webapp are accessible across multiple sessions of that webapp. What this means to me is that in a multi-user environment, information I need to keep private to a session (for information privacy as well as preventing one session from stepping on the toes of another session) needs to leverage properties that are part of a session as opposed to part of a module.

From a coding perspective, that looks to me like I need to address all of my session properties as “session.propertyname”. Adding “session.” to all my properties that need app-wide access is a bit cumbersome. Is there a more efficient way to address session.properties without the “session.” prefix? Or are there other strategies for accomplishing what I have described above?

Session is mostly it. It’s intentional as modules are global by definition.

Now, you could put :

dim s as Session = Session

In your methods to make it so there’s less to insert.

Personally I find that this makes it harder to read when you come back later though.

Read Norman´s response to my snippet here: https://forum.xojo.com/8830-using-html-link-to-communicate-with-xojo-web-app/p1#p62339

He also did not recommend it. Although I did Dim Session as Session = Session.

[quote=85095:@Albin Kiland]
He also did not recommend it. Although I did Dim Session as Session = Session.[/quote]
Lets not suggest this to new users. It’s confusing and causes other issues, like not being able to get at the original object anymore.

[quote=85095:@Albin Kiland]He also did not recommend it. Although I did Dim Session as Session = Session.
[/quote]

If you must…

dim sess as Session = Session
That way, it makes it clear what you’re doing and what you’re using.